MySQL中对Json字段转对象查询和MyBatis中一对多到多对多查询

1、MySQL中Json字段转对象并对JSON数据中对字段的查询

应用场景

日志或草稿表中存储有JSON字段类型,需要进行单个的模糊搜索

当存储JSON数据的时候查询需要模糊查询时,很难做like来直接关联

下面是数据库结构

#数据库结构
DROP TABLE IF EXISTS `ding_message_timeout`;
CREATE TABLE `ding_message_timeout_copy1`  (
  `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'ID',
  `trigger_action` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '前置节点',
  `after_trigger_action` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '后置节点',
  `trigger_action_time` datetime(0) NULL DEFAULT NULL COMMENT '超时提醒参考时间',
  `duration` int(10) NULL DEFAULT NULL COMMENT '时长(超时提醒为操作时间之后,到期提醒为操作时间之前)',
  `status` tinyint(4) NULL DEFAULT NULL COMMENT '状态(0未处理 1已处理)',
  `message_will_id` bigint(20) NULL DEFAULT NULL COMMENT '预发送消息ID',
  `biz_params_json` json NULL COMMENT '消息业务参数对象JSON',
  `biz_tag_code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '业务标识码',
  `biz_tag_code_type` tinyint(4) NULL DEFAULT NULL COMMENT '业务标识码类型(1任务ID 2排产ID 3工序排产ID 4工序ID 5工单ID  6报工ID)',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 59 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '操作超时记录表' ROW_FORMAT = Dynamic;

SET FOREIGN_KEY_CHECKS = 1;

插入数据库数据

INSERT INTO `ding_message_timeout` VALUES (6, 'createTask', 'scheduleTask', '2022-10-28 11:13:41', 1, 0, 128, '{\"bizUserId\": 1, \"bizTagCode\": \"1814\", \"bizUserName\": \"admin\", \"bizTagCodeType\": 1, \"templateParams\": {\"time\": \"2022-10-28 11:13:41\", \"user\": \"admin\", \"duration\": \"1\", \"taskCode\": \"PO221028006\", \"productCode\": \"VPC-001\", \"productName\": \"VPC笔记本\"}, \"triggerActionTime\": \"2022-10-28 11:13:41\"}', NULL, NULL);
INSERT INTO `ding_message_timeout` VALUES (7, 'createTask', 'scheduleTask', '2022-10-28 11:21:27', 1, 0, 129, '{\"bizUserId\": 1, \"bizTagCode\": \"1817\", \"expireTime\": \"2022-10-31\", \"bizUserName\": \"admin\", \"bizTagCodeType\": 1, \"templateParams\": {\"time\": \"2022-10-28 11:21:27\", \"user\": \"admin\", \"duration\": \"1\", \"taskCode\": \"PO221028007-3\", \"productCode\": \"VPC-CPU-001\", \"productName\": \"VPCCPU\"}, \"triggerActionTime\": \"2022-10-28 11:21:27\"}', NULL, NULL);
INSERT INTO `ding_message_timeout` VALUES (8, 'scheduleTask', 'splitProcess', '2022-10-28 10:42:33', 12, 0, 130, '{\"taskId\": 1813, \"bizUserId\": 1, \"processId\": 9903, \"bizTagCode\": \"9903\", \"bizUserName\": \"9001管理员\", \"bizTagCodeType\": 4, \"handlerDeptIds\": \"245\", \"handlerUserIds\": \"486\", \"templateParams\": {\"time\": \"2022-10-28 10:42:33\", \"user\": \"9001管理员\", \"duration\": \"12\", \"taskCode\": \"PO221028004-3\", \"processName\": \"电路焊接\", \"productCode\": \"VPC-CPU-001\", \"productName\": \"VPCCPU\", \"materialCode\": \"VPC-CPU-001\", \"materialName\": \"VPCCPU\"}, \"triggerActionTime\": \"2022-10-28 10:42:33\", \"schedulingPlanProcessId\": 1447}', NULL, NULL);
INSERT INTO `ding_message_timeout` VALUES (9, 'dispatchOrder', 'startOrder', '2022-10-28 11:42:45', 12, 0, 131, '{\"orderId\": 2361, \"bizUserId\": 1, \"processId\": 9928, \"bizTagCode\": \"2361\", \"bizUserName\": \"9001管理员\", \"bizTagCodeType\": 5, \"handlerDeptIds\": \"239\", \"templateParams\": {\"time\": \"2022-10-28 11:42:45\", \"user\": \"9001管理员\", \"orderId\": \"2361\", \"duration\": \"12\", \"taskCode\": \"PO221028007\", \"processName\": \"彩绘\", \"productCode\": \"VPC-001\", \"productName\": \"VPC笔记本\", \"materialCode\": \"VPC-001\", \"materialName\": \"VPC笔记本\"}, \"triggerActionTime\": \"2022-10-28 11:42:45\"}', NULL, NULL);
INSERT INTO `ding_message_timeout` VALUES (10, 'dispatchOrder', 'createReport', '2022-10-28 11:42:45', 12, 0, 132, '{\"orderId\": 2361, \"bizUserId\": 1, \"processId\": 9928, \"bizTagCode\": \"2361\", \"bizUserName\": \"9001管理员\", \"bizTagCodeType\": 5, \"handlerDeptIds\": \"239\", \"templateParams\": {\"time\": \"2022-10-28 11:42:45\", \"user\": \"9001管理员\", \"orderId\": \"2361\", \"duration\": \"12\", \"taskCode\": \"PO221028007\", \"processName\": \"彩绘\", \"productCode\": \"VPC-001\", \"productName\": \"VPC笔记本\", \"materialCode\": \"VPC-001\", \"materialName\": \"VPC笔记本\"}, \"triggerActionTime\": \"2022-10-28 11:42:45\"}', NULL, NULL);
INSERT INTO `ding_message_timeout` VALUES (11, 'scheduleTask', 'splitProcess', '2022-10-28 10:42:33', 12, 0, 133, '{\"taskId\": 1812, \"bizUserId\": 1, \"processId\": 9900, \"bizTagCode\": \"9900\", \"bizUserName\": \"9001管理员\", \"bizTagCodeType\": 4, \"handlerDeptIds\": \"244\", \"handlerUserIds\": \"\", \"templateParams\": {\"time\": \"2022-10-28 10:42:33\", \"user\": \"9001管理员\", \"duration\": \"12\", \"taskCode\": \"PO221028004\", \"processName\": \"安装硬盘\", \"productCode\": \"VPC-001\", \"productName\": \"VPC笔记本\", \"materialCode\": \"VPC-001\", \"materialName\": \"VPC笔记本\"}, \"triggerActionTime\": \"2022-10-28 10:42:33\", \"schedulingPlanProcessId\": 1444}', NULL, NULL);
INSERT INTO `ding_message_timeout` VALUES (12, 'scheduleTask', 'dispatchOrder', '2022-10-28 10:42:33', 12, 0, 134, '{\"taskId\": 1812, \"bizUserId\": 1, \"processId\": 9900, \"bizTagCode\": \"9900\", \"bizUserName\": \"9001管理员\", \"bizTagCodeType\": 4, \"handlerDeptIds\": \"244\", \"handlerUserIds\": \"\", \"templateParams\": {\"time\": \"2022-10-28 10:42:33\", \"user\": \"9001管理员\", \"duration\": \"12\", \"taskCode\": \"PO221028004\", \"processName\": \"安装硬盘\", \"productCode\": \"VPC-001\", \"productName\": \"VPC笔记本\", \"materialCode\": \"VPC-001\", \"materialName\": \"VPC笔记本\"}, \"triggerActionTime\": \"2022-10-28 10:42:33\", \"schedulingPlanProcessId\": 1444}', NULL, NULL);
INSERT INTO `ding_message_timeout` VALUES (13, 'scheduleTask', 'splitProcess', '2022-10-28 10:42:33', 12, 0, 135, '{\"taskId\": 1812, \"bizUserId\": 1, \"processId\": 9899, \"bizTagCode\": \"9899\", \"bizUserName\": \"9001管理员\", \"bizTagCodeType\": 4, \"handlerDeptIds\": \"244\", \"handlerUserIds\": \"\", \"templateParams\": {\"time\": \"2022-10-28 10:42:33\", \"user\": \"9001管理员\", \"duration\": \"12\", \"taskCode\": \"PO221028004\", \"processName\": \"安装主板\", \"productCode\": \"VPC-001\", \"productName\": \"VPC笔记本\", \"materialCode\": \"VPC-001\", \"materialName\": \"VPC笔记本\"}, \"triggerActionTime\": \"2022-10-28 10:42:33\", \"schedulingPlanProcessId\": 1443}', NULL, NULL);
INSERT INTO `ding_message_timeout` VALUES (14, 'scheduleTask', 'dispatchOrder', '2022-10-28 10:42:33', 12, 0, 136, '{\"taskId\": 1812, \"bizUserId\": 1, \"processId\": 9899, \"bizTagCode\": \"9899\", \"bizUserName\": \"9001管理员\", \"bizTagCodeType\": 4, \"handlerDeptIds\": \"244\", \"handlerUserIds\": \"\", \"templateParams\": {\"time\": \"2022-10-28 10:42:33\", \"user\": \"9001管理员\", \"duration\": \"12\", \"taskCode\": \"PO221028004\", \"processName\": \"安装主板\", \"productCode\": \"VPC-001\", \"productName\": \"VPC笔记本\", \"materialCode\": \"VPC-001\", \"materialName\": \"VPC笔记本\"}, \"triggerActionTime\": \"2022-10-28 10:42:33\", \"schedulingPlanProcessId\": 1443}', NULL, NULL);
INSERT INTO `ding_message_timeout` VALUES (15, 'scheduleTask', 'dispatchOrder', '2022-10-28 10:42:33', 12, 0, 137, '{\"taskId\": 1813, \"bizUserId\": 1, \"processId\": 9903, \"bizTagCode\": \"9903\", \"bizUserName\": \"9001管理员\", \"bizTagCodeType\": 4, \"handlerDeptIds\": \"245\", \"handlerUserIds\": \"486\", \"templateParams\": {\"time\": \"2022-10-28 10:42:33\", \"user\": \"9001管理员\", \"duration\": \"12\", \"taskCode\": \"PO221028004-3\", \"processName\": \"电路焊接\", \"productCode\": \"VPC-CPU-001\", \"productName\": \"VPCCPU\", \"materialCode\": \"VPC-CPU-001\", \"materialName\": \"VPCCPU\"}, \"triggerActionTime\": \"2022-10-28 10:42:33\", \"schedulingPlanProcessId\": 1447}', NULL, NULL);
INSERT INTO `ding_message_timeout` VALUES (16, 'scheduleTask', 'splitProcess', '2022-10-28 10:42:33', 12, 0, 138, '{\"taskId\": 1813, \"bizUserId\": 1, \"processId\": 9904, \"bizTagCode\": \"9904\", \"bizUserName\": \"9001管理员\", \"bizTagCodeType\": 4, \"handlerDeptIds\": \"245\", \"handlerUserIds\": \"486\", \"templateParams\": {\"time\": \"2022-10-28 10:42:33\", \"user\": \"9001管理员\", \"duration\": \"12\", \"taskCode\": \"PO221028004-3\", \"processName\": \"编程\", \"productCode\": \"VPC-CPU-001\", \"productName\": \"VPCCPU\", \"materialCode\": \"VPC-CPU-001\", \"materialName\": \"VPCCPU\"}, \"triggerActionTime\": \"2022-10-28 10:42:33\", \"schedulingPlanProcessId\": 1448}', NULL, NULL);
INSERT INTO `ding_message_timeout` VALUES (17, 'scheduleTask', 'dispatchOrder', '2022-10-28 10:42:33', 12, 0, 139, '{\"taskId\": 1813, \"bizUserId\": 1, \"processId\": 9904, \"bizTagCode\": \"9904\", \"bizUserName\": \"9001管理员\", \"bizTagCodeType\": 4, \"handlerDeptIds\": \"245\", \"handlerUserIds\": \"486\", \"templateParams\": {\"time\": \"2022-10-28 10:42:33\", \"user\": \"9001管理员\", \"duration\": \"12\", \"taskCode\": \"PO221028004-3\", \"processName\": \"编程\", \"productCode\": \"VPC-CPU-001\", \"productName\": \"VPCCPU\", \"materialCode\": \"VPC-CPU-001\", \"materialName\": \"VPCCPU\"}, \"triggerActionTime\": \"2022-10-28 10:42:33\", \"schedulingPlanProcessId\": 1448}', NULL, NULL);
INSERT INTO `ding_message_timeout` VALUES (18, 'dispatchOrder', 'startOrder', '2022-10-28 10:56:48', 12, 0, 140, '{\"orderId\": 2348, \"bizUserId\": 1, \"processId\": 9901, \"bizTagCode\": \"2348\", \"bizUserName\": \"9001管理员\", \"bizTagCodeType\": 5, \"handlerDeptIds\": \"244\", \"handlerUserIds\": \"486\", \"templateParams\": {\"time\": \"2022-10-28 10:56:48\", \"user\": \"9001管理员\", \"orderId\": \"2348\", \"duration\": \"12\"}, \"triggerActionTime\": \"2022-10-28 10:56:48\"}', NULL, NULL);
INSERT INTO `ding_message_timeout` VALUES (19, 'dispatchOrder', 'createReport', '2022-10-28 10:56:48', 12, 0, 141, '{\"orderId\": 2348, \"bizUserId\": 1, \"processId\": 9901, \"bizTagCode\": \"2348\", \"bizUserName\": \"9001管理员\", \"bizTagCodeType\": 5, \"handlerDeptIds\": \"244\", \"handlerUserIds\": \"486\", \"templateParams\": {\"time\": \"2022-10-28 10:56:48\", \"user\": \"9001管理员\", \"orderId\": \"2348\", \"duration\": \"12\"}, \"triggerActionTime\": \"2022-10-28 10:56:48\"}', NULL, NULL);
INSERT INTO `ding_message_timeout` VALUES (20, 'dispatchOrder', 'startOrder', '2022-10-28 10:56:49', 12, 0, 142, '{\"orderId\": 2349, \"bizUserId\": 1, \"processId\": 9902, \"bizTagCode\": \"2349\", \"bizUserName\": \"9001管理员\", \"bizTagCodeType\": 5, \"handlerDeptIds\": \"244\", \"templateParams\": {\"time\": \"2022-10-28 10:56:49\", \"user\": \"9001管理员\", \"orderId\": \"2349\", \"duration\": \"12\"}, \"triggerActionTime\": \"2022-10-28 10:56:49\"}', NULL, NULL);
INSERT INTO `ding_message_timeout` VALUES (21, 'dispatchOrder', 'createReport', '2022-10-28 10:56:49', 12, 0, 143, '{\"orderId\": 2349, \"bizUserId\": 1, \"processId\": 9902, \"bizTagCode\": \"2349\", \"bizUserName\": \"9001管理员\", \"bizTagCodeType\": 5, \"handlerDeptIds\": \"244\", \"templateParams\": {\"time\": \"2022-10-28 10:56:49\", \"user\": \"9001管理员\", \"orderId\": \"2349\", \"duration\": \"12\"}, \"triggerActionTime\": \"2022-10-28 10:56:49\"}', NULL, NULL);
INSERT INTO `ding_message_timeout` VALUES (22, 'dispatchOrder', 'createReport', '2022-10-28 11:05:03', 12, 0, 144, '{\"orderId\": 2350, \"bizUserId\": 1, \"processId\": 9907, \"bizTagCode\": \"2350\", \"bizUserName\": \"9001管理员\", \"bizTagCodeType\": 5, \"handlerDeptIds\": \"245\", \"templateParams\": {\"time\": \"2022-10-28 11:05:03\", \"user\": \"9001管理员\", \"orderId\": \"2350\", \"duration\": \"12\", \"taskCode\": \"PO221028004\", \"processName\": \"电路焊接\", \"productCode\": \"VPC-001\", \"productName\": \"VPC笔记本\", \"materialCode\": \"VPC-001\", \"materialName\": \"VPC笔记本\"}, \"triggerActionTime\": \"2022-10-28 11:05:03\"}', NULL, NULL);
INSERT INTO `ding_message_timeout` VALUES (23, 'splitProcess', 'dispatchOrder', '2022-10-28 11:06:41', 12, 0, 145, '{\"bizUserId\": 1, \"processId\": 9909, \"bizTagCode\": \"9909\", \"bizUserName\": \"admin\", \"oldProcessId\": 9901, \"bizTagCodeType\": 4, \"handlerDeptIds\": \"231\", \"templateParams\": {\"time\": \"2022-10-28 11:06:41\", \"user\": \"admin\", \"duration\": \"12\", \"processName\": \"喷油\", \"materialCode\": \"VPC-001\", \"materialName\": \"VPC笔记本\"}, \"triggerActionTime\": \"2022-10-28 11:06:41\"}', NULL, NULL);
INSERT INTO `ding_message_timeout` VALUES (24, 'splitProcess', 'dispatchOrder', '2022-10-28 11:06:41', 12, 0, 146, '{\"bizUserId\": 1, \"processId\": 9910, \"bizTagCode\": \"9910\", \"bizUserName\": \"admin\", \"oldProcessId\": 9901, \"bizTagCodeType\": 4, \"handlerDeptIds\": \"231\", \"templateParams\": {\"time\": \"2022-10-28 11:06:41\", \"user\": \"admin\", \"duration\": \"12\", \"processName\": \"镭射\", \"materialCode\": \"VPC-001\", \"materialName\": \"VPC笔记本\"}, \"triggerActionTime\": \"2022-10-28 11:06:41\"}', NULL, NULL);
INSERT INTO `ding_message_timeout` VALUES (25, 'splitProcess', 'dispatchOrder', '2022-10-28 11:10:56', 12, 0, 147, '{\"bizUserId\": 1, \"processId\": 9911, \"bizTagCode\": \"9911\", \"bizUserName\": \"9001管理员\", \"oldProcessId\": 9902, \"bizTagCodeType\": 4, \"handlerDeptIds\": \"231\", \"templateParams\": {\"time\": \"2022-10-28 11:10:56\", \"user\": \"9001管理员\", \"duration\": \"12\", \"taskCode\": \"PO221028004\", \"processName\": \"节点3\", \"productCode\": \"VPC-001\", \"productName\": \"VPC笔记本\", \"materialCode\": \"VPC-001\", \"materialName\": \"VPC笔记本\"}, \"triggerActionTime\": \"2022-10-28 11:10:56\"}', NULL, NULL);
INSERT INTO `ding_message_timeout` VALUES (26, 'splitProcess', 'dispatchOrder', '2022-10-28 11:10:56', 12, 0, 148, '{\"bizUserId\": 1, \"processId\": 9912, \"bizTagCode\": \"9912\", \"bizUserName\": \"9001管理员\", \"oldProcessId\": 9902, \"bizTagCodeType\": 4, \"handlerDeptIds\": \"231\", \"templateParams\": {\"time\": \"2022-10-28 11:10:56\", \"user\": \"9001管理员\", \"duration\": \"12\", \"taskCode\": \"PO221028004\", \"processName\": \"节点2\", \"productCode\": \"VPC-001\", \"productName\": \"VPC笔记本\", \"materialCode\": \"VPC-001\", \"materialName\": \"VPC笔记本\"}, \"triggerActionTime\": \"2022-10-28 11:10:56\"}', NULL, NULL);
INSERT INTO `ding_message_timeout` VALUES (27, 'scheduleTask', 'splitProcess', '2022-10-28 11:18:13', 12, 0, 149, '{\"taskId\": 1815, \"bizUserId\": 1, \"processId\": 9917, \"bizTagCode\": \"9917\", \"bizUserName\": \"9001管理员\", \"bizTagCodeType\": 4, \"handlerDeptIds\": \"245\", \"handlerUserIds\": \"486\", \"templateParams\": {\"time\": \"2022-10-28 11:18:13\", \"user\": \"9001管理员\", \"duration\": \"12\", \"taskCode\": \"PO221028006-3\", \"processName\": \"电路焊接\", \"productCode\": \"VPC-CPU-001\", \"productName\": \"VPCCPU\", \"materialCode\": \"VPC-CPU-001\", \"materialName\": \"VPCCPU\"}, \"triggerActionTime\": \"2022-10-28 11:18:13\", \"schedulingPlanProcessId\": 1455}', NULL, NULL);
INSERT INTO `ding_message_timeout` VALUES (28, 'scheduleTask', 'dispatchOrder', '2022-10-28 11:18:13', 12, 0, 150, '{\"taskId\": 1815, \"bizUserId\": 1, \"processId\": 9917, \"bizTagCode\": \"9917\", \"bizUserName\": \"9001管理员\", \"bizTagCodeType\": 4, \"handlerDeptIds\": \"245\", \"handlerUserIds\": \"486\", \"templateParams\": {\"time\": \"2022-10-28 11:18:13\", \"user\": \"9001管理员\", \"duration\": \"12\", \"taskCode\": \"PO221028006-3\", \"processName\": \"电路焊接\", \"productCode\": \"VPC-CPU-001\", \"productName\": \"VPCCPU\", \"materialCode\": \"VPC-CPU-001\", \"materialName\": \"VPCCPU\"}, \"triggerActionTime\": \"2022-10-28 11:18:13\", \"schedulingPlanProcessId\": 1455}', NULL, NULL);
INSERT INTO `ding_message_timeout` VALUES (29, 'scheduleTask', 'splitProcess', '2022-10-28 11:18:13', 12, 0, 151, '{\"taskId\": 1815, \"bizUserId\": 1, \"processId\": 9918, \"bizTagCode\": \"9918\", \"bizUserName\": \"9001管理员\", \"bizTagCodeType\": 4, \"handlerDeptIds\": \"245\", \"handlerUserIds\": \"486\", \"templateParams\": {\"time\": \"2022-10-28 11:18:14\", \"user\": \"9001管理员\", \"duration\": \"12\", \"taskCode\": \"PO221028006-3\", \"processName\": \"编程\", \"productCode\": \"VPC-CPU-001\", \"productName\": \"VPCCPU\", \"materialCode\": \"VPC-CPU-001\", \"materialName\": \"VPCCPU\"}, \"triggerActionTime\": \"2022-10-28 11:18:13\", \"schedulingPlanProcessId\": 1456}', NULL, NULL);
INSERT INTO `ding_message_timeout` VALUES (30, 'scheduleTask', 'dispatchOrder', '2022-10-28 11:18:13', 12, 0, 152, '{\"taskId\": 1815, \"bizUserId\": 1, \"processId\": 9918, \"bizTagCode\": \"9918\", \"bizUserName\": \"9001管理员\", \"bizTagCodeType\": 4, \"handlerDeptIds\": \"245\", \"handlerUserIds\": \"486\", \"templateParams\": {\"time\": \"2022-10-28 11:18:14\", \"user\": \"9001管理员\", \"duration\": \"12\", \"taskCode\": \"PO221028006-3\", \"processName\": \"编程\", \"productCode\": \"VPC-CPU-001\", \"productName\": \"VPCCPU\", \"materialCode\": \"VPC-CPU-001\", \"materialName\": \"VPCCPU\"}, \"triggerActionTime\": \"2022-10-28 11:18:13\", \"schedulingPlanProcessId\": 1456}', NULL, NULL);
INSERT INTO `ding_message_timeout` VALUES (31, 'scheduleTask', 'splitProcess', '2022-10-28 11:22:42', 12, 0, 153, '{\"taskId\": 1816, \"bizUserId\": 1, \"processId\": 9921, \"bizTagCode\": \"9921\", \"bizUserName\": \"9001管理员\", \"bizTagCodeType\": 4, \"handlerDeptIds\": \"244\", \"handlerUserIds\": \"\", \"templateParams\": {\"time\": \"2022-10-28 11:22:42\", \"user\": \"9001管理员\", \"duration\": \"12\", \"taskCode\": \"PO221028007\", \"processName\": \"安装风扇\", \"productCode\": \"VPC-001\", \"productName\": \"VPC笔记本\", \"materialCode\": \"VPC-001\", \"materialName\": \"VPC笔记本\"}, \"triggerActionTime\": \"2022-10-28 11:22:42\", \"schedulingPlanProcessId\": 1459}', NULL, NULL);
INSERT INTO `ding_message_timeout` VALUES (32, 'scheduleTask', 'splitProcess', '2022-10-28 11:22:42', 12, 0, 154, '{\"taskId\": 1816, \"bizUserId\": 1, \"processId\": 9920, \"bizTagCode\": \"9920\", \"bizUserName\": \"9001管理员\", \"bizTagCodeType\": 4, \"handlerDeptIds\": \"244\", \"handlerUserIds\": \"\", \"templateParams\": {\"time\": \"2022-10-28 11:22:42\", \"user\": \"9001管理员\", \"duration\": \"12\", \"taskCode\": \"PO221028007\", \"processName\": \"安装硬盘\", \"productCode\": \"VPC-001\", \"productName\": \"VPC笔记本\", \"materialCode\": \"VPC-001\", \"materialName\": \"VPC笔记本\"}, \"triggerActionTime\": \"2022-10-28 11:22:42\", \"schedulingPlanProcessId\": 1458}', NULL, NULL);
INSERT INTO `ding_message_timeout` VALUES (33, 'scheduleTask', 'dispatchOrder', '2022-10-28 11:22:42', 12, 0, 155, '{\"taskId\": 1816, \"bizUserId\": 1, \"processId\": 9922, \"bizTagCode\": \"9922\", \"bizUserName\": \"9001管理员\", \"bizTagCodeType\": 4, \"handlerDeptIds\": \"244\", \"handlerUserIds\": \"\", \"templateParams\": {\"time\": \"2022-10-28 11:22:43\", \"user\": \"9001管理员\", \"duration\": \"12\", \"taskCode\": \"PO221028007\", \"processName\": \"安装软件\", \"productCode\": \"VPC-001\", \"productName\": \"VPC笔记本\", \"materialCode\": \"VPC-001\", \"materialName\": \"VPC笔记本\"}, \"triggerActionTime\": \"2022-10-28 11:22:42\", \"schedulingPlanProcessId\": 1460}', NULL, NULL);
INSERT INTO `ding_message_timeout` VALUES (34, 'scheduleTask', 'splitProcess', '2022-10-28 11:22:42', 12, 0, 156, '{\"taskId\": 1816, \"bizUserId\": 1, \"processId\": 9919, \"bizTagCode\": \"9919\", \"bizUserName\": \"9001管理员\", \"bizTagCodeType\": 4, \"handlerDeptIds\": \"244\", \"handlerUserIds\": \"\", \"templateParams\": {\"time\": \"2022-10-28 11:22:43\", \"user\": \"9001管理员\", \"duration\": \"12\", \"taskCode\": \"PO221028007\", \"processName\": \"安装主板\", \"productCode\": \"VPC-001\", \"productName\": \"VPC笔记本\", \"materialCode\": \"VPC-001\", \"materialName\": \"VPC笔记本\"}, \"triggerActionTime\": \"2022-10-28 11:22:42\", \"schedulingPlanProcessId\": 1457}', NULL, NULL);
INSERT INTO `ding_message_timeout` VALUES (35, 'dispatchOrder', 'createReport', '2022-10-28 11:26:13', 12, 0, 157, '{\"orderId\": 2351, \"bizUserId\": 1, \"processId\": 9919, \"bizTagCode\": \"2351\", \"bizUserName\": \"9001管理员\", \"bizTagCodeType\": 5, \"handlerDeptIds\": \"244\", \"templateParams\": {\"time\": \"2022-10-28 11:26:13\", \"user\": \"9001管理员\", \"orderId\": \"2351\", \"duration\": \"12\", \"taskCode\": \"PO221028007\", \"processName\": \"安装主板\", \"productCode\": \"VPC-001\", \"productName\": \"VPC笔记本\", \"materialCode\": \"VPC-001\", \"materialName\": \"VPC笔记本\"}, \"triggerActionTime\": \"2022-10-28 11:26:13\"}', NULL, NULL);
INSERT INTO `ding_message_timeout` VALUES (36, 'dispatchOrder', 'createReport', '2022-10-28 11:26:22', 12, 0, 158, '{\"orderId\": 2352, \"bizUserId\": 1, \"processId\": 9927, \"bizTagCode\": \"2352\", \"bizUserName\": \"9001管理员\", \"bizTagCodeType\": 5, \"handlerDeptIds\": \"237\", \"templateParams\": {\"time\": \"2022-10-28 11:26:22\", \"user\": \"9001管理员\", \"orderId\": \"2352\", \"duration\": \"12\", \"taskCode\": \"PO221028007\", \"processName\": \"修补\", \"productCode\": \"VPC-001\", \"productName\": \"VPC笔记本\", \"materialCode\": \"VPC-001\", \"materialName\": \"VPC笔记本\"}, \"triggerActionTime\": \"2022-10-28 11:26:22\"}', NULL, NULL);
INSERT INTO `ding_message_timeout` VALUES (37, 'dispatchOrder', 'createReport', '2022-10-28 11:29:23', 12, 0, 159, '{\"orderId\": 2353, \"bizUserId\": 1, \"processId\": 9927, \"bizTagCode\": \"2353\", \"bizUserName\": \"9001管理员\", \"bizTagCodeType\": 5, \"handlerDeptIds\": \"237\", \"templateParams\": {\"time\": \"2022-10-28 11:29:23\", \"user\": \"9001管理员\", \"orderId\": \"2353\", \"duration\": \"12\", \"taskCode\": \"PO221028007\", \"processName\": \"修补\", \"productCode\": \"VPC-001\", \"productName\": \"VPC笔记本\", \"materialCode\": \"VPC-001\", \"materialName\": \"VPC笔记本\"}, \"triggerActionTime\": \"2022-10-28 11:29:23\"}', NULL, NULL);
INSERT INTO `ding_message_timeout` VALUES (38, 'dispatchOrder', 'createReport', '2022-10-28 11:29:23', 12, 0, 160, '{\"orderId\": 2354, \"bizUserId\": 1, \"processId\": 9921, \"bizTagCode\": \"2354\", \"bizUserName\": \"9001管理员\", \"bizTagCodeType\": 5, \"handlerDeptIds\": \"244\", \"templateParams\": {\"time\": \"2022-10-28 11:29:23\", \"user\": \"9001管理员\", \"orderId\": \"2354\", \"duration\": \"12\", \"taskCode\": \"PO221028007\", \"processName\": \"安装风扇\", \"productCode\": \"VPC-001\", \"productName\": \"VPC笔记本\", \"materialCode\": \"VPC-001\", \"materialName\": \"VPC笔记本\"}, \"triggerActionTime\": \"2022-10-28 11:29:23\"}', NULL, NULL);
INSERT INTO `ding_message_timeout` VALUES (39, 'dispatchOrder', 'createReport', '2022-10-28 11:30:16', 12, 0, 161, '{\"orderId\": 2355, \"bizUserId\": 1, \"processId\": 9919, \"bizTagCode\": \"2355\", \"bizUserName\": \"9001管理员\", \"bizTagCodeType\": 5, \"handlerDeptIds\": \"244\", \"handlerUserIds\": \"486\", \"templateParams\": {\"time\": \"2022-10-28 11:30:16\", \"user\": \"9001管理员\", \"orderId\": \"2355\", \"duration\": \"12\", \"taskCode\": \"PO221028007\", \"processName\": \"安装主板\", \"productCode\": \"VPC-001\", \"productName\": \"VPC笔记本\", \"materialCode\": \"VPC-001\", \"materialName\": \"VPC笔记本\"}, \"triggerActionTime\": \"2022-10-28 11:30:16\"}', NULL, NULL);
INSERT INTO `ding_message_timeout` VALUES (40, 'dispatchOrder', 'createReport', '2022-10-28 11:30:16', 12, 0, 162, '{\"orderId\": 2356, \"bizUserId\": 1, \"processId\": 9920, \"bizTagCode\": \"2356\", \"bizUserName\": \"9001管理员\", \"bizTagCodeType\": 5, \"handlerDeptIds\": \"244\", \"handlerUserIds\": \"486\", \"templateParams\": {\"time\": \"2022-10-28 11:30:16\", \"user\": \"9001管理员\", \"orderId\": \"2356\", \"duration\": \"12\", \"taskCode\": \"PO221028007\", \"processName\": \"安装硬盘\", \"productCode\": \"VPC-001\", \"productName\": \"VPC笔记本\", \"materialCode\": \"VPC-001\", \"materialName\": \"VPC笔记本\"}, \"triggerActionTime\": \"2022-10-28 11:30:16\"}', NULL, NULL);
INSERT INTO `ding_message_timeout` VALUES (41, 'dispatchOrder', 'createReport', '2022-10-28 11:30:18', 12, 0, 163, '{\"orderId\": 2357, \"bizUserId\": 1, \"processId\": 9921, \"bizTagCode\": \"2357\", \"bizUserName\": \"9001管理员\", \"bizTagCodeType\": 5, \"handlerDeptIds\": \"244\", \"handlerUserIds\": \"486\", \"templateParams\": {\"time\": \"2022-10-28 11:30:18\", \"user\": \"9001管理员\", \"orderId\": \"2357\", \"duration\": \"12\", \"taskCode\": \"PO221028007\", \"processName\": \"安装风扇\", \"productCode\": \"VPC-001\", \"productName\": \"VPC笔记本\", \"materialCode\": \"VPC-001\", \"materialName\": \"VPC笔记本\"}, \"triggerActionTime\": \"2022-10-28 11:30:18\"}', NULL, NULL);
INSERT INTO `ding_message_timeout` VALUES (42, 'dispatchOrder', 'createReport', '2022-10-28 11:30:18', 12, 0, 164, '{\"orderId\": 2358, \"bizUserId\": 1, \"processId\": 9927, \"bizTagCode\": \"2358\", \"bizUserName\": \"9001管理员\", \"bizTagCodeType\": 5, \"handlerDeptIds\": \"237\", \"handlerUserIds\": \"486\", \"templateParams\": {\"time\": \"2022-10-28 11:30:18\", \"user\": \"9001管理员\", \"orderId\": \"2358\", \"duration\": \"12\", \"taskCode\": \"PO221028007\", \"processName\": \"修补\", \"productCode\": \"VPC-001\", \"productName\": \"VPC笔记本\", \"materialCode\": \"VPC-001\", \"materialName\": \"VPC笔记本\"}, \"triggerActionTime\": \"2022-10-28 11:30:18\"}', NULL, NULL);
INSERT INTO `ding_message_timeout` VALUES (43, 'dispatchOrder', 'createReport', '2022-10-28 11:30:19', 12, 0, 165, '{\"orderId\": 2359, \"bizUserId\": 1, \"processId\": 9928, \"bizTagCode\": \"2359\", \"bizUserName\": \"9001管理员\", \"bizTagCodeType\": 5, \"handlerDeptIds\": \"239\", \"handlerUserIds\": \"486\", \"templateParams\": {\"time\": \"2022-10-28 11:30:19\", \"user\": \"9001管理员\", \"orderId\": \"2359\", \"duration\": \"12\", \"taskCode\": \"PO221028007\", \"processName\": \"彩绘\", \"productCode\": \"VPC-001\", \"productName\": \"VPC笔记本\", \"materialCode\": \"VPC-001\", \"materialName\": \"VPC笔记本\"}, \"triggerActionTime\": \"2022-10-28 11:30:19\"}', NULL, NULL);
INSERT INTO `ding_message_timeout` VALUES (44, 'dispatchOrder', 'createReport', '2022-10-28 11:39:14', 12, 0, 166, '{\"orderId\": 2360, \"bizUserId\": 1, \"processId\": 9927, \"bizTagCode\": \"2360\", \"bizUserName\": \"9001管理员\", \"bizTagCodeType\": 5, \"handlerDeptIds\": \"237\", \"templateParams\": {\"time\": \"2022-10-28 11:39:14\", \"user\": \"9001管理员\", \"orderId\": \"2360\", \"duration\": \"12\", \"taskCode\": \"PO221028007\", \"processName\": \"修补\", \"productCode\": \"VPC-001\", \"productName\": \"VPC笔记本\", \"materialCode\": \"VPC-001\", \"materialName\": \"VPC笔记本\"}, \"triggerActionTime\": \"2022-10-28 11:39:14\"}', NULL, NULL);
INSERT INTO `ding_message_timeout` VALUES (45, 'scheduleTask', 'splitProcess', '2022-10-30 16:36:11', 50, 0, 156, '{\"taskId\": 1820, \"bizUserId\": 1, \"processId\": 9935, \"bizTagCode\": \"9935\", \"bizUserName\": \"9001管理员\", \"bizTagCodeType\": 4, \"handlerDeptIds\": \"244\", \"handlerUserIds\": \"\", \"templateParams\": {\"time\": \"2022-10-30 16:36:11\", \"user\": \"9001管理员\", \"duration\": \"50\", \"taskCode\": \"PO221030002\", \"processName\": \"安装主板\", \"productCode\": \"VPC-001\", \"productName\": \"VPC笔记本\", \"materialCode\": \"VPC-001\", \"materialName\": \"VPC笔记本\"}, \"triggerActionTime\": \"2022-10-30 16:36:11\", \"schedulingPlanProcessId\": 1463}', NULL, NULL);
INSERT INTO `ding_message_timeout` VALUES (46, 'scheduleTask', 'splitProcess', '2022-10-30 16:36:11', 50, 0, 157, '{\"taskId\": 1820, \"bizUserId\": 1, \"processId\": 9936, \"bizTagCode\": \"9936\", \"bizUserName\": \"9001管理员\", \"bizTagCodeType\": 4, \"handlerDeptIds\": \"244\", \"handlerUserIds\": \"\", \"templateParams\": {\"time\": \"2022-10-30 16:36:11\", \"user\": \"9001管理员\", \"duration\": \"50\", \"taskCode\": \"PO221030002\", \"processName\": \"安装硬盘\", \"productCode\": \"VPC-001\", \"productName\": \"VPC笔记本\", \"materialCode\": \"VPC-001\", \"materialName\": \"VPC笔记本\"}, \"triggerActionTime\": \"2022-10-30 16:36:11\", \"schedulingPlanProcessId\": 1464}', NULL, NULL);
INSERT INTO `ding_message_timeout` VALUES (47, 'scheduleTask', 'splitProcess', '2022-10-30 16:36:11', 50, 0, 158, '{\"taskId\": 1820, \"bizUserId\": 1, \"processId\": 9937, \"bizTagCode\": \"9937\", \"bizUserName\": \"9001管理员\", \"bizTagCodeType\": 4, \"handlerDeptIds\": \"244\", \"handlerUserIds\": \"\", \"templateParams\": {\"time\": \"2022-10-30 16:36:11\", \"user\": \"9001管理员\", \"duration\": \"50\", \"taskCode\": \"PO221030002\", \"processName\": \"安装风扇\", \"productCode\": \"VPC-001\", \"productName\": \"VPC笔记本\", \"materialCode\": \"VPC-001\", \"materialName\": \"VPC笔记本\"}, \"triggerActionTime\": \"2022-10-30 16:36:11\", \"schedulingPlanProcessId\": 1465}', NULL, NULL);
INSERT INTO `ding_message_timeout` VALUES (48, 'scheduleTask', 'splitProcess', '2022-10-30 16:36:12', 50, 0, 159, '{\"taskId\": 1820, \"bizUserId\": 1, \"processId\": 9938, \"bizTagCode\": \"9938\", \"bizUserName\": \"9001管理员\", \"bizTagCodeType\": 4, \"handlerDeptIds\": \"244\", \"handlerUserIds\": \"\", \"templateParams\": {\"time\": \"2022-10-30 16:36:12\", \"user\": \"9001管理员\", \"duration\": \"50\", \"taskCode\": \"PO221030002\", \"processName\": \"安装软件\", \"productCode\": \"VPC-001\", \"productName\": \"VPC笔记本\", \"materialCode\": \"VPC-001\", \"materialName\": \"VPC笔记本\"}, \"triggerActionTime\": \"2022-10-30 16:36:12\", \"schedulingPlanProcessId\": 1466}', NULL, NULL);
INSERT INTO `ding_message_timeout` VALUES (49, 'scheduleTask', 'splitProcess', '2022-10-30 16:36:12', 50, 0, 160, '{\"taskId\": 1821, \"bizUserId\": 1, \"processId\": 9939, \"bizTagCode\": \"9939\", \"bizUserName\": \"9001管理员\", \"bizTagCodeType\": 4, \"handlerDeptIds\": \"245\", \"handlerUserIds\": \"486\", \"templateParams\": {\"time\": \"2022-10-30 16:36:12\", \"user\": \"9001管理员\", \"duration\": \"50\", \"taskCode\": \"PO221030002-3\", \"processName\": \"电路焊接\", \"productCode\": \"VPC-CPU-001\", \"productName\": \"VPCCPU\", \"materialCode\": \"VPC-CPU-001\", \"materialName\": \"VPCCPU\"}, \"triggerActionTime\": \"2022-10-30 16:36:12\", \"schedulingPlanProcessId\": 1467}', NULL, NULL);
INSERT INTO `ding_message_timeout` VALUES (50, 'scheduleTask', 'splitProcess', '2022-10-30 16:36:12', 50, 0, 161, '{\"taskId\": 1821, \"bizUserId\": 1, \"processId\": 9940, \"bizTagCode\": \"9940\", \"bizUserName\": \"9001管理员\", \"bizTagCodeType\": 4, \"handlerDeptIds\": \"245\", \"handlerUserIds\": \"486\", \"templateParams\": {\"time\": \"2022-10-30 16:36:12\", \"user\": \"9001管理员\", \"duration\": \"50\", \"taskCode\": \"PO221030002-3\", \"processName\": \"编程\", \"productCode\": \"VPC-CPU-001\", \"productName\": \"VPCCPU\", \"materialCode\": \"VPC-CPU-001\", \"materialName\": \"VPCCPU\"}, \"triggerActionTime\": \"2022-10-30 16:36:12\", \"schedulingPlanProcessId\": 1468}', NULL, NULL);
INSERT INTO `ding_message_timeout` VALUES (51, 'scheduleTask', 'splitProcess', '2022-10-30 16:36:12', 50, 0, 162, '{\"taskId\": 1818, \"bizUserId\": 1, \"processId\": 9929, \"bizTagCode\": \"9929\", \"bizUserName\": \"9001管理员\", \"bizTagCodeType\": 4, \"handlerDeptIds\": \"244\", \"handlerUserIds\": \"\", \"templateParams\": {\"time\": \"2022-10-30 16:36:12\", \"user\": \"9001管理员\", \"duration\": \"50\", \"taskCode\": \"PO221030001\", \"processName\": \"安装主板\", \"productCode\": \"VPC-001\", \"productName\": \"VPC笔记本\", \"materialCode\": \"VPC-001\", \"materialName\": \"VPC笔记本\"}, \"triggerActionTime\": \"2022-10-30 16:36:12\", \"schedulingPlanProcessId\": 1469}', NULL, NULL);
INSERT INTO `ding_message_timeout` VALUES (52, 'scheduleTask', 'splitProcess', '2022-10-30 16:36:12', 50, 0, 163, '{\"taskId\": 1818, \"bizUserId\": 1, \"processId\": 9930, \"bizTagCode\": \"9930\", \"bizUserName\": \"9001管理员\", \"bizTagCodeType\": 4, \"handlerDeptIds\": \"244\", \"handlerUserIds\": \"\", \"templateParams\": {\"time\": \"2022-10-30 16:36:12\", \"user\": \"9001管理员\", \"duration\": \"50\", \"taskCode\": \"PO221030001\", \"processName\": \"安装硬盘\", \"productCode\": \"VPC-001\", \"productName\": \"VPC笔记本\", \"materialCode\": \"VPC-001\", \"materialName\": \"VPC笔记本\"}, \"triggerActionTime\": \"2022-10-30 16:36:12\", \"schedulingPlanProcessId\": 1470}', NULL, NULL);
INSERT INTO `ding_message_timeout` VALUES (53, 'scheduleTask', 'splitProcess', '2022-10-30 16:36:12', 50, 0, 164, '{\"taskId\": 1818, \"bizUserId\": 1, \"processId\": 9931, \"bizTagCode\": \"9931\", \"bizUserName\": \"9001管理员\", \"bizTagCodeType\": 4, \"handlerDeptIds\": \"244\", \"handlerUserIds\": \"\", \"templateParams\": {\"time\": \"2022-10-30 16:36:12\", \"user\": \"9001管理员\", \"duration\": \"50\", \"taskCode\": \"PO221030001\", \"processName\": \"安装风扇\", \"productCode\": \"VPC-001\", \"productName\": \"VPC笔记本\", \"materialCode\": \"VPC-001\", \"materialName\": \"VPC笔记本\"}, \"triggerActionTime\": \"2022-10-30 16:36:12\", \"schedulingPlanProcessId\": 1471}', NULL, NULL);
INSERT INTO `ding_message_timeout` VALUES (54, 'scheduleTask', 'splitProcess', '2022-10-30 16:36:12', 50, 0, 165, '{\"taskId\": 1818, \"bizUserId\": 1, \"processId\": 9932, \"bizTagCode\": \"9932\", \"bizUserName\": \"9001管理员\", \"bizTagCodeType\": 4, \"handlerDeptIds\": \"244\", \"handlerUserIds\": \"\", \"templateParams\": {\"time\": \"2022-10-30 16:36:12\", \"user\": \"9001管理员\", \"duration\": \"50\", \"taskCode\": \"PO221030001\", \"processName\": \"安装软件\", \"productCode\": \"VPC-001\", \"productName\": \"VPC笔记本\", \"materialCode\": \"VPC-001\", \"materialName\": \"VPC笔记本\"}, \"triggerActionTime\": \"2022-10-30 16:36:12\", \"schedulingPlanProcessId\": 1472}', NULL, NULL);
INSERT INTO `ding_message_timeout` VALUES (55, 'scheduleTask', 'splitProcess', '2022-10-30 16:36:12', 50, 0, 166, '{\"taskId\": 1819, \"bizUserId\": 1, \"processId\": 9933, \"bizTagCode\": \"9933\", \"bizUserName\": \"9001管理员\", \"bizTagCodeType\": 4, \"handlerDeptIds\": \"245\", \"handlerUserIds\": \"486\", \"templateParams\": {\"time\": \"2022-10-30 16:36:12\", \"user\": \"9001管理员\", \"duration\": \"50\", \"taskCode\": \"PO221030001-3\", \"processName\": \"电路焊接\", \"productCode\": \"VPC-CPU-001\", \"productName\": \"VPCCPU\", \"materialCode\": \"VPC-CPU-001\", \"materialName\": \"VPCCPU\"}, \"triggerActionTime\": \"2022-10-30 16:36:12\", \"schedulingPlanProcessId\": 1473}', NULL, NULL);
INSERT INTO `ding_message_timeout` VALUES (56, 'scheduleTask', 'splitProcess', '2022-10-30 16:36:13', 50, 0, 167, '{\"taskId\": 1819, \"bizUserId\": 1, \"processId\": 9934, \"bizTagCode\": \"9934\", \"bizUserName\": \"9001管理员\", \"bizTagCodeType\": 4, \"handlerDeptIds\": \"245\", \"handlerUserIds\": \"486\", \"templateParams\": {\"time\": \"2022-10-30 16:36:13\", \"user\": \"9001管理员\", \"duration\": \"50\", \"taskCode\": \"PO221030001-3\", \"processName\": \"编程\", \"productCode\": \"VPC-CPU-001\", \"productName\": \"VPCCPU\", \"materialCode\": \"VPC-CPU-001\", \"materialName\": \"VPCCPU\"}, \"triggerActionTime\": \"2022-10-30 16:36:13\", \"schedulingPlanProcessId\": 1474}', NULL, NULL);
INSERT INTO `ding_message_timeout` VALUES (57, 'createTask', 'scheduleTask', '2022-10-30 16:37:04', 1, 0, 168, '{\"bizUserId\": 1, \"bizTagCode\": \"1822\", \"expireTime\": \"2022-10-31\", \"bizUserName\": \"admin\", \"bizTagCodeType\": 1, \"templateParams\": {\"time\": \"2022-10-30 16:37:04\", \"user\": \"admin\", \"duration\": \"1\", \"taskCode\": \"PO221030003\", \"productCode\": \"VPC-001\", \"productName\": \"VPC笔记本\"}, \"triggerActionTime\": \"2022-10-30 16:37:04\"}', NULL, NULL);
INSERT INTO `ding_message_timeout` VALUES (58, 'createTask', 'scheduleTask', '2022-10-30 16:37:05', 1, 0, 169, '{\"bizUserId\": 1, \"bizTagCode\": \"1823\", \"expireTime\": \"2022-10-31\", \"bizUserName\": \"admin\", \"bizTagCodeType\": 1, \"templateParams\": {\"time\": \"2022-10-30 16:37:05\", \"user\": \"admin\", \"duration\": \"1\", \"taskCode\": \"PO221030003-3\", \"productCode\": \"VPC-CPU-001\", \"productName\": \"VPCCPU\"}, \"triggerActionTime\": \"2022-10-30 16:37:05\"}', NULL, NULL);

 查询数据

SQL函数 CONVERT

将给定表达式转换为指定数据类型的函数。

CONVERT(datatype,expression[,format-code])

{fn CONVERT(expression,datatype)}

格式 :CONVERT(data_type,expression_r_r[,style])

CONVERT(字段,转换的类型)

SQL指令— TRIM函数

SQL 中的 TRIM 函数是用来移除掉一个字串中的字头或字尾。最常见的用途是移除字首或字尾的空白。这个函数在不同的资料库中有不同的名称:

MySQL: TRIM(), RTRIM(), LTRIM()
Oracle: RTRIM(), LTRIM()
SQL Server: RTRIM(), LTRIM()

TRIM([[位置] [要移除的字串] FROM ] 字串): [位置] 的可能值为 LEADING (起头), TRAILING (结尾), or BOTH (起头及结尾)。 这个函数将把 [要移除的字串] 从字串的起头、结尾,或是起头及结尾移除。如果我们没有列出 [要移除的字串] 是什么的话,那空白就会被移除。

        SELECT mt.id,mt.after_trigger_action,mt.trigger_action,duration ,
        CONVERT( biz_params_json ->'$."bizUserId"' ,SIGNED ) as bizUserId,
        TRIM(BOTH '"'  from biz_params_json ->'$."processId"' ) as processId,
        CONVERT( biz_params_json ->'$."oldProcessId"',SIGNED ) as oldProcessId,
        TRIM(BOTH '"'  from biz_params_json ->'$."templateParams"."taskCode"' ) as taskCode,
        TRIM(BOTH '"'  from biz_params_json ->'$."templateParams"."productCode"') as productCode,
        TRIM(BOTH '"'  from biz_params_json ->'$."templateParams"."productName"' ) as productName,
        TRIM(BOTH '"'  from biz_params_json ->'$."templateParams"."materialCode"') as materialCode,
        TRIM(BOTH '"'  from biz_params_json ->'$."templateParams"."materialName"') as materialName,
        TRIM(BOTH '"'  from biz_params_json ->'$."templateParams"."processName"') as processName,
				CONVERT(biz_params_json ->'$."templateParams"."orderId"' ,SIGNED) as orderId,
        TRIM(BOTH '"'  from biz_params_json ->'$."templateParams"."time"') as `time`,
        TRIM(BOTH '"'  from biz_params_json ->'$."templateParams"."user"') as `user`,
        TRIM(BOTH '"'  from biz_params_json ->'$."templateParams"."node"') as node,
        TRIM(BOTH '"'  from biz_params_json ->'$."templateParams"."deliveryDate"') as deliveryDate,


       biz_params_json,biz_tag_code,biz_tag_code_type
        FROM ding_message_timeout mt

扩充增加where条件

        <where>
           <if test="bizTagCode !=null and bizTagCode!='' ">and bizTagCode=#{bizTagCode}</if>
           <if test="type !=null and type!='' ">and mw.type=#{type}</if>
            <if test="beginTime != null and beginTime != ''"><!-- 开始时间检索 -->AND date_format(mw.send_time,'%y%m%d') &gt;= date_format(#{beginTime},'%y%m%d')</if>
            <if test="endTime != null and endTime != ''"><!-- 结束时间检索 -->AND date_format(mw.send_time,'%y%m%d') &lt;= date_format(#{endTime},'%y%m%d')</if>
            <if test="taskCode !=null and taskCode!='' ">and  biz_params_json ->'$."templateParams"."taskCode"' LIKE concat('%',#{taskCode},'%')</if>
           <if test="productCode !=null and productCode!='' ">and  biz_params_json ->'$."templateParams"."productCode"' LIKE concat('%',#{productCode},'%')</if>
           <if test="productName !=null and productName!='' ">and  biz_params_json ->'$."templateParams"."productName"' LIKE concat('%',#{productName},'%')</if>
           <if test="materialCode !=null and materialCode!='' ">and  biz_params_json ->'$."templateParams"."materialCode"' LIKE concat('%',#{materialCode},'%')</if>
           <if test="materialName !=null and materialName!='' ">and  biz_params_json ->'$."templateParams"."materialName"' LIKE concat('%',#{materialName},'%')</if>
            <if test="deptId != null"> and pl.dept_id in(SELECT dept_id FROM sys_dept WHERE dept_id = #{deptId} or find_in_set(#{deptId}, ancestors ))</if>

        </where>

2、MyBatis中一对多到多对多查询

collection

作用:在Mybaits中collection标签是用来实现连表查询的。
使用的场景:collection的使用场景为1:n和n:n两种情况。
添加的内容:使用collection的时候需要在类中添加关联集合(查询哪个类就在哪个类中添加)

接口mapper层

package com.ruoyi.project.ding.mapper;

import com.ruoyi.project.ding.domain.DingMessageRule;

public interface DingMessageRuleMapper2 {


    /**
     * 查看消息规则配置详情
     * @param id
     * @return
     */
    public DingMessageRule selectMessageRuleInfo(Long id);
    
}

mybatis层

<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.ruoyi.project.ding.mapper.DingMessageRuleMapper">

    <resultMap id="MessageRuleResultInfo" type="com.ruoyi.project.ding.domain.DingMessageRule">
        <result property="id" column="id"/>
        <result property="type" column="type"/>
        <result property="status" column="status"/>
        <result property="action" column="action"/>
        <result property="triggerAction" column="trigger_action"/>
        <result property="afterTriggerAction" column="after_trigger_action"/>
        <result property="duration" column="duration"/>
        <result property="url" column="url"/>
        <result property="title" column="title"/>
        <result property="template" column="template"/>
        <result property="createTime" column="create_time"/>
        <result property="createBy" column="create_by"/>
        <result property="updateTime" column="update_time"/>
        <result property="updateBy" column="update_by"/>
        <collection property="receiveRuleList"  ofType="DingMessageReceiveRule" column="id" select="selectReceiveRuleList"/>
    </resultMap>
    <resultMap id="MessageReceiveRuleResult" type="DingMessageReceiveRule">
        <result property="id" column="id"/>
        <result property="messageRuleId" column="message_rule_id"/>
        <result property="firstRange" column="first_range"/>
        <result property="firstIds" column="first_ids"/>
        <result property="firstNames" column="first_names"/>
        <result property="secondRange" column="second_range"/>
        <result property="secondIds" column="second_ids"/>
        <result property="secondNames" column="second_names"/>
        <collection property="nameList"  ofType="DingMessageReceiveRuleNameVo" column="id" select="selectReceiveName"/>
    </resultMap>
    <resultMap id="MessageReceiveRuleName" type="DingMessageReceiveRuleNameVo">
        <result property="id" column="id"/>
        <result property="messageRuleId" column="message_rule_id"/>
        <result property="firstRange" column="first_range"/>
        <result property="firstIds" column="first_ids"/>
        <result property="firstName" column="first_name"/>
        <result property="firstId" column="first_id"/>
        <result property="secondRange" column="second_range"/>
        <result property="secondIds" column="second_ids"/>
        <result property="secondName" column="second_name"/>
    </resultMap>

    <sql id="selectMessageRuleVo">
        SELECT `id`,`type`,`status`,trigger_action,after_trigger_action,duration,url,title,template,create_time,create_by,update_time,update_by
        FROM ding_message_rule
    </sql>

    <select id="selectMessageRuleInfo" resultMap="MessageRuleResultInfo">
        <include refid="selectMessageRuleVo"/>
        where id =#{id}
    </select>
    <select id="selectReceiveRuleList" resultMap="MessageReceiveRuleResult">
        SELECT id,message_rule_id,first_range,first_ids,second_range,second_ids,
               (CASE
                    WHEN (first_range=1 and FIND_IN_SET('-2',first_ids)=1) THEN
                        CONCAT('执行部门,',(SELECT GROUP_CONCAT(dept_name) from sys_dept WHERE FIND_IN_SET(dept_id,first_ids)))
                    WHEN first_range=1 THEN
                        (SELECT GROUP_CONCAT(dept_name) from sys_dept WHERE FIND_IN_SET(dept_id,first_ids))
                    WHEN (first_range=2  and FIND_IN_SET('-2',first_ids)=1) THEN
                        CONCAT('执行人,',(SELECT GROUP_CONCAT(nick_name) from sys_user WHERE FIND_IN_SET(user_id,first_ids)))
                    WHEN first_range=2 THEN
                        (SELECT GROUP_CONCAT(nick_name) from sys_user WHERE FIND_IN_SET(user_id,first_ids))
                   END) as first_names,
               (CASE
                    WHEN second_range=2 THEN
                        (SELECT GROUP_CONCAT(role_name) FROM sys_role WHERE FIND_IN_SET(role_id,second_ids))
                    WHEN second_range=3 THEN
                        (SELECT GROUP_CONCAT(post_name) FROM sys_post WHERE FIND_IN_SET(post_id,second_ids))
                   END) as second_names

        FROM ding_message_receive_rule
        WHERE message_rule_id = #{id}
    </select>
    <select id="selectReceiveName" resultMap="MessageReceiveRuleName">
        SELECT DISTINCT x.*
        from ( SELECT rr.id,rr.message_rule_id,first_range,first_ids,

                      if(FIND_IN_SET('-2',first_ids) and u.nick_name is NULL and first_range=1,'执行部门',u.nick_name)  first_name,
                      if(FIND_IN_SET('-2',first_ids) and u.user_id is NULL and first_range=1,'-2',u.user_id) as first_id,
                      null as second_name,

                      second_range,second_ids
               FROM ding_message_receive_rule rr
                        LEFT JOIN  sys_user u  ON (u.del_flag=0 and first_range=2 and FIND_IN_SET(u.user_id,rr.first_ids))
               WHERE rr.id =#{id}

               UNION
               SELECT rr.id,rr.message_rule_id,first_range,first_ids,

                      if(FIND_IN_SET('-2',first_ids) and d.dept_name is NULL and first_range=2,'执行人',d.dept_name) as first_name ,
                      if(FIND_IN_SET('-2',first_ids) and d.dept_id is NULL and first_range=1,'-2',d.dept_id) as first_id,
                      if(second_range =2 ,r.role_name,p.post_name) second_name,

                      second_range,second_ids
               FROM ding_message_receive_rule rr
                        LEFT JOIN  sys_dept d  ON (d.del_flag=0 and first_range=1 and FIND_IN_SET(d.dept_id,rr.first_ids))
                        LEFT JOIN  sys_role  r on (r.del_flag=0 and first_range=1 and second_range =2  and FIND_IN_SET(r.role_id,rr.second_ids))
                        LEFT JOIN  sys_post  p on ( first_range=1 and second_range =3  and FIND_IN_SET(p.post_id,rr.second_ids))
               WHERE rr.id =#{id}) as x
        where x.first_name is not null
        ;

    </select>
</mapper>

1

  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值