diff --git a/.github b/.github new file mode 100644 index 00000000..8b137891 --- /dev/null +++ b/.github @@ -0,0 +1 @@ + diff --git a/eladmin-system/src/main/resources/config/application.yml b/eladmin-system/src/main/resources/config/application.yml index 7190fcc8..71191c41 100644 --- a/eladmin-system/src/main/resources/config/application.yml +++ b/eladmin-system/src/main/resources/config/application.yml @@ -64,7 +64,7 @@ task: queue-capacity: 50 # Qiniu Cloud -qiniu: +s3: # File size /M max-size: 15 diff --git a/eladmin-system/src/main/resources/db/migration/V1__eladmin.sql b/eladmin-system/src/main/resources/db/migration/V1__eladmin.sql index 32f4d794..afc0e26e 100644 --- a/eladmin-system/src/main/resources/db/migration/V1__eladmin.sql +++ b/eladmin-system/src/main/resources/db/migration/V1__eladmin.sql @@ -391,8 +391,7 @@ INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (11, 10, 0, 1, '图标库', 'Icons', 'components/icons/index', 51, 'icon', 'icon', b'0', b'0', b'0', NULL, NULL, NULL, '2018-12-19 13:38:49', NULL); INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (14, 36, 0, 1, '邮件工具', 'Email', 'tools/email/index', 35, 'email', 'email', b'0', b'0', b'0', NULL, NULL, NULL, '2018-12-27 10:13:09', NULL); INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (15, 10, 0, 1, '富文本', 'Editor', 'components/Editor', 52, 'fwb', 'tinymce', b'0', b'0', b'0', NULL, NULL, NULL, '2018-12-27 11:58:25', NULL); -INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (18, 36, 3, 1, '存储管理', 'Storage', 'tools/storage/index', 34, 'qiniu', 'storage', b'0', b'0', b'0', 'storage:list', NULL, NULL, '2018-12-31 11:12:15', NULL); -INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (19, 36, 0, 1, '支付宝工具', 'AliPay', 'tools/aliPay/index', 37, 'alipay', 'aliPay', b'0', b'0', b'0', NULL, NULL, NULL, '2018-12-31 14:52:38', NULL); +INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (18, 36, 3, 1, '存储管理', 'Storage', 'tools/storage/index', 34, 's3', 'storage', b'0', b'0', b'0', 'storage:list', NULL, NULL, '2018-12-31 11:12:15', NULL); INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (21, NULL, 2, 0, '多级菜单', NULL, '', 900, 'menu', 'nested', b'0', b'0', b'0', NULL, NULL, 'admin', '2019-01-04 16:22:03', '2020-06-21 17:27:35'); INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (22, 21, 2, 0, '二级菜单1', NULL, '', 999, 'menu', 'menu1', b'0', b'0', b'0', NULL, NULL, 'admin', '2019-01-04 16:23:29', '2020-06-21 17:27:20'); INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (23, 21, 0, 1, '二级菜单2', NULL, 'nested/menu2/index', 999, 'menu', 'menu2', b'0', b'0', b'0', NULL, NULL, NULL, '2019-01-04 16:23:57', NULL); @@ -820,45 +819,45 @@ BEGIN; COMMIT; -- ---------------------------- --- Table structure for tool_qiniu_config +-- Table structure for tool_s3_config -- ---------------------------- -DROP TABLE IF EXISTS `tool_qiniu_config`; -CREATE TABLE `tool_qiniu_config` ( - `config_id` bigint(20) NOT NULL COMMENT 'ID', - `access_key` text DEFAULT NULL COMMENT 'accessKey', - `bucket` varchar(255) DEFAULT NULL COMMENT 'Bucket 识别符', - `host` varchar(255) NOT NULL COMMENT '外链域名', - `secret_key` text DEFAULT NULL COMMENT 'secretKey', - `type` varchar(255) DEFAULT NULL COMMENT '空间类型', - `zone` varchar(255) DEFAULT NULL COMMENT '机房', - PRIMARY KEY (`config_id`) USING BTREE -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=COMPACT COMMENT='七牛云配置'; +DROP TABLE IF EXISTS `tool_s3_config`; +CREATE TABLE `tool_s3_config` ( + `config_id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'ID', + `access_key` text DEFAULT NULL COMMENT 'accessKey', + `bucket` varchar(255) DEFAULT NULL COMMENT 'Bucket 识别符', + `host` varchar(255) NOT NULL COMMENT '外链域名', + `secret_key` text DEFAULT NULL COMMENT 'secretKey', + `type` varchar(255) DEFAULT NULL COMMENT '空间类型', + `zone` varchar(255) DEFAULT NULL COMMENT '机房', + PRIMARY KEY (`config_id`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=COMPACT COMMENT='S3配置'; -- ---------------------------- --- Records of tool_qiniu_config +-- Records of tool_s3_config -- ---------------------------- BEGIN; COMMIT; -- ---------------------------- --- Table structure for tool_qiniu_content +-- Table structure for tool_s3_content -- ---------------------------- -DROP TABLE IF EXISTS `tool_qiniu_content`; -CREATE TABLE `tool_qiniu_content` ( - `content_id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'ID', - `bucket` varchar(255) DEFAULT NULL COMMENT 'Bucket 识别符', - `name` varchar(180) DEFAULT NULL COMMENT '文件名称', - `size` varchar(255) DEFAULT NULL COMMENT '文件大小', - `type` varchar(255) DEFAULT NULL COMMENT '文件类型:私有或公开', - `url` varchar(255) DEFAULT NULL COMMENT '文件url', - `suffix` varchar(255) DEFAULT NULL COMMENT '文件后缀', - `update_time` datetime DEFAULT NULL COMMENT '上传或同步的时间', - PRIMARY KEY (`content_id`) USING BTREE, - UNIQUE KEY `uniq_name` (`name`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=COMPACT COMMENT='七牛云文件存储'; +DROP TABLE IF EXISTS `tool_s3_content`; +CREATE TABLE `tool_s3_content` ( + `content_id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'ID', + `bucket` varchar(255) DEFAULT NULL COMMENT 'Bucket 识别符', + `name` varchar(180) DEFAULT NULL COMMENT '文件名称', + `size` varchar(255) DEFAULT NULL COMMENT '文件大小', + `type` varchar(255) DEFAULT NULL COMMENT '文件类型:私有或公开', + `url` varchar(255) DEFAULT NULL COMMENT '文件url', + `suffix` varchar(255) DEFAULT NULL COMMENT '文件后缀', + `update_time` datetime DEFAULT NULL COMMENT '上传或同步的时间', + PRIMARY KEY (`content_id`) USING BTREE, + UNIQUE KEY `uniq_name` (`name`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=COMPACT COMMENT='S3文件存储'; -- ---------------------------- --- Records of tool_qiniu_content +-- Records of tool_s3_content -- ---------------------------- BEGIN; COMMIT; diff --git a/eladmin-tools/src/main/java/me/zhengjie/domain/AlipayConfig.java b/eladmin-tools/src/main/java/me/zhengjie/domain/AlipayConfig.java deleted file mode 100644 index 6b7663f0..00000000 --- a/eladmin-tools/src/main/java/me/zhengjie/domain/AlipayConfig.java +++ /dev/null @@ -1,76 +0,0 @@ -/* - * Copyright 2019-2025 Zheng Jie - * - * 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 - * - * http://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 me.zhengjie.domain; - -import io.swagger.annotations.ApiModelProperty; -import lombok.Data; -import javax.persistence.*; -import javax.validation.constraints.NotBlank; -import java.io.Serializable; - -/** - * Alipay configuration class - * @author Zheng Jie - * @date 2018-12-31 - */ -@Data -@Entity -@Table(name = "tool_alipay_config") -public class AlipayConfig implements Serializable { - - @Id - @Column(name = "config_id") - @ApiModelProperty(value = "ID", hidden = true) - private Long id; - - @NotBlank - @ApiModelProperty(value = "App ID") - private String appId; - - @NotBlank - @ApiModelProperty(value = "Merchant Private Key") - private String privateKey; - - @NotBlank - @ApiModelProperty(value = "Alipay Public Key") - private String publicKey; - - @ApiModelProperty(value = "Signature Method") - private String signType="RSA2"; - - @Column(name = "gateway_url") - @ApiModelProperty(value = "Alipay Open Security Address", hidden = true) - private String gatewayUrl = "https://openapi.alipaydev.com/gateway.do"; - - @ApiModelProperty(value = "Encoding", hidden = true) - private String charset= "utf-8"; - - @NotBlank - @ApiModelProperty(value = "Asynchronous notification address") - private String notifyUrl; - - @NotBlank - @ApiModelProperty(value = "Page returned after order completion") - private String returnUrl; - - @ApiModelProperty(value = "Type") - private String format="JSON"; - - @NotBlank - @ApiModelProperty(value = "Merchant number") - private String sysServiceProviderId; - -} diff --git a/eladmin-tools/src/main/java/me/zhengjie/domain/QiniuConfig.java b/eladmin-tools/src/main/java/me/zhengjie/domain/S3Config.java similarity index 91% rename from eladmin-tools/src/main/java/me/zhengjie/domain/QiniuConfig.java rename to eladmin-tools/src/main/java/me/zhengjie/domain/S3Config.java index 34d14c3a..5643aa43 100644 --- a/eladmin-tools/src/main/java/me/zhengjie/domain/QiniuConfig.java +++ b/eladmin-tools/src/main/java/me/zhengjie/domain/S3Config.java @@ -22,14 +22,14 @@ import javax.validation.constraints.NotBlank; import java.io.Serializable; /** - * Qiniu Cloud Object Storage Configuration Class + * S3 Cloud Object Storage Configuration Class * @author Zheng Jie * @date 2018-12-31 */ @Data @Entity -@Table(name = "tool_qiniu_config") -public class QiniuConfig implements Serializable { +@Table(name = "tool_s3_config") +public class S3Config implements Serializable { @Id @Column(name = "config_id") @@ -61,7 +61,7 @@ public class QiniuConfig implements Serializable { private String zone; @NotBlank - @ApiModelProperty(value = "External domain, customizable, needs to be bound in Qiniu Cloud") + @ApiModelProperty(value = "External domain, customizable, needs to be bound in S3 Cloud") private String host; @ApiModelProperty(value = "Space type: public/private") diff --git a/eladmin-tools/src/main/java/me/zhengjie/domain/QiniuContent.java b/eladmin-tools/src/main/java/me/zhengjie/domain/S3Content.java similarity index 95% rename from eladmin-tools/src/main/java/me/zhengjie/domain/QiniuContent.java rename to eladmin-tools/src/main/java/me/zhengjie/domain/S3Content.java index 9143036d..100adf76 100644 --- a/eladmin-tools/src/main/java/me/zhengjie/domain/QiniuContent.java +++ b/eladmin-tools/src/main/java/me/zhengjie/domain/S3Content.java @@ -29,8 +29,8 @@ import java.sql.Timestamp; */ @Data @Entity -@Table(name = "tool_qiniu_content") -public class QiniuContent implements Serializable { +@Table(name = "tool_s3_content") +public class S3Content implements Serializable { @Id @Column(name = "content_id") diff --git a/eladmin-tools/src/main/java/me/zhengjie/repository/AliPayRepository.java b/eladmin-tools/src/main/java/me/zhengjie/repository/AliPayRepository.java deleted file mode 100644 index 4d8e36f4..00000000 --- a/eladmin-tools/src/main/java/me/zhengjie/repository/AliPayRepository.java +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Copyright 2019-2025 Zheng Jie - * - * 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 - * - * http://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 me.zhengjie.repository; - -import me.zhengjie.domain.AlipayConfig; -import org.springframework.data.jpa.repository.JpaRepository; - -/** - * @author Zheng Jie - * @date 2018-12-31 - */ -public interface AliPayRepository extends JpaRepository { -} diff --git a/eladmin-tools/src/main/java/me/zhengjie/repository/QiNiuConfigRepository.java b/eladmin-tools/src/main/java/me/zhengjie/repository/S3ConfigRepository.java similarity index 77% rename from eladmin-tools/src/main/java/me/zhengjie/repository/QiNiuConfigRepository.java rename to eladmin-tools/src/main/java/me/zhengjie/repository/S3ConfigRepository.java index 5302bcc5..7a86c6dd 100644 --- a/eladmin-tools/src/main/java/me/zhengjie/repository/QiNiuConfigRepository.java +++ b/eladmin-tools/src/main/java/me/zhengjie/repository/S3ConfigRepository.java @@ -15,8 +15,9 @@ */ package me.zhengjie.repository; -import me.zhengjie.domain.QiniuConfig; +import me.zhengjie.domain.S3Config; import org.springframework.data.jpa.repository.JpaRepository; +import org.springframework.data.jpa.repository.JpaSpecificationExecutor; import org.springframework.data.jpa.repository.Modifying; import org.springframework.data.jpa.repository.Query; @@ -24,13 +25,13 @@ import org.springframework.data.jpa.repository.Query; * @author Zheng Jie * @date 2018-12-31 */ -public interface QiNiuConfigRepository extends JpaRepository { +public interface S3ConfigRepository extends JpaRepository, JpaSpecificationExecutor { /** * Edit type * @param type / */ @Modifying - @Query(value = "update QiniuConfig set type = ?1") + @Query(value = "update S3Config set type = ?1") void update(String type); } diff --git a/eladmin-tools/src/main/java/me/zhengjie/repository/QiniuContentRepository.java b/eladmin-tools/src/main/java/me/zhengjie/repository/S3ContentRepository.java similarity index 79% rename from eladmin-tools/src/main/java/me/zhengjie/repository/QiniuContentRepository.java rename to eladmin-tools/src/main/java/me/zhengjie/repository/S3ContentRepository.java index 586cc54d..26d8d32e 100644 --- a/eladmin-tools/src/main/java/me/zhengjie/repository/QiniuContentRepository.java +++ b/eladmin-tools/src/main/java/me/zhengjie/repository/S3ContentRepository.java @@ -15,7 +15,7 @@ */ package me.zhengjie.repository; -import me.zhengjie.domain.QiniuContent; +import me.zhengjie.domain.S3Content; import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.data.jpa.repository.JpaSpecificationExecutor; @@ -23,12 +23,12 @@ import org.springframework.data.jpa.repository.JpaSpecificationExecutor; * @author Zheng Jie * @date 2018-12-31 */ -public interface QiniuContentRepository extends JpaRepository, JpaSpecificationExecutor { +public interface S3ContentRepository extends JpaRepository, JpaSpecificationExecutor { /** * Query by key * @param key file name - * @return QiniuContent + * @return S3Content */ - QiniuContent findByKey(String key); + S3Content findByKey(String key); } diff --git a/eladmin-tools/src/main/java/me/zhengjie/rest/AliPayController.java b/eladmin-tools/src/main/java/me/zhengjie/rest/AliPayController.java deleted file mode 100644 index b531bd67..00000000 --- a/eladmin-tools/src/main/java/me/zhengjie/rest/AliPayController.java +++ /dev/null @@ -1,135 +0,0 @@ -/* - * Copyright 2019-2025 Zheng Jie - * - * 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 - * - * http://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 me.zhengjie.rest; - -import io.swagger.annotations.Api; -import io.swagger.annotations.ApiOperation; -import lombok.RequiredArgsConstructor; -import lombok.extern.slf4j.Slf4j; -import me.zhengjie.annotation.rest.AnonymousAccess; -import me.zhengjie.annotation.Log; -import me.zhengjie.annotation.rest.AnonymousGetMapping; -import me.zhengjie.domain.vo.TradeVo; -import me.zhengjie.domain.AlipayConfig; -import me.zhengjie.domain.enums.AliPayStatusEnum; -import me.zhengjie.utils.AlipayUtils; -import me.zhengjie.service.AliPayService; -import org.springframework.http.HttpStatus; -import org.springframework.http.ResponseEntity; -import org.springframework.validation.annotation.Validated; -import org.springframework.web.bind.annotation.*; -import springfox.documentation.annotations.ApiIgnore; - -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; -import java.nio.charset.StandardCharsets; -import java.util.Map; - -/** - * @author Zheng Jie - * @date 2018-12-31 - */ -@Slf4j -@RestController -@RequiredArgsConstructor -@RequestMapping("/api/aliPay") -@Api(tags = "Tools: Alipay Management") -public class AliPayController { - - private final AlipayUtils alipayUtils; - private final AliPayService alipayService; - - @GetMapping - public ResponseEntity queryAliConfig() { - return new ResponseEntity<>(alipayService.find(), HttpStatus.OK); - } - - @Log("Configure Alipay") - @ApiOperation("Configure Alipay") - @PutMapping - public ResponseEntity updateAliPayConfig(@Validated @RequestBody AlipayConfig alipayConfig) { - alipayService.config(alipayConfig); - return new ResponseEntity<>(HttpStatus.OK); - } - - @Log("Alipay PC Web Payment") - @ApiOperation("PC Web Payment") - @PostMapping(value = "/toPayAsPC") - public ResponseEntity toPayAsPc(@Validated @RequestBody TradeVo trade) throws Exception { - AlipayConfig aliPay = alipayService.find(); - trade.setOutTradeNo(alipayUtils.getOrderCode()); - String payUrl = alipayService.toPayAsPc(aliPay, trade); - return ResponseEntity.ok(payUrl); - } - - @Log("Alipay Mobile Web Payment") - @ApiOperation("Mobile Web Payment") - @PostMapping(value = "/toPayAsWeb") - public ResponseEntity toPayAsWeb(@Validated @RequestBody TradeVo trade) throws Exception { - AlipayConfig alipay = alipayService.find(); - trade.setOutTradeNo(alipayUtils.getOrderCode()); - String payUrl = alipayService.toPayAsWeb(alipay, trade); - return ResponseEntity.ok(payUrl); - } - - @ApiIgnore - @AnonymousGetMapping("/return") - @ApiOperation("Redirect link after payment") - public ResponseEntity returnPage(HttpServletRequest request, HttpServletResponse response) { - AlipayConfig alipay = alipayService.find(); - response.setContentType("text/html;charset=" + alipay.getCharset()); - // Content signature verification to prevent hackers from tampering with parameters - if (alipayUtils.rsaCheck(request, alipay)) { - // Merchant order number - String outTradeNo = new String(request.getParameter("out_trade_no").getBytes(StandardCharsets.ISO_8859_1), StandardCharsets.UTF_8); - // Alipay transaction number - String tradeNo = new String(request.getParameter("trade_no").getBytes(StandardCharsets.ISO_8859_1), StandardCharsets.UTF_8); - System.out.println("Merchant order number" + outTradeNo + " " + "Third-party transaction number" + tradeNo); - - // Return data as needed by business, here always return OK - return new ResponseEntity<>("payment successful", HttpStatus.OK); - } else { - // Return data as needed by business - return new ResponseEntity<>(HttpStatus.BAD_REQUEST); - } - } - - @ApiIgnore - @RequestMapping("/notify") - @AnonymousAccess - @ApiOperation("Alipay async notification (requires public network access), receive async notification, check if app_id, out_trade_no, and total_amount in the notification match the request, handle business logic according to trade_status") - public ResponseEntity notify(HttpServletRequest request) { - AlipayConfig alipay = alipayService.find(); - Map parameterMap = request.getParameterMap(); - // Content signature verification to prevent hackers from tampering with parameters - if (alipayUtils.rsaCheck(request, alipay)) { - // Transaction status - String tradeStatus = new String(request.getParameter("trade_status").getBytes(StandardCharsets.ISO_8859_1), StandardCharsets.UTF_8); - // Merchant order number - String outTradeNo = new String(request.getParameter("out_trade_no").getBytes(StandardCharsets.ISO_8859_1), StandardCharsets.UTF_8); - // Alipay transaction number - String tradeNo = new String(request.getParameter("trade_no").getBytes(StandardCharsets.ISO_8859_1), StandardCharsets.UTF_8); - // Payment amount - String totalAmount = new String(request.getParameter("total_amount").getBytes(StandardCharsets.ISO_8859_1), StandardCharsets.UTF_8); - // Verification - if (tradeStatus.equals(AliPayStatusEnum.SUCCESS.getValue()) || tradeStatus.equals(AliPayStatusEnum.FINISHED.getValue())) { - // After verification, handle order as needed by business - } - return new ResponseEntity<>(HttpStatus.OK); - } - return new ResponseEntity<>(HttpStatus.BAD_REQUEST); - } -} diff --git a/eladmin-tools/src/main/java/me/zhengjie/rest/QiniuController.java b/eladmin-tools/src/main/java/me/zhengjie/rest/S3Controller.java similarity index 54% rename from eladmin-tools/src/main/java/me/zhengjie/rest/QiniuController.java rename to eladmin-tools/src/main/java/me/zhengjie/rest/S3Controller.java index 6401d4b7..0bdbe0bb 100644 --- a/eladmin-tools/src/main/java/me/zhengjie/rest/QiniuController.java +++ b/eladmin-tools/src/main/java/me/zhengjie/rest/S3Controller.java @@ -20,10 +20,10 @@ import io.swagger.annotations.ApiOperation; import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import me.zhengjie.annotation.Log; -import me.zhengjie.domain.QiniuConfig; -import me.zhengjie.domain.QiniuContent; -import me.zhengjie.service.dto.QiniuQueryCriteria; -import me.zhengjie.service.QiNiuService; +import me.zhengjie.domain.S3Config; +import me.zhengjie.domain.S3Content; +import me.zhengjie.service.dto.S3QueryCriteria; +import me.zhengjie.service.S3Service; import me.zhengjie.utils.PageResult; import org.springframework.data.domain.Pageable; import org.springframework.http.HttpStatus; @@ -44,79 +44,79 @@ import java.util.Map; @Slf4j @RestController @RequiredArgsConstructor -@RequestMapping("/api/qiNiuContent") -@Api(tags = "Tools: Qiniu Cloud Storage Management") -public class QiniuController { +@RequestMapping("/api/s3Content") +@Api(tags = "Tools: S3 Cloud Storage Management") +public class S3Controller { - private final QiNiuService qiNiuService; + private final S3Service s3Service; @GetMapping(value = "/config") - public ResponseEntity queryQiNiuConfig(){ - return new ResponseEntity<>(qiNiuService.find(), HttpStatus.OK); + public ResponseEntity queryS3Config(){ + return new ResponseEntity<>(s3Service.find(), HttpStatus.OK); } - @Log("Configure Qiniu Cloud Storage") - @ApiOperation("Configure Qiniu Cloud Storage") + @Log("Configure S3 Cloud Storage") + @ApiOperation("Configure S3 Cloud Storage") @PutMapping(value = "/config") - public ResponseEntity updateQiNiuConfig(@Validated @RequestBody QiniuConfig qiniuConfig){ - qiNiuService.config(qiniuConfig); - qiNiuService.update(qiniuConfig.getType()); + public ResponseEntity updateS3Config(@Validated @RequestBody S3Config s3Config){ + s3Service.config(s3Config); + s3Service.update(s3Config.getType()); return new ResponseEntity<>(HttpStatus.OK); } @ApiOperation("Export Data") @GetMapping(value = "/download") - public void exportQiNiu(HttpServletResponse response, QiniuQueryCriteria criteria) throws IOException { - qiNiuService.downloadList(qiNiuService.queryAll(criteria), response); + public void exportS3(HttpServletResponse response, S3QueryCriteria criteria) throws IOException { + s3Service.downloadList(s3Service.queryAll(criteria), response); } @ApiOperation("Query File") @GetMapping - public ResponseEntity> queryQiNiu(QiniuQueryCriteria criteria, Pageable pageable){ - return new ResponseEntity<>(qiNiuService.queryAll(criteria,pageable),HttpStatus.OK); + public ResponseEntity> queryS3(S3QueryCriteria criteria, Pageable pageable){ + return new ResponseEntity<>(s3Service.queryAll(criteria,pageable),HttpStatus.OK); } @ApiOperation("Upload File") @PostMapping - public ResponseEntity uploadQiNiu(@RequestParam MultipartFile file){ - QiniuContent qiniuContent = qiNiuService.upload(file,qiNiuService.find()); + public ResponseEntity uploadS3(@RequestParam MultipartFile file){ + S3Content s3Content = s3Service.upload(file,s3Service.find()); Map map = new HashMap<>(3); - map.put("id",qiniuContent.getId()); + map.put("id",s3Content.getId()); map.put("errno",0); - map.put("data",new String[]{qiniuContent.getUrl()}); + map.put("data",new String[]{s3Content.getUrl()}); return new ResponseEntity<>(map,HttpStatus.OK); } - @Log("Synchronize Qiniu Cloud Data") - @ApiOperation("Synchronize Qiniu Cloud Data") + @Log("Synchronize S3 Cloud Data") + @ApiOperation("Synchronize S3 Cloud Data") @PostMapping(value = "/synchronize") - public ResponseEntity synchronizeQiNiu(){ - qiNiuService.synchronize(qiNiuService.find()); + public ResponseEntity synchronizeS3(){ + s3Service.synchronize(s3Service.find()); return new ResponseEntity<>(HttpStatus.OK); } @Log("Download File") @ApiOperation("Download File") @GetMapping(value = "/download/{id}") - public ResponseEntity downloadQiNiu(@PathVariable Long id){ + public ResponseEntity downloadS3(@PathVariable Long id){ Map map = new HashMap<>(1); - map.put("url", qiNiuService.download(qiNiuService.findByContentId(id),qiNiuService.find())); + map.put("url", s3Service.download(s3Service.findByContentId(id),s3Service.find())); return new ResponseEntity<>(map,HttpStatus.OK); } @Log("Delete File") @ApiOperation("Delete File") @DeleteMapping(value = "/{id}") - public ResponseEntity deleteQiNiu(@PathVariable Long id){ - qiNiuService.delete(qiNiuService.findByContentId(id),qiNiuService.find()); + public ResponseEntity deleteS3(@PathVariable Long id){ + s3Service.delete(s3Service.findByContentId(id),s3Service.find()); return new ResponseEntity<>(HttpStatus.OK); } @Log("Delete Multiple Images") @ApiOperation("Delete Multiple Images") @DeleteMapping - public ResponseEntity deleteAllQiNiu(@RequestBody Long[] ids) { - qiNiuService.deleteAll(ids, qiNiuService.find()); + public ResponseEntity deleteAllS3(@RequestBody Long[] ids) { + s3Service.deleteAll(ids, s3Service.find()); return new ResponseEntity<>(HttpStatus.OK); } } diff --git a/eladmin-tools/src/main/java/me/zhengjie/service/AliPayService.java b/eladmin-tools/src/main/java/me/zhengjie/service/AliPayService.java deleted file mode 100644 index 8308bfce..00000000 --- a/eladmin-tools/src/main/java/me/zhengjie/service/AliPayService.java +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Copyright 2019-2025 Zheng Jie - * - * 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 - * - * http://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 me.zhengjie.service; - -import me.zhengjie.domain.vo.TradeVo; -import me.zhengjie.domain.AlipayConfig; - -/** - * @author Zheng Jie - * @date 2018-12-31 - */ -public interface AliPayService { - - /** - * Query configuration - * @return AlipayConfig - */ - AlipayConfig find(); - - /** - * Update configuration - * @param alipayConfig Alipay configuration - * @return AlipayConfig - */ - AlipayConfig config(AlipayConfig alipayConfig); - - /** - * Handle transaction requests from PC - * @param alipay Alipay configuration - * @param trade transaction details - * @return String - * @throws Exception exception - */ - String toPayAsPc(AlipayConfig alipay, TradeVo trade) throws Exception; - - /** - * Handle transaction requests from mobile web - * @param alipay Alipay configuration - * @param trade transaction details - * @return String - * @throws Exception exception - */ - String toPayAsWeb(AlipayConfig alipay, TradeVo trade) throws Exception; -} diff --git a/eladmin-tools/src/main/java/me/zhengjie/service/QiNiuService.java b/eladmin-tools/src/main/java/me/zhengjie/service/S3Service.java similarity index 66% rename from eladmin-tools/src/main/java/me/zhengjie/service/QiNiuService.java rename to eladmin-tools/src/main/java/me/zhengjie/service/S3Service.java index 0ac40e7d..39840c1a 100644 --- a/eladmin-tools/src/main/java/me/zhengjie/service/QiNiuService.java +++ b/eladmin-tools/src/main/java/me/zhengjie/service/S3Service.java @@ -15,9 +15,9 @@ */ package me.zhengjie.service; -import me.zhengjie.domain.QiniuConfig; -import me.zhengjie.domain.QiniuContent; -import me.zhengjie.service.dto.QiniuQueryCriteria; +import me.zhengjie.domain.S3Content; +import me.zhengjie.domain.S3Config; +import me.zhengjie.service.dto.S3QueryCriteria; import me.zhengjie.utils.PageResult; import org.springframework.data.domain.Pageable; import org.springframework.web.multipart.MultipartFile; @@ -30,20 +30,20 @@ import java.util.List; * @author Zheng Jie * @date 2018-12-31 */ -public interface QiNiuService { +public interface S3Service { /** * Query configuration - * @return QiniuConfig + * @return S3Config */ - QiniuConfig find(); + S3Config find(); /** * Update configuration - * @param qiniuConfig configuration - * @return QiniuConfig + * @param s3Config configuration + * @return S3Config */ - QiniuConfig config(QiniuConfig qiniuConfig); + S3Config config(S3Config s3Config); /** * Paginated query @@ -51,29 +51,29 @@ public interface QiNiuService { * @param pageable pagination parameters * @return / */ - PageResult queryAll(QiniuQueryCriteria criteria, Pageable pageable); + PageResult queryAll(S3QueryCriteria criteria, Pageable pageable); /** * Query all * @param criteria criteria * @return / */ - List queryAll(QiniuQueryCriteria criteria); + List queryAll(S3QueryCriteria criteria); /** * Upload file * @param file file - * @param qiniuConfig configuration - * @return QiniuContent + * @param s3Config configuration + * @return S3Content */ - QiniuContent upload(MultipartFile file, QiniuConfig qiniuConfig); + S3Content upload(MultipartFile file, S3Config s3Config); /** * Query file * @param id file ID - * @return QiniuContent + * @return S3Content */ - QiniuContent findByContentId(Long id); + S3Content findByContentId(Long id); /** * Download file @@ -81,27 +81,27 @@ public interface QiNiuService { * @param config configuration * @return String */ - String download(QiniuContent content, QiniuConfig config); + String download(S3Content content, S3Config config); /** * Delete file * @param content file * @param config configuration */ - void delete(QiniuContent content, QiniuConfig config); + void delete(S3Content content, S3Config config); /** * Sync data * @param config configuration */ - void synchronize(QiniuConfig config); + void synchronize(S3Config config); /** * Delete file * @param ids file ID array * @param config configuration */ - void deleteAll(Long[] ids, QiniuConfig config); + void deleteAll(Long[] ids, S3Config config); /** * Update data @@ -115,5 +115,5 @@ public interface QiNiuService { * @param response / * @throws IOException / */ - void downloadList(List queryAll, HttpServletResponse response) throws IOException; + void downloadList(List queryAll, HttpServletResponse response) throws IOException; } diff --git a/eladmin-tools/src/main/java/me/zhengjie/service/dto/QiniuQueryCriteria.java b/eladmin-tools/src/main/java/me/zhengjie/service/dto/S3QueryCriteria.java similarity index 97% rename from eladmin-tools/src/main/java/me/zhengjie/service/dto/QiniuQueryCriteria.java rename to eladmin-tools/src/main/java/me/zhengjie/service/dto/S3QueryCriteria.java index 4509ea89..ab965b25 100644 --- a/eladmin-tools/src/main/java/me/zhengjie/service/dto/QiniuQueryCriteria.java +++ b/eladmin-tools/src/main/java/me/zhengjie/service/dto/S3QueryCriteria.java @@ -27,7 +27,7 @@ import java.util.List; * @date 2019-6-4 09:54:37 */ @Data -public class QiniuQueryCriteria{ +public class S3QueryCriteria{ @ApiModelProperty(value = "Name search") @Query(type = Query.Type.INNER_LIKE) diff --git a/eladmin-tools/src/main/java/me/zhengjie/service/impl/AliPayServiceImpl.java b/eladmin-tools/src/main/java/me/zhengjie/service/impl/AliPayServiceImpl.java deleted file mode 100644 index f6b9d2e7..00000000 --- a/eladmin-tools/src/main/java/me/zhengjie/service/impl/AliPayServiceImpl.java +++ /dev/null @@ -1,117 +0,0 @@ -/* - * Copyright 2019-2025 Zheng Jie - * - * 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 - * - * http://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 me.zhengjie.service.impl; - -import com.alipay.api.AlipayClient; -import com.alipay.api.DefaultAlipayClient; -import com.alipay.api.request.AlipayTradePagePayRequest; -import com.alipay.api.request.AlipayTradeWapPayRequest; -import lombok.RequiredArgsConstructor; -import me.zhengjie.domain.vo.TradeVo; -import me.zhengjie.domain.AlipayConfig; -import me.zhengjie.exception.BadRequestException; -import me.zhengjie.repository.AliPayRepository; -import me.zhengjie.service.AliPayService; -import org.springframework.cache.annotation.CacheConfig; -import org.springframework.cache.annotation.CachePut; -import org.springframework.cache.annotation.Cacheable; -import org.springframework.stereotype.Service; -import org.springframework.transaction.annotation.Transactional; -import java.util.Optional; - -/** - * @author Zheng Jie - * @date 2018-12-31 - */ -@Service -@RequiredArgsConstructor -@CacheConfig(cacheNames = "aliPay") -public class AliPayServiceImpl implements AliPayService { - - private final AliPayRepository alipayRepository; - - @Override - @Cacheable(key = "'config'") - public AlipayConfig find() { - Optional alipayConfig = alipayRepository.findById(1L); - return alipayConfig.orElseGet(AlipayConfig::new); - } - - @Override - @CachePut(key = "'config'") - @Transactional(rollbackFor = Exception.class) - public AlipayConfig config(AlipayConfig alipayConfig) { - alipayConfig.setId(1L); - return alipayRepository.save(alipayConfig); - } - - @Override - public String toPayAsPc(AlipayConfig alipay, TradeVo trade) throws Exception { - - if(alipay.getId() == null){ - throw new BadRequestException("Please add the corresponding configuration first, then operate"); - } - AlipayClient alipayClient = new DefaultAlipayClient(alipay.getGatewayUrl(), alipay.getAppId(), alipay.getPrivateKey(), alipay.getFormat(), alipay.getCharset(), alipay.getPublicKey(), alipay.getSignType()); - - // Create API request (desktop web version) - AlipayTradePagePayRequest request = new AlipayTradePagePayRequest(); - // Return page and asynchronous notification address after order completion - request.setReturnUrl(alipay.getReturnUrl()); - request.setNotifyUrl(alipay.getNotifyUrl()); - // Fill order parameters - request.setBizContent("{" + - " \"out_trade_no\":\""+trade.getOutTradeNo()+"\"," + - " \"product_code\":\"FAST_INSTANT_TRADE_PAY\"," + - " \"total_amount\":"+trade.getTotalAmount()+"," + - " \"subject\":\""+trade.getSubject()+"\"," + - " \"body\":\""+trade.getBody()+"\"," + - " \"extend_params\":{" + - " \"sys_service_provider_id\":\""+alipay.getSysServiceProviderId()+"\"" + - " }"+ - " }");//Fill business parameters - // Call SDK to generate form, can get URL through GET method - return alipayClient.pageExecute(request, "GET").getBody(); - } - - @Override - public String toPayAsWeb(AlipayConfig alipay, TradeVo trade) throws Exception { - if(alipay.getId() == null){ - throw new BadRequestException("Please add the corresponding configuration first, then operate"); - } - AlipayClient alipayClient = new DefaultAlipayClient(alipay.getGatewayUrl(), alipay.getAppId(), alipay.getPrivateKey(), alipay.getFormat(), alipay.getCharset(), alipay.getPublicKey(), alipay.getSignType()); - - double money = Double.parseDouble(trade.getTotalAmount()); - double maxMoney = 5000; - if(money <= 0 || money >= maxMoney){ - throw new BadRequestException("Test amount too large"); - } - // Create API request (mobile web version) - AlipayTradeWapPayRequest request = new AlipayTradeWapPayRequest(); - request.setReturnUrl(alipay.getReturnUrl()); - request.setNotifyUrl(alipay.getNotifyUrl()); - request.setBizContent("{" + - " \"out_trade_no\":\""+trade.getOutTradeNo()+"\"," + - " \"product_code\":\"FAST_INSTANT_TRADE_PAY\"," + - " \"total_amount\":"+trade.getTotalAmount()+"," + - " \"subject\":\""+trade.getSubject()+"\"," + - " \"body\":\""+trade.getBody()+"\"," + - " \"extend_params\":{" + - " \"sys_service_provider_id\":\""+alipay.getSysServiceProviderId()+"\"" + - " }"+ - " }"); - return alipayClient.pageExecute(request, "GET").getBody(); - } -} diff --git a/eladmin-tools/src/main/java/me/zhengjie/service/impl/QiNiuServiceImpl.java b/eladmin-tools/src/main/java/me/zhengjie/service/impl/S3ServiceImpl.java similarity index 58% rename from eladmin-tools/src/main/java/me/zhengjie/service/impl/QiNiuServiceImpl.java rename to eladmin-tools/src/main/java/me/zhengjie/service/impl/S3ServiceImpl.java index fdcded27..1914d528 100644 --- a/eladmin-tools/src/main/java/me/zhengjie/service/impl/QiNiuServiceImpl.java +++ b/eladmin-tools/src/main/java/me/zhengjie/service/impl/S3ServiceImpl.java @@ -25,14 +25,14 @@ import com.qiniu.storage.model.DefaultPutRet; import com.qiniu.storage.model.FileInfo; import com.qiniu.util.Auth; import lombok.RequiredArgsConstructor; -import me.zhengjie.domain.QiniuConfig; -import me.zhengjie.domain.QiniuContent; -import me.zhengjie.repository.QiniuContentRepository; -import me.zhengjie.service.dto.QiniuQueryCriteria; +import me.zhengjie.domain.S3Content; +import me.zhengjie.domain.S3Config; +import me.zhengjie.repository.S3ConfigRepository; +import me.zhengjie.repository.S3ContentRepository; +import me.zhengjie.service.dto.S3QueryCriteria; import me.zhengjie.utils.*; import me.zhengjie.exception.BadRequestException; -import me.zhengjie.repository.QiNiuConfigRepository; -import me.zhengjie.service.QiNiuService; +import me.zhengjie.service.S3Service; import org.springframework.beans.factory.annotation.Value; import org.springframework.cache.annotation.CacheConfig; import org.springframework.cache.annotation.CachePut; @@ -51,75 +51,75 @@ import java.util.*; */ @Service @RequiredArgsConstructor -@CacheConfig(cacheNames = "qiNiu") -public class QiNiuServiceImpl implements QiNiuService { +@CacheConfig(cacheNames = "s3") +public class S3ServiceImpl implements S3Service { - private final QiNiuConfigRepository qiNiuConfigRepository; - private final QiniuContentRepository qiniuContentRepository; + private final S3ConfigRepository s3ConfigRepository; + private final S3ContentRepository s3ContentRepository; - @Value("${qiniu.max-size}") + @Value("${s3.max-size}") private Long maxSize; @Override @Cacheable(key = "'config'") - public QiniuConfig find() { - Optional qiniuConfig = qiNiuConfigRepository.findById(1L); - return qiniuConfig.orElseGet(QiniuConfig::new); + public S3Config find() { + Optional s3Config = s3ConfigRepository.findById(1L); + return s3Config.orElseGet(S3Config::new); } @Override @CachePut(key = "'config'") @Transactional(rollbackFor = Exception.class) - public QiniuConfig config(QiniuConfig qiniuConfig) { - qiniuConfig.setId(1L); + public S3Config config(S3Config s3Config) { + s3Config.setId(1L); String http = "http://", https = "https://"; - if (!(qiniuConfig.getHost().toLowerCase().startsWith(http)||qiniuConfig.getHost().toLowerCase().startsWith(https))) { + if (!(s3Config.getHost().toLowerCase().startsWith(http)||s3Config.getHost().toLowerCase().startsWith(https))) { throw new BadRequestException("External link domain must start with http:// or https://"); } - return qiNiuConfigRepository.save(qiniuConfig); + return s3ConfigRepository.save(s3Config); } @Override - public PageResult queryAll(QiniuQueryCriteria criteria, Pageable pageable){ - return PageUtil.toPage(qiniuContentRepository.findAll((root, criteriaQuery, criteriaBuilder) -> QueryHelp.getPredicate(root,criteria,criteriaBuilder),pageable)); + public PageResult queryAll(S3QueryCriteria criteria, Pageable pageable){ + return PageUtil.toPage(s3ContentRepository.findAll((root, criteriaQuery, criteriaBuilder) -> QueryHelp.getPredicate(root,criteria,criteriaBuilder),pageable)); } @Override - public List queryAll(QiniuQueryCriteria criteria) { - return qiniuContentRepository.findAll((root, criteriaQuery, criteriaBuilder) -> QueryHelp.getPredicate(root,criteria,criteriaBuilder)); + public List queryAll(S3QueryCriteria criteria) { + return s3ContentRepository.findAll((root, criteriaQuery, criteriaBuilder) -> QueryHelp.getPredicate(root,criteria,criteriaBuilder)); } @Override @Transactional(rollbackFor = Exception.class) - public QiniuContent upload(MultipartFile file, QiniuConfig qiniuConfig) { + public S3Content upload(MultipartFile file, S3Config s3Config) { FileUtil.checkSize(maxSize, file.getSize()); - if(qiniuConfig.getId() == null){ + if(s3Config.getId() == null){ throw new BadRequestException("Please add the corresponding configuration first, then operate"); } // Construct a configuration class with the specified Zone object - Configuration cfg = new Configuration(QiNiuUtil.getRegion(qiniuConfig.getZone())); + Configuration cfg = new Configuration(S3Util.getRegion(s3Config.getZone())); UploadManager uploadManager = new UploadManager(cfg); - Auth auth = Auth.create(qiniuConfig.getAccessKey(), qiniuConfig.getSecretKey()); - String upToken = auth.uploadToken(qiniuConfig.getBucket()); + Auth auth = Auth.create(s3Config.getAccessKey(), s3Config.getSecretKey()); + String upToken = auth.uploadToken(s3Config.getBucket()); try { String key = file.getOriginalFilename(); - if(qiniuContentRepository.findByKey(key) != null) { - key = QiNiuUtil.getKey(key); + if(s3ContentRepository.findByKey(key) != null) { + key = S3Util.getKey(key); } Response response = uploadManager.put(file.getBytes(), key, upToken); // Parse the result of successful upload DefaultPutRet putRet = JSON.parseObject(response.bodyString(), DefaultPutRet.class); - QiniuContent content = qiniuContentRepository.findByKey(FileUtil.getFileNameNoEx(putRet.key)); + S3Content content = s3ContentRepository.findByKey(FileUtil.getFileNameNoEx(putRet.key)); if(content == null){ // Store in database - QiniuContent qiniuContent = new QiniuContent(); - qiniuContent.setSuffix(FileUtil.getExtensionName(putRet.key)); - qiniuContent.setBucket(qiniuConfig.getBucket()); - qiniuContent.setType(qiniuConfig.getType()); - qiniuContent.setKey(FileUtil.getFileNameNoEx(putRet.key)); - qiniuContent.setUrl(qiniuConfig.getHost()+"/"+putRet.key); - qiniuContent.setSize(FileUtil.getSize(Integer.parseInt(String.valueOf(file.getSize())))); - return qiniuContentRepository.save(qiniuContent); + S3Content s3Content = new S3Content(); + s3Content.setSuffix(FileUtil.getExtensionName(putRet.key)); + s3Content.setBucket(s3Config.getBucket()); + s3Content.setType(s3Config.getType()); + s3Content.setKey(FileUtil.getFileNameNoEx(putRet.key)); + s3Content.setUrl(s3Config.getHost()+"/"+putRet.key); + s3Content.setSize(FileUtil.getSize(Integer.parseInt(String.valueOf(file.getSize())))); + return s3ContentRepository.save(s3Content); } return content; } catch (Exception e) { @@ -128,14 +128,14 @@ public class QiNiuServiceImpl implements QiNiuService { } @Override - public QiniuContent findByContentId(Long id) { - QiniuContent qiniuContent = qiniuContentRepository.findById(id).orElseGet(QiniuContent::new); - ValidationUtil.isNull(qiniuContent.getId(),"QiniuContent", "id",id); - return qiniuContent; + public S3Content findByContentId(Long id) { + S3Content s3Content = s3ContentRepository.findById(id).orElseGet(S3Content::new); + ValidationUtil.isNull(s3Content.getId(),"S3Content", "id",id); + return s3Content; } @Override - public String download(QiniuContent content,QiniuConfig config){ + public String download(S3Content content,S3Config config){ String finalUrl; String type = "Public"; if(type.equals(content.getType())){ @@ -151,27 +151,27 @@ public class QiNiuServiceImpl implements QiNiuService { @Override @Transactional(rollbackFor = Exception.class) - public void delete(QiniuContent content, QiniuConfig config) { + public void delete(S3Content content, S3Config config) { // Construct a configuration class with the specified Zone object - Configuration cfg = new Configuration(QiNiuUtil.getRegion(config.getZone())); + Configuration cfg = new Configuration(S3Util.getRegion(config.getZone())); Auth auth = Auth.create(config.getAccessKey(), config.getSecretKey()); BucketManager bucketManager = new BucketManager(auth, cfg); try { bucketManager.delete(content.getBucket(), content.getKey() + "." + content.getSuffix()); - qiniuContentRepository.delete(content); + s3ContentRepository.delete(content); } catch (QiniuException ex) { - qiniuContentRepository.delete(content); + s3ContentRepository.delete(content); } } @Override @Transactional(rollbackFor = Exception.class) - public void synchronize(QiniuConfig config) { + public void synchronize(S3Config config) { if(config.getId() == null){ throw new BadRequestException("Please add the corresponding configuration first, then operate"); } // Construct a configuration class with the specified Zone object - Configuration cfg = new Configuration(QiNiuUtil.getRegion(config.getZone())); + Configuration cfg = new Configuration(S3Util.getRegion(config.getZone())); Auth auth = Auth.create(config.getAccessKey(), config.getSecretKey()); BucketManager bucketManager = new BucketManager(auth, cfg); // File name prefix @@ -184,18 +184,18 @@ public class QiNiuServiceImpl implements QiNiuService { BucketManager.FileListIterator fileListIterator = bucketManager.createFileListIterator(config.getBucket(), prefix, limit, delimiter); while (fileListIterator.hasNext()) { // Process the obtained file list result - QiniuContent qiniuContent; + S3Content s3Content; FileInfo[] items = fileListIterator.next(); for (FileInfo item : items) { - if(qiniuContentRepository.findByKey(FileUtil.getFileNameNoEx(item.key)) == null){ - qiniuContent = new QiniuContent(); - qiniuContent.setSize(FileUtil.getSize(Integer.parseInt(String.valueOf(item.fsize)))); - qiniuContent.setSuffix(FileUtil.getExtensionName(item.key)); - qiniuContent.setKey(FileUtil.getFileNameNoEx(item.key)); - qiniuContent.setType(config.getType()); - qiniuContent.setBucket(config.getBucket()); - qiniuContent.setUrl(config.getHost()+"/"+item.key); - qiniuContentRepository.save(qiniuContent); + if(s3ContentRepository.findByKey(FileUtil.getFileNameNoEx(item.key)) == null){ + s3Content = new S3Content(); + s3Content.setSize(FileUtil.getSize(Integer.parseInt(String.valueOf(item.fsize)))); + s3Content.setSuffix(FileUtil.getExtensionName(item.key)); + s3Content.setKey(FileUtil.getFileNameNoEx(item.key)); + s3Content.setType(config.getType()); + s3Content.setBucket(config.getBucket()); + s3Content.setUrl(config.getHost()+"/"+item.key); + s3ContentRepository.save(s3Content); } } } @@ -203,7 +203,7 @@ public class QiNiuServiceImpl implements QiNiuService { @Override @Transactional(rollbackFor = Exception.class) - public void deleteAll(Long[] ids, QiniuConfig config) { + public void deleteAll(Long[] ids, S3Config config) { for (Long id : ids) { delete(findByContentId(id), config); } @@ -212,13 +212,13 @@ public class QiNiuServiceImpl implements QiNiuService { @Override @Transactional(rollbackFor = Exception.class) public void update(String type) { - qiNiuConfigRepository.update(type); + s3ConfigRepository.update(type); } @Override - public void downloadList(List queryAll, HttpServletResponse response) throws IOException { + public void downloadList(List queryAll, HttpServletResponse response) throws IOException { List> list = new ArrayList<>(); - for (QiniuContent content : queryAll) { + for (S3Content content : queryAll) { Map map = new LinkedHashMap<>(); map.put("File name", content.getKey()); map.put("File type", content.getSuffix()); diff --git a/eladmin-tools/src/main/java/me/zhengjie/utils/AlipayUtils.java b/eladmin-tools/src/main/java/me/zhengjie/utils/AlipayUtils.java deleted file mode 100644 index ef77a457..00000000 --- a/eladmin-tools/src/main/java/me/zhengjie/utils/AlipayUtils.java +++ /dev/null @@ -1,85 +0,0 @@ -/* - * Copyright 2019-2025 Zheng Jie - * - * 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 - * - * http://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 me.zhengjie.utils; - -import com.alipay.api.AlipayApiException; -import com.alipay.api.internal.util.AlipaySignature; -import me.zhengjie.domain.AlipayConfig; -import org.springframework.stereotype.Component; -import javax.servlet.http.HttpServletRequest; -import java.text.SimpleDateFormat; -import java.util.Date; -import java.util.HashMap; -import java.util.Map; - -/** - * Alipay utility class - * @author zhengjie - * @date 2018/09/30 14:04:35 - */ -@Component -public class AlipayUtils { - - /** - * Generate order number - * @return String - */ - public String getOrderCode() { - SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); - int a = (int)(Math.random() * 9000.0D) + 1000; - System.out.println(a); - Date date = new Date(); - String str = sdf.format(date); - String[] split = str.split("-"); - String s = split[0] + split[1] + split[2]; - String[] split1 = s.split(" "); - String s1 = split1[0] + split1[1]; - String[] split2 = s1.split(":"); - return split2[0] + split2[1] + split2[2] + a; - } - - /** - * Verify signature - * @param request HttpServletRequest - * @param alipay Aliyun config - * @return boolean - */ - public boolean rsaCheck(HttpServletRequest request, AlipayConfig alipay){ - - // Get feedback information POSTed by Alipay - Map params = new HashMap<>(1); - Map requestParams = request.getParameterMap(); - for (Object o : requestParams.keySet()) { - String name = (String) o; - String[] values = requestParams.get(name); - String valueStr = ""; - for (int i = 0; i < values.length; i++) { - valueStr = (i == values.length - 1) ? valueStr + values[i] - : valueStr + values[i] + ","; - } - params.put(name, valueStr); - } - - try { - return AlipaySignature.rsaCheckV1(params, - alipay.getPublicKey(), - alipay.getCharset(), - alipay.getSignType()); - } catch (AlipayApiException e) { - return false; - } - } -} diff --git a/eladmin-tools/src/main/java/me/zhengjie/utils/QiNiuUtil.java b/eladmin-tools/src/main/java/me/zhengjie/utils/S3Util.java similarity index 97% rename from eladmin-tools/src/main/java/me/zhengjie/utils/QiNiuUtil.java rename to eladmin-tools/src/main/java/me/zhengjie/utils/S3Util.java index 5868c500..ed67b836 100644 --- a/eladmin-tools/src/main/java/me/zhengjie/utils/QiNiuUtil.java +++ b/eladmin-tools/src/main/java/me/zhengjie/utils/S3Util.java @@ -20,11 +20,11 @@ import java.text.SimpleDateFormat; import java.util.Date; /** - * Qiniu cloud storage utility class + * S3 cloud storage utility class * @author Zheng Jie * @date 2018-12-31 */ -public class QiNiuUtil { +public class S3Util { private static final String HUAD = "East China"; diff --git a/sql/eladmin.sql b/sql/eladmin.sql deleted file mode 100644 index 9f1d8e52..00000000 --- a/sql/eladmin.sql +++ /dev/null @@ -1,866 +0,0 @@ -/* - Navicat Premium Dump SQL - - Source Server : localhost - Source Server Type : MySQL - Source Server Version : 110206 (11.2.6-MariaDB) - Source Host : localhost:3306 - Source Schema : eladmin - - Target Server Type : MySQL - Target Server Version : 110206 (11.2.6-MariaDB) - File Encoding : 65001 - - Date: 15/01/2025 18:20:01 -*/ - -SET NAMES utf8mb4; -SET FOREIGN_KEY_CHECKS = 0; - --- ---------------------------- --- Table structure for code_column --- ---------------------------- -DROP TABLE IF EXISTS `code_column`; -CREATE TABLE `code_column` ( - `column_id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'ID', - `table_name` varchar(180) DEFAULT NULL COMMENT 'Table Name', - `column_name` varchar(255) DEFAULT NULL COMMENT 'Database Field Name', - `column_type` varchar(255) DEFAULT NULL COMMENT 'Database Field Type', - `dict_name` varchar(255) DEFAULT NULL COMMENT 'Dictionary Name', - `extra` varchar(255) DEFAULT NULL COMMENT 'Additional Field Parameters', - `form_show` bit(1) DEFAULT NULL COMMENT 'Show in Form', - `form_type` varchar(255) DEFAULT NULL COMMENT 'Form Type', - `key_type` varchar(255) DEFAULT NULL COMMENT 'Database Field Key Type', - `list_show` bit(1) DEFAULT NULL COMMENT 'Show in List', - `not_null` bit(1) DEFAULT NULL COMMENT 'Not Null', - `query_type` varchar(255) DEFAULT NULL COMMENT 'Query Type', - `remark` varchar(255) DEFAULT NULL COMMENT 'Description', - `date_annotation` varchar(255) DEFAULT NULL COMMENT 'Date Annotation', - PRIMARY KEY (`column_id`) USING BTREE, - KEY `idx_table_name` (`table_name`) -) ENGINE=InnoDB AUTO_INCREMENT=259 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=COMPACT COMMENT='Code Generation Field Information Storage'; - --- ---------------------------- --- Records of code_column --- ---------------------------- -BEGIN; -COMMIT; - --- ---------------------------- --- Table structure for code_config --- ---------------------------- -DROP TABLE IF EXISTS `code_config`; -CREATE TABLE `code_config` ( - `config_id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'ID', - `table_name` varchar(255) DEFAULT NULL COMMENT 'Table Name', - `author` varchar(255) DEFAULT NULL COMMENT 'Author', - `cover` bit(1) DEFAULT NULL COMMENT 'Override', - `module_name` varchar(255) DEFAULT NULL COMMENT 'Module Name', - `pack` varchar(255) DEFAULT NULL COMMENT 'Package Location', - `path` varchar(255) DEFAULT NULL COMMENT 'Frontend Code Generation Path', - `api_path` varchar(255) DEFAULT NULL COMMENT 'Frontend API File Path', - `prefix` varchar(255) DEFAULT NULL COMMENT 'Table Prefix', - `api_alias` varchar(255) DEFAULT NULL COMMENT 'Interface Name', - PRIMARY KEY (`config_id`) USING BTREE, - KEY `idx_table_name` (`table_name`(100)) -) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=COMPACT COMMENT='Code Generator Configuration'; - --- ---------------------------- --- Records of code_config --- ---------------------------- -BEGIN; -COMMIT; - --- ---------------------------- --- Table structure for mnt_app --- ---------------------------- -DROP TABLE IF EXISTS `mnt_app`; -CREATE TABLE `mnt_app` ( - `app_id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'ID', - `name` varchar(255) DEFAULT NULL COMMENT 'Application Name', - `upload_path` varchar(255) DEFAULT NULL COMMENT 'Upload Directory', - `deploy_path` varchar(255) DEFAULT NULL COMMENT 'Deployment Path', - `backup_path` varchar(255) DEFAULT NULL COMMENT 'Backup Path', - `port` int(255) DEFAULT NULL COMMENT 'Application Port', - `start_script` varchar(4000) DEFAULT NULL COMMENT 'Start Script', - `deploy_script` varchar(4000) DEFAULT NULL COMMENT 'Deployment Script', - `create_by` varchar(255) DEFAULT NULL COMMENT 'Created By', - `update_by` varchar(255) DEFAULT NULL COMMENT 'Updated By', - `create_time` datetime DEFAULT NULL COMMENT 'Creation Date', - `update_time` datetime DEFAULT NULL COMMENT 'Update Time', - PRIMARY KEY (`app_id`) USING BTREE -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=COMPACT COMMENT='Application Management'; - --- ---------------------------- --- Records of mnt_app --- ---------------------------- -BEGIN; -COMMIT; - --- ---------------------------- --- Table structure for mnt_database --- ---------------------------- -DROP TABLE IF EXISTS `mnt_database`; -CREATE TABLE `mnt_database` ( - `db_id` varchar(50) NOT NULL COMMENT 'ID', - `name` varchar(255) NOT NULL COMMENT 'Name', - `jdbc_url` varchar(255) NOT NULL COMMENT 'JDBC Connection', - `user_name` varchar(255) NOT NULL COMMENT 'Username', - `pwd` varchar(255) NOT NULL COMMENT 'Password', - `create_by` varchar(255) DEFAULT NULL COMMENT 'Created By', - `update_by` varchar(255) DEFAULT NULL COMMENT 'Updated By', - `create_time` datetime DEFAULT NULL COMMENT 'Creation Time', - `update_time` datetime DEFAULT NULL COMMENT 'Update Time', - PRIMARY KEY (`db_id`) USING BTREE -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=COMPACT COMMENT='Database Management'; - --- ---------------------------- --- Records of mnt_database --- ---------------------------- -BEGIN; -COMMIT; - --- ---------------------------- --- Table structure for mnt_deploy --- ---------------------------- -DROP TABLE IF EXISTS `mnt_deploy`; -CREATE TABLE `mnt_deploy` ( - `deploy_id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'ID', - `app_id` bigint(20) DEFAULT NULL COMMENT 'Application ID', - `create_by` varchar(255) DEFAULT NULL COMMENT 'Created By', - `update_by` varchar(255) DEFAULT NULL COMMENT 'Updated By', - `create_time` datetime DEFAULT NULL, - `update_time` datetime DEFAULT NULL COMMENT 'Update Time', - PRIMARY KEY (`deploy_id`) USING BTREE, - KEY `idx_app_id` (`app_id`) USING BTREE -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=COMPACT COMMENT='Deployment Management'; - --- ---------------------------- --- Records of mnt_deploy --- ---------------------------- -BEGIN; -COMMIT; - --- ---------------------------- --- Table structure for mnt_deploy_history --- ---------------------------- -DROP TABLE IF EXISTS `mnt_deploy_history`; -CREATE TABLE `mnt_deploy_history` ( - `history_id` varchar(50) NOT NULL COMMENT 'ID', - `app_name` varchar(255) NOT NULL COMMENT 'Application Name', - `deploy_date` datetime NOT NULL COMMENT 'Deployment Date', - `deploy_user` varchar(50) NOT NULL COMMENT 'Deployment User', - `ip` varchar(20) NOT NULL COMMENT 'Server IP', - `deploy_id` bigint(20) DEFAULT NULL COMMENT 'Deployment ID', - PRIMARY KEY (`history_id`) USING BTREE -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=COMPACT COMMENT='Deployment History Management'; - --- ---------------------------- --- Records of mnt_deploy_history --- ---------------------------- -BEGIN; -COMMIT; - --- ---------------------------- --- Table structure for mnt_deploy_server --- ---------------------------- -DROP TABLE IF EXISTS `mnt_deploy_server`; -CREATE TABLE `mnt_deploy_server` ( - `deploy_id` bigint(20) NOT NULL COMMENT 'Deployment ID', - `server_id` bigint(20) NOT NULL COMMENT 'Server ID', - PRIMARY KEY (`deploy_id`,`server_id`) USING BTREE, - KEY `idx_deploy_id` (`deploy_id`), - KEY `idx_server_id` (`server_id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=COMPACT COMMENT='Application and Server Association'; - --- ---------------------------- --- Records of mnt_deploy_server --- ---------------------------- -BEGIN; -COMMIT; - --- ---------------------------- --- Table structure for mnt_server --- ---------------------------- -DROP TABLE IF EXISTS `mnt_server`; -CREATE TABLE `mnt_server` ( - `server_id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'ID', - `account` varchar(50) DEFAULT NULL COMMENT 'Account', - `ip` varchar(20) DEFAULT NULL COMMENT 'IP Address', - `name` varchar(100) DEFAULT NULL COMMENT 'Name', - `password` varchar(100) DEFAULT NULL COMMENT 'Password', - `port` int(11) DEFAULT NULL COMMENT 'Port', - `create_by` varchar(255) DEFAULT NULL COMMENT 'Created By', - `update_by` varchar(255) DEFAULT NULL COMMENT 'Updated By', - `create_time` datetime DEFAULT NULL COMMENT 'Creation Time', - `update_time` datetime DEFAULT NULL COMMENT 'Update Time', - PRIMARY KEY (`server_id`) USING BTREE, - KEY `idx_ip` (`ip`) -) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=COMPACT COMMENT='Server Management'; - --- ---------------------------- --- Records of mnt_server --- ---------------------------- -BEGIN; -COMMIT; - --- ---------------------------- --- Table structure for sys_dept --- ---------------------------- -DROP TABLE IF EXISTS `sys_dept`; -CREATE TABLE `sys_dept` ( - `dept_id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'ID', - `pid` bigint(20) DEFAULT NULL COMMENT 'Parent Department', - `sub_count` int(5) DEFAULT 0 COMMENT 'Number of Sub-departments', - `name` varchar(255) NOT NULL COMMENT 'Name', - `dept_sort` int(5) DEFAULT 999 COMMENT 'Sort Order', - `enabled` bit(1) NOT NULL COMMENT 'Status', - `create_by` varchar(255) DEFAULT NULL COMMENT 'Created By', - `update_by` varchar(255) DEFAULT NULL COMMENT 'Updated By', - `create_time` datetime DEFAULT NULL COMMENT 'Creation Date', - `update_time` datetime DEFAULT NULL COMMENT 'Update Time', - PRIMARY KEY (`dept_id`) USING BTREE, - KEY `idx_pid` (`pid`), - KEY `idx_enabled` (`enabled`) -) ENGINE=InnoDB AUTO_INCREMENT=18 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=COMPACT COMMENT='Department'; - --- ---------------------------- --- Records of sys_dept --- ---------------------------- -BEGIN; -INSERT INTO `sys_dept` (`dept_id`, `pid`, `sub_count`, `name`, `dept_sort`, `enabled`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (2, 7, 1, 'R&D Department', 3, b'1', 'admin', 'admin', '2019-03-25 09:15:32', '2020-08-02 14:48:47'); -INSERT INTO `sys_dept` (`dept_id`, `pid`, `sub_count`, `name`, `dept_sort`, `enabled`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (5, 7, 0, 'Operations Department', 4, b'1', 'admin', 'admin', '2019-03-25 09:20:44', '2020-05-17 14:27:27'); -INSERT INTO `sys_dept` (`dept_id`, `pid`, `sub_count`, `name`, `dept_sort`, `enabled`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (6, 8, 0, 'Testing Department', 6, b'1', 'admin', 'admin', '2019-03-25 09:52:18', '2020-06-08 11:59:21'); -INSERT INTO `sys_dept` (`dept_id`, `pid`, `sub_count`, `name`, `dept_sort`, `enabled`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (7, NULL, 2, 'South China Branch', 0, b'1', 'admin', 'admin', '2019-03-25 11:04:50', '2020-06-08 12:08:56'); -INSERT INTO `sys_dept` (`dept_id`, `pid`, `sub_count`, `name`, `dept_sort`, `enabled`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (8, NULL, 2, 'North China Branch', 1, b'1', 'admin', 'admin', '2019-03-25 11:04:53', '2020-05-14 12:54:00'); -INSERT INTO `sys_dept` (`dept_id`, `pid`, `sub_count`, `name`, `dept_sort`, `enabled`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (15, 8, 0, 'UI Department', 7, b'1', 'admin', 'admin', '2020-05-13 22:56:53', '2020-05-14 12:54:13'); -INSERT INTO `sys_dept` (`dept_id`, `pid`, `sub_count`, `name`, `dept_sort`, `enabled`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (17, 2, 0, 'Development Group 1', 999, b'1', 'admin', 'admin', '2020-08-02 14:49:07', '2020-08-02 14:49:07'); -COMMIT; - --- ---------------------------- --- Table structure for sys_dict --- ---------------------------- -DROP TABLE IF EXISTS `sys_dict`; -CREATE TABLE `sys_dict` ( - `dict_id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'ID', - `name` varchar(255) NOT NULL COMMENT 'Dictionary Name', - `description` varchar(255) DEFAULT NULL COMMENT 'Description', - `create_by` varchar(255) DEFAULT NULL COMMENT 'Created By', - `update_by` varchar(255) DEFAULT NULL COMMENT 'Updated By', - `create_time` datetime DEFAULT NULL COMMENT 'Creation Date', - `update_time` datetime DEFAULT NULL COMMENT 'Update Time', - PRIMARY KEY (`dict_id`) USING BTREE -) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=COMPACT COMMENT='Data Dictionary'; - --- ---------------------------- --- Records of sys_dict --- ---------------------------- -BEGIN; -INSERT INTO `sys_dict` (`dict_id`, `name`, `description`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (1, 'user_status', 'User Status', NULL, NULL, '2019-10-27 20:31:36', NULL); -INSERT INTO `sys_dict` (`dict_id`, `name`, `description`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (4, 'dept_status', 'Department Status', NULL, NULL, '2019-10-27 20:31:36', NULL); -INSERT INTO `sys_dict` (`dict_id`, `name`, `description`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (5, 'job_status', 'Job Status', NULL, 'admin', '2019-10-27 20:31:36', '2025-01-14 15:48:29'); -COMMIT; - --- ---------------------------- --- Table structure for sys_dict_detail --- ---------------------------- -DROP TABLE IF EXISTS `sys_dict_detail`; -CREATE TABLE `sys_dict_detail` ( - `detail_id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'ID', - `dict_id` bigint(11) DEFAULT NULL COMMENT 'Dictionary ID', - `label` varchar(255) NOT NULL COMMENT 'Dictionary Label', - `value` varchar(255) NOT NULL COMMENT 'Dictionary Value', - `dict_sort` int(5) DEFAULT NULL COMMENT 'Sort Order', - `create_by` varchar(255) DEFAULT NULL COMMENT 'Created By', - `update_by` varchar(255) DEFAULT NULL COMMENT 'Updated By', - `create_time` datetime DEFAULT NULL COMMENT 'Creation Date', - `update_time` datetime DEFAULT NULL COMMENT 'Update Time', - PRIMARY KEY (`detail_id`) USING BTREE, - KEY `idx_dict_id` (`dict_id`) USING BTREE -) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=COMPACT COMMENT='Data Dictionary Details'; - --- ---------------------------- --- Records of sys_dict_detail --- ---------------------------- -BEGIN; -INSERT INTO `sys_dict_detail` (`detail_id`, `dict_id`, `label`, `value`, `dict_sort`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (1, 1, 'Active', 'true', 1, NULL, NULL, '2019-10-27 20:31:36', NULL); -INSERT INTO `sys_dict_detail` (`detail_id`, `dict_id`, `label`, `value`, `dict_sort`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (2, 1, 'Disabled', 'false', 2, NULL, NULL, NULL, NULL); -INSERT INTO `sys_dict_detail` (`detail_id`, `dict_id`, `label`, `value`, `dict_sort`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (3, 4, 'Enabled', 'true', 1, NULL, NULL, NULL, NULL); -INSERT INTO `sys_dict_detail` (`detail_id`, `dict_id`, `label`, `value`, `dict_sort`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (4, 4, 'Disabled', 'false', 2, NULL, NULL, '2019-10-27 20:31:36', NULL); -INSERT INTO `sys_dict_detail` (`detail_id`, `dict_id`, `label`, `value`, `dict_sort`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (5, 5, 'Enabled', 'true', 1, NULL, NULL, NULL, NULL); -INSERT INTO `sys_dict_detail` (`detail_id`, `dict_id`, `label`, `value`, `dict_sort`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (6, 5, 'Disabled', 'false', 2, NULL, NULL, '2019-10-27 20:31:36', NULL); -COMMIT; - --- ---------------------------- --- Table structure for sys_job --- ---------------------------- -DROP TABLE IF EXISTS `sys_job`; -CREATE TABLE `sys_job` ( - `job_id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'ID', - `name` varchar(180) NOT NULL COMMENT 'Job Name', - `enabled` bit(1) NOT NULL COMMENT 'Job Status', - `job_sort` int(5) DEFAULT NULL COMMENT 'Sort Order', - `create_by` varchar(255) DEFAULT NULL COMMENT 'Created By', - `update_by` varchar(255) DEFAULT NULL COMMENT 'Updated By', - `create_time` datetime DEFAULT NULL COMMENT 'Creation Date', - `update_time` datetime DEFAULT NULL COMMENT 'Update Time', - PRIMARY KEY (`job_id`) USING BTREE, - UNIQUE KEY `uniq_name` (`name`), - KEY `idx_enabled` (`enabled`) -) ENGINE=InnoDB AUTO_INCREMENT=17 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=COMPACT COMMENT='Job'; - --- ---------------------------- --- Records of sys_job --- ---------------------------- -BEGIN; -INSERT INTO `sys_job` (`job_id`, `name`, `enabled`, `job_sort`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (8, 'HR Specialist', b'1', 3, NULL, NULL, '2019-03-29 14:52:28', NULL); -INSERT INTO `sys_job` (`job_id`, `name`, `enabled`, `job_sort`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (10, 'Product Manager', b'1', 4, NULL, NULL, '2019-03-29 14:55:51', NULL); -INSERT INTO `sys_job` (`job_id`, `name`, `enabled`, `job_sort`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (11, 'Full Stack Developer', b'1', 2, NULL, 'admin', '2019-03-31 13:39:30', '2020-05-05 11:33:43'); -INSERT INTO `sys_job` (`job_id`, `name`, `enabled`, `job_sort`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (12, 'Software Tester', b'1', 5, NULL, 'admin', '2019-03-31 13:39:43', '2020-05-10 19:56:26'); -COMMIT; - --- ---------------------------- --- Table structure for sys_log --- ---------------------------- -DROP TABLE IF EXISTS `sys_log`; -CREATE TABLE `sys_log` ( - `log_id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'ID', - `description` varchar(255) DEFAULT NULL COMMENT 'Description', - `log_type` varchar(10) NOT NULL COMMENT 'Log Type: INFO/ERROR', - `method` varchar(255) DEFAULT NULL COMMENT 'Method Name', - `params` text DEFAULT NULL COMMENT 'Parameters', - `request_ip` varchar(255) DEFAULT NULL COMMENT 'Request IP', - `time` bigint(20) DEFAULT NULL COMMENT 'Execution Time', - `username` varchar(255) DEFAULT NULL COMMENT 'Username', - `address` varchar(255) DEFAULT NULL COMMENT 'Address', - `browser` varchar(255) DEFAULT NULL COMMENT 'Browser', - `exception_detail` text DEFAULT NULL COMMENT 'Exception', - `create_time` datetime NOT NULL COMMENT 'Creation Time', - PRIMARY KEY (`log_id`) USING BTREE, - KEY `idx_create_time_index` (`create_time`), - KEY `idx_log_type` (`log_type`) -) ENGINE=InnoDB AUTO_INCREMENT=3636 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=COMPACT COMMENT='System Log'; - --- ---------------------------- --- Records of sys_log --- ---------------------------- -BEGIN; -COMMIT; - --- ---------------------------- --- Table structure for sys_menu --- ---------------------------- -DROP TABLE IF EXISTS `sys_menu`; -CREATE TABLE `sys_menu` ( - `menu_id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'ID', - `pid` bigint(20) DEFAULT NULL COMMENT 'Parent Menu ID', - `sub_count` int(5) DEFAULT 0 COMMENT 'Number of Sub-menus', - `type` int(11) DEFAULT NULL COMMENT 'Menu Type', - `title` varchar(100) DEFAULT NULL COMMENT 'Menu Title', - `name` varchar(100) DEFAULT NULL COMMENT 'Component Name', - `component` varchar(255) DEFAULT NULL COMMENT 'Component', - `menu_sort` int(5) DEFAULT NULL COMMENT 'Sort Order', - `icon` varchar(255) DEFAULT NULL COMMENT 'Icon', - `path` varchar(255) DEFAULT NULL COMMENT 'Link Address', - `i_frame` bit(1) DEFAULT NULL COMMENT 'Is External Link', - `cache` bit(1) DEFAULT b'0' COMMENT 'Cache', - `hidden` bit(1) DEFAULT b'0' COMMENT 'Hidden', - `permission` varchar(255) DEFAULT NULL COMMENT 'Permission', - `create_by` varchar(255) DEFAULT NULL COMMENT 'Created By', - `update_by` varchar(255) DEFAULT NULL COMMENT 'Updated By', - `create_time` datetime DEFAULT NULL COMMENT 'Creation Date', - `update_time` datetime DEFAULT NULL COMMENT 'Update Date', - PRIMARY KEY (`menu_id`) USING BTREE, - UNIQUE KEY `uniq_name` (`name`), - UNIQUE KEY `uniq_title` (`title`), - KEY `idx_pid` (`pid`) -) ENGINE=InnoDB AUTO_INCREMENT=117 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=COMPACT COMMENT='System Menu'; - --- ---------------------------- --- Records of sys_menu --- ---------------------------- -BEGIN; -INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (1, NULL, 7, 0, 'System Management', NULL, NULL, 1, 'system', 'system', b'0', b'0', b'0', NULL, NULL, 'admin', '2018-12-18 15:11:29', '2025-01-14 15:48:18'); -INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (2, 1, 3, 1, 'User Management', 'User', 'system/user/index', 2, 'peoples', 'user', b'0', b'0', b'0', 'user:list', NULL, NULL, '2018-12-18 15:14:44', NULL); -INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (3, 1, 3, 1, 'Role Management', 'Role', 'system/role/index', 3, 'role', 'role', b'0', b'0', b'0', 'roles:list', NULL, NULL, '2018-12-18 15:16:07', NULL); -INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (5, 1, 3, 1, 'Menu Management', 'Menu', 'system/menu/index', 5, 'menu', 'menu', b'0', b'0', b'0', 'menu:list', NULL, NULL, '2018-12-18 15:17:28', NULL); -INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (6, NULL, 5, 0, 'System Monitoring', NULL, NULL, 10, 'monitor', 'monitor', b'0', b'0', b'0', NULL, NULL, NULL, '2018-12-18 15:17:48', NULL); -INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (7, 6, 0, 1, 'Operation Log', 'Log', 'monitor/log/index', 11, 'log', 'logs', b'0', b'1', b'0', NULL, NULL, 'admin', '2018-12-18 15:18:26', '2020-06-06 13:11:57'); -INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (9, 6, 0, 1, 'SQL Monitoring', 'Sql', 'monitor/sql/index', 18, 'sqlMonitor', 'druid', b'0', b'0', b'0', NULL, NULL, NULL, '2018-12-18 15:19:34', NULL); -INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (10, NULL, 5, 0, 'Component Management', NULL, NULL, 50, 'zujian', 'components', b'0', b'0', b'0', NULL, NULL, NULL, '2018-12-19 13:38:16', NULL); -INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (11, 10, 0, 1, 'Icon Library', 'Icons', 'components/icons/index', 51, 'icon', 'icon', b'0', b'0', b'0', NULL, NULL, NULL, '2018-12-19 13:38:49', NULL); -INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (14, 36, 0, 1, 'Email Tool', 'Email', 'tools/email/index', 35, 'email', 'email', b'0', b'0', b'0', NULL, NULL, NULL, '2018-12-27 10:13:09', NULL); -INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (15, 10, 0, 1, 'Rich Text', 'Editor', 'components/Editor', 52, 'fwb', 'tinymce', b'0', b'0', b'0', NULL, NULL, NULL, '2018-12-27 11:58:25', NULL); -INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (18, 36, 3, 1, 'Storage Management', 'Storage', 'tools/storage/index', 34, 'qiniu', 'storage', b'0', b'0', b'0', 'storage:list', NULL, NULL, '2018-12-31 11:12:15', NULL); -INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (19, 36, 0, 1, 'Alipay Tool', 'AliPay', 'tools/aliPay/index', 37, 'alipay', 'aliPay', b'0', b'0', b'0', NULL, NULL, NULL, '2018-12-31 14:52:38', NULL); -INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (21, NULL, 2, 0, 'Multi-level Menu', NULL, '', 900, 'menu', 'nested', b'0', b'0', b'0', NULL, NULL, 'admin', '2019-01-04 16:22:03', '2020-06-21 17:27:35'); -INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (22, 21, 2, 0, 'Second Level Menu 1', NULL, '', 999, 'menu', 'menu1', b'0', b'0', b'0', NULL, NULL, 'admin', '2019-01-04 16:23:29', '2020-06-21 17:27:20'); -INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (23, 21, 0, 1, 'Second Level Menu 2', NULL, 'nested/menu2/index', 999, 'menu', 'menu2', b'0', b'0', b'0', NULL, NULL, NULL, '2019-01-04 16:23:57', NULL); -INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (24, 22, 0, 1, 'Third Level Menu 1', 'Test', 'nested/menu1/menu1-1', 999, 'menu', 'menu1-1', b'0', b'0', b'0', NULL, NULL, NULL, '2019-01-04 16:24:48', NULL); -INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (27, 22, 0, 1, 'Third Level Menu 2', NULL, 'nested/menu1/menu1-2', 999, 'menu', 'menu1-2', b'0', b'0', b'0', NULL, NULL, NULL, '2019-01-07 17:27:32', NULL); -INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (28, 1, 3, 1, 'Task Scheduling', 'Timing', 'system/timing/index', 999, 'timing', 'timing', b'0', b'0', b'0', 'timing:list', NULL, NULL, '2019-01-07 20:34:40', NULL); -INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (30, 36, 0, 1, 'Code Generation', 'GeneratorIndex', 'generator/index', 32, 'dev', 'generator', b'0', b'1', b'0', NULL, NULL, NULL, '2019-01-11 15:45:55', NULL); -INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (32, 6, 0, 1, 'Exception Log', 'ErrorLog', 'monitor/log/errorLog', 12, 'error', 'errorLog', b'0', b'0', b'0', NULL, NULL, NULL, '2019-01-13 13:49:03', NULL); -INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (33, 10, 0, 1, 'Markdown', 'Markdown', 'components/MarkDown', 53, 'markdown', 'markdown', b'0', b'0', b'0', NULL, NULL, NULL, '2019-03-08 13:46:44', NULL); -INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (34, 10, 0, 1, 'Yaml Editor', 'YamlEdit', 'components/YamlEdit', 54, 'dev', 'yaml', b'0', b'0', b'0', NULL, NULL, NULL, '2019-03-08 15:49:40', NULL); -INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (35, 1, 3, 1, 'Department Management', 'Dept', 'system/dept/index', 6, 'dept', 'dept', b'0', b'0', b'0', 'dept:list', NULL, NULL, '2019-03-25 09:46:00', NULL); -INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (36, NULL, 6, 0, 'System Tools', NULL, '', 30, 'sys-tools', 'sys-tools', b'0', b'0', b'0', NULL, NULL, NULL, '2019-03-29 10:57:35', NULL); -INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (37, 1, 3, 1, 'Job Management', 'Job', 'system/job/index', 7, 'Steve-Jobs', 'job', b'0', b'0', b'0', 'job:list', NULL, NULL, '2019-03-29 13:51:18', NULL); -INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (39, 1, 3, 1, 'Dictionary Management', 'Dict', 'system/dict/index', 8, 'dictionary', 'dict', b'0', b'0', b'0', 'dict:list', NULL, NULL, '2019-04-10 11:49:04', NULL); -INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (41, 6, 0, 1, 'Online User', 'OnlineUser', 'monitor/online/index', 10, 'Steve-Jobs', 'online', b'0', b'0', b'0', NULL, NULL, NULL, '2019-10-26 22:08:43', NULL); -INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (44, 2, 0, 2, 'User Add', NULL, '', 2, '', '', b'0', b'0', b'0', 'user:add', NULL, NULL, '2019-10-29 10:59:46', NULL); -INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (45, 2, 0, 2, 'User Edit', NULL, '', 3, '', '', b'0', b'0', b'0', 'user:edit', NULL, NULL, '2019-10-29 11:00:08', NULL); -INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (46, 2, 0, 2, 'User Delete', NULL, '', 4, '', '', b'0', b'0', b'0', 'user:del', NULL, NULL, '2019-10-29 11:00:23', NULL); -INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (48, 3, 0, 2, 'Role Create', NULL, '', 2, '', '', b'0', b'0', b'0', 'roles:add', NULL, NULL, '2019-10-29 12:45:34', NULL); -INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (49, 3, 0, 2, 'Role Edit', NULL, '', 3, '', '', b'0', b'0', b'0', 'roles:edit', NULL, NULL, '2019-10-29 12:46:16', NULL); -INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (50, 3, 0, 2, 'Role Delete', NULL, '', 4, '', '', b'0', b'0', b'0', 'roles:del', NULL, NULL, '2019-10-29 12:46:51', NULL); -INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (52, 5, 0, 2, 'Menu Add', NULL, '', 2, '', '', b'0', b'0', b'0', 'menu:add', NULL, NULL, '2019-10-29 12:55:07', NULL); -INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (53, 5, 0, 2, 'Menu Edit', NULL, '', 3, '', '', b'0', b'0', b'0', 'menu:edit', NULL, NULL, '2019-10-29 12:55:40', NULL); -INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (54, 5, 0, 2, 'Menu Delete', NULL, '', 4, '', '', b'0', b'0', b'0', 'menu:del', NULL, NULL, '2019-10-29 12:56:00', NULL); -INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (56, 35, 0, 2, 'Department Add', NULL, '', 2, '', '', b'0', b'0', b'0', 'dept:add', NULL, NULL, '2019-10-29 12:57:09', NULL); -INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (57, 35, 0, 2, 'Department Edit', NULL, '', 3, '', '', b'0', b'0', b'0', 'dept:edit', NULL, NULL, '2019-10-29 12:57:27', NULL); -INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (58, 35, 0, 2, 'Department Delete', NULL, '', 4, '', '', b'0', b'0', b'0', 'dept:del', NULL, NULL, '2019-10-29 12:57:41', NULL); -INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (60, 37, 0, 2, 'Job Add', NULL, '', 2, '', '', b'0', b'0', b'0', 'job:add', NULL, NULL, '2019-10-29 12:58:27', NULL); -INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (61, 37, 0, 2, 'Job Edit', NULL, '', 3, '', '', b'0', b'0', b'0', 'job:edit', NULL, NULL, '2019-10-29 12:58:45', NULL); -INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (62, 37, 0, 2, 'Job Delete', NULL, '', 4, '', '', b'0', b'0', b'0', 'job:del', NULL, NULL, '2019-10-29 12:59:04', NULL); -INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (64, 39, 0, 2, 'Dictionary Add', NULL, '', 2, '', '', b'0', b'0', b'0', 'dict:add', NULL, NULL, '2019-10-29 13:00:17', NULL); -INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (65, 39, 0, 2, 'Dictionary Edit', NULL, '', 3, '', '', b'0', b'0', b'0', 'dict:edit', NULL, NULL, '2019-10-29 13:00:42', NULL); -INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (66, 39, 0, 2, 'Dictionary Delete', NULL, '', 4, '', '', b'0', b'0', b'0', 'dict:del', NULL, NULL, '2019-10-29 13:00:59', NULL); -INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (73, 28, 0, 2, 'Task Add', NULL, '', 2, '', '', b'0', b'0', b'0', 'timing:add', NULL, NULL, '2019-10-29 13:07:28', NULL); -INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (74, 28, 0, 2, 'Task Edit', NULL, '', 3, '', '', b'0', b'0', b'0', 'timing:edit', NULL, NULL, '2019-10-29 13:07:41', NULL); -INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (75, 28, 0, 2, 'Task Delete', NULL, '', 4, '', '', b'0', b'0', b'0', 'timing:del', NULL, NULL, '2019-10-29 13:07:54', NULL); -INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (77, 18, 0, 2, 'Upload File', NULL, '', 2, '', '', b'0', b'0', b'0', 'storage:add', NULL, NULL, '2019-10-29 13:09:09', NULL); -INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (78, 18, 0, 2, 'Edit File', NULL, '', 3, '', '', b'0', b'0', b'0', 'storage:edit', NULL, NULL, '2019-10-29 13:09:22', NULL); -INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (79, 18, 0, 2, 'Delete File', NULL, '', 4, '', '', b'0', b'0', b'0', 'storage:del', NULL, NULL, '2019-10-29 13:09:34', NULL); -INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (80, 6, 0, 1, 'Server Monitoring', 'ServerMonitor', 'monitor/server/index', 14, 'codeConsole', 'server', b'0', b'0', b'0', 'monitor:list', NULL, 'admin', '2019-11-07 13:06:39', '2020-05-04 18:20:50'); -INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (82, 36, 0, 1, 'Generate Configuration', 'GeneratorConfig', 'generator/config', 33, 'dev', 'generator/config/:tableName', b'0', b'1', b'1', '', NULL, NULL, '2019-11-17 20:08:56', NULL); -INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (83, 10, 0, 1, 'Chart Library', 'Echarts', 'components/Echarts', 50, 'chart', 'echarts', b'0', b'1', b'0', '', NULL, NULL, '2019-11-21 09:04:32', NULL); -INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (90, NULL, 5, 1, 'Operation and Maintenance', 'Mnt', '', 20, 'mnt', 'mnt', b'0', b'0', b'0', NULL, NULL, NULL, '2019-11-09 10:31:08', NULL); -INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (92, 90, 3, 1, 'Server', 'ServerDeploy', 'maint/server/index', 22, 'server', 'maint/serverDeploy', b'0', b'0', b'0', 'serverDeploy:list', NULL, NULL, '2019-11-10 10:29:25', NULL); -INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (93, 90, 3, 1, 'Application Management', 'App', 'maint/app/index', 23, 'app', 'maint/app', b'0', b'0', b'0', 'app:list', NULL, NULL, '2019-11-10 11:05:16', NULL); -INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (94, 90, 3, 1, 'Deployment Management', 'Deploy', 'maint/deploy/index', 24, 'deploy', 'maint/deploy', b'0', b'0', b'0', 'deploy:list', NULL, NULL, '2019-11-10 15:56:55', NULL); -INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (97, 90, 1, 1, 'Deployment Backup', 'DeployHistory', 'maint/deployHistory/index', 25, 'backup', 'maint/deployHistory', b'0', b'0', b'0', 'deployHistory:list', NULL, NULL, '2019-11-10 16:49:44', NULL); -INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (98, 90, 3, 1, 'Database Management', 'Database', 'maint/database/index', 26, 'database', 'maint/database', b'0', b'0', b'0', 'database:list', NULL, NULL, '2019-11-10 20:40:04', NULL); -INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (102, 97, 0, 2, 'Delete', NULL, '', 999, '', '', b'0', b'0', b'0', 'deployHistory:del', NULL, NULL, '2019-11-17 09:32:48', NULL); -INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (103, 92, 0, 2, 'Server Add', NULL, '', 999, '', '', b'0', b'0', b'0', 'serverDeploy:add', NULL, NULL, '2019-11-17 11:08:33', NULL); -INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (104, 92, 0, 2, 'Server Edit', NULL, '', 999, '', '', b'0', b'0', b'0', 'serverDeploy:edit', NULL, NULL, '2019-11-17 11:08:57', NULL); -INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (105, 92, 0, 2, 'Server Delete', NULL, '', 999, '', '', b'0', b'0', b'0', 'serverDeploy:del', NULL, NULL, '2019-11-17 11:09:15', NULL); -INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (106, 93, 0, 2, 'Application Add', NULL, '', 999, '', '', b'0', b'0', b'0', 'app:add', NULL, NULL, '2019-11-17 11:10:03', NULL); -INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (107, 93, 0, 2, 'Application Edit', NULL, '', 999, '', '', b'0', b'0', b'0', 'app:edit', NULL, NULL, '2019-11-17 11:10:28', NULL); -INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (108, 93, 0, 2, 'Application Delete', NULL, '', 999, '', '', b'0', b'0', b'0', 'app:del', NULL, NULL, '2019-11-17 11:10:55', NULL); -INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (109, 94, 0, 2, 'Deployment Add', NULL, '', 999, '', '', b'0', b'0', b'0', 'deploy:add', NULL, NULL, '2019-11-17 11:11:22', NULL); -INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (110, 94, 0, 2, 'Deployment Edit', NULL, '', 999, '', '', b'0', b'0', b'0', 'deploy:edit', NULL, NULL, '2019-11-17 11:11:41', NULL); -INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (111, 94, 0, 2, 'Deployment Delete', NULL, '', 999, '', '', b'0', b'0', b'0', 'deploy:del', NULL, NULL, '2019-11-17 11:12:01', NULL); -INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (116, 36, 0, 1, 'Generate Preview', 'Preview', 'generator/preview', 999, 'java', 'generator/preview/:tableName', b'0', b'1', b'1', NULL, NULL, NULL, '2019-11-26 14:54:36', NULL); -COMMIT; - --- ---------------------------- --- Table structure for sys_quartz_job --- ---------------------------- -DROP TABLE IF EXISTS `sys_quartz_job`; -CREATE TABLE `sys_quartz_job` ( - `job_id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'ID', - `bean_name` varchar(255) DEFAULT NULL COMMENT 'Spring Bean Name', - `cron_expression` varchar(255) DEFAULT NULL COMMENT 'Cron Expression', - `is_pause` bit(1) DEFAULT NULL COMMENT 'Status: 1 Paused, 0 Enabled', - `job_name` varchar(255) DEFAULT NULL COMMENT 'Job Name', - `method_name` varchar(255) DEFAULT NULL COMMENT 'Method Name', - `params` varchar(255) DEFAULT NULL COMMENT 'Parameters', - `description` varchar(255) DEFAULT NULL COMMENT 'Description', - `person_in_charge` varchar(100) DEFAULT NULL COMMENT 'Person in Charge', - `email` varchar(100) DEFAULT NULL COMMENT 'Alert Email', - `sub_task` varchar(100) DEFAULT NULL COMMENT 'Sub-task ID', - `pause_after_failure` bit(1) DEFAULT NULL COMMENT 'Pause After Failure', - `create_by` varchar(255) DEFAULT NULL COMMENT 'Created By', - `update_by` varchar(255) DEFAULT NULL COMMENT 'Updated By', - `create_time` datetime DEFAULT NULL COMMENT 'Creation Date', - `update_time` datetime DEFAULT NULL COMMENT 'Update Date', - PRIMARY KEY (`job_id`) USING BTREE, - KEY `idx_is_pause` (`is_pause`) -) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=COMPACT COMMENT='Scheduled Task'; - --- ---------------------------- --- Records of sys_quartz_job --- ---------------------------- -BEGIN; -INSERT INTO `sys_quartz_job` (`job_id`, `bean_name`, `cron_expression`, `is_pause`, `job_name`, `method_name`, `params`, `description`, `person_in_charge`, `email`, `sub_task`, `pause_after_failure`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (2, 'testTask', '0/5 * * * * ?', b'1', 'Test 1', 'run1', 'test', 'Test with parameters, use JSON for multiple parameters', 'Test', NULL, NULL, NULL, NULL, 'admin', '2019-08-22 14:08:29', '2020-05-24 13:58:33'); -INSERT INTO `sys_quartz_job` (`job_id`, `bean_name`, `cron_expression`, `is_pause`, `job_name`, `method_name`, `params`, `description`, `person_in_charge`, `email`, `sub_task`, `pause_after_failure`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (3, 'testTask', '0/5 * * * * ?', b'1', 'Test', 'run', '', 'Test without parameters', 'Zheng Jie', '', '6', b'1', NULL, 'admin', '2019-09-26 16:44:39', '2020-05-24 14:48:12'); -INSERT INTO `sys_quartz_job` (`job_id`, `bean_name`, `cron_expression`, `is_pause`, `job_name`, `method_name`, `params`, `description`, `person_in_charge`, `email`, `sub_task`, `pause_after_failure`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (5, 'Test', '0/5 * * * * ?', b'1', 'Task Alarm Test', 'run', NULL, 'Test', 'test', '', NULL, b'1', 'admin', 'admin', '2020-05-05 20:32:41', '2020-05-05 20:36:13'); -INSERT INTO `sys_quartz_job` (`job_id`, `bean_name`, `cron_expression`, `is_pause`, `job_name`, `method_name`, `params`, `description`, `person_in_charge`, `email`, `sub_task`, `pause_after_failure`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (6, 'testTask', '0/5 * * * * ?', b'1', 'Test 3', 'run2', NULL, 'Test 3', 'Zheng Jie', '', NULL, b'1', 'admin', 'admin', '2020-05-05 20:35:41', '2020-05-05 20:36:07'); -COMMIT; - --- ---------------------------- --- Table structure for sys_quartz_log --- ---------------------------- -DROP TABLE IF EXISTS `sys_quartz_log`; -CREATE TABLE `sys_quartz_log` ( - `log_id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'ID', - `bean_name` varchar(255) DEFAULT NULL COMMENT 'Bean Name', - `cron_expression` varchar(255) DEFAULT NULL COMMENT 'Cron Expression', - `is_success` bit(1) DEFAULT NULL COMMENT 'Execution Success', - `job_name` varchar(255) DEFAULT NULL COMMENT 'Job Name', - `method_name` varchar(255) DEFAULT NULL COMMENT 'Method Name', - `params` varchar(255) DEFAULT NULL COMMENT 'Parameters', - `time` bigint(20) DEFAULT NULL COMMENT 'Execution Time', - `exception_detail` text DEFAULT NULL COMMENT 'Exception Details', - `create_time` datetime DEFAULT NULL COMMENT 'Creation Time', - PRIMARY KEY (`log_id`) USING BTREE -) ENGINE=InnoDB AUTO_INCREMENT=262 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=COMPACT COMMENT='Scheduled Task Log'; - --- ---------------------------- --- Records of sys_quartz_log --- ---------------------------- -BEGIN; -COMMIT; - --- ---------------------------- --- Table structure for sys_role --- ---------------------------- -DROP TABLE IF EXISTS `sys_role`; -CREATE TABLE `sys_role` ( - `role_id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'ID', - `name` varchar(100) NOT NULL COMMENT 'Name', - `level` int(50) DEFAULT NULL COMMENT 'Role Level', - `description` varchar(255) DEFAULT NULL COMMENT 'Description', - `data_scope` varchar(255) DEFAULT NULL COMMENT 'Data Scope', - `create_by` varchar(255) DEFAULT NULL COMMENT 'Created By', - `update_by` varchar(255) DEFAULT NULL COMMENT 'Updated By', - `create_time` datetime DEFAULT NULL COMMENT 'Creation Date', - `update_time` datetime DEFAULT NULL COMMENT 'Update Date', - PRIMARY KEY (`role_id`) USING BTREE, - UNIQUE KEY `uniq_name` (`name`), - KEY `idx_level` (`level`) -) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=COMPACT COMMENT='Role Table'; - --- ---------------------------- --- Records of sys_role --- ---------------------------- -BEGIN; -INSERT INTO `sys_role` (`role_id`, `name`, `level`, `description`, `data_scope`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (1, 'Super Administrator', 1, '-', 'All', NULL, 'admin', '2018-11-23 11:04:37', '2020-08-06 16:10:24'); -INSERT INTO `sys_role` (`role_id`, `name`, `level`, `description`, `data_scope`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (2, 'Regular User', 2, '-', 'Current Level', NULL, 'admin', '2018-11-23 13:09:06', '2020-09-05 10:45:12'); -COMMIT; - --- ---------------------------- --- Table structure for sys_roles_depts --- ---------------------------- -DROP TABLE IF EXISTS `sys_roles_depts`; -CREATE TABLE `sys_roles_depts` ( - `role_id` bigint(20) NOT NULL COMMENT 'Role ID', - `dept_id` bigint(20) NOT NULL COMMENT 'Department ID', - PRIMARY KEY (`role_id`,`dept_id`) USING BTREE, - KEY `idx_role_id` (`role_id`), - KEY `idx_dept_id` (`dept_id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=COMPACT COMMENT='Role-Department Association'; - --- ---------------------------- --- Records of sys_roles_depts --- ---------------------------- -BEGIN; -COMMIT; - --- ---------------------------- --- Table structure for sys_roles_menus --- ---------------------------- -DROP TABLE IF EXISTS `sys_roles_menus`; -CREATE TABLE `sys_roles_menus` ( - `menu_id` bigint(20) NOT NULL COMMENT 'Menu ID', - `role_id` bigint(20) NOT NULL COMMENT 'Role ID', - PRIMARY KEY (`menu_id`,`role_id`) USING BTREE, - KEY `idx_menu_id` (`menu_id`), - KEY `idx_role_id` (`role_id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=COMPACT COMMENT='Role-Menu Association'; - --- ---------------------------- --- Records of sys_roles_menus --- ---------------------------- -BEGIN; -INSERT INTO `sys_roles_menus` (`menu_id`, `role_id`) VALUES (1, 1); -INSERT INTO `sys_roles_menus` (`menu_id`, `role_id`) VALUES (1, 2); -INSERT INTO `sys_roles_menus` (`menu_id`, `role_id`) VALUES (2, 1); -INSERT INTO `sys_roles_menus` (`menu_id`, `role_id`) VALUES (2, 2); -INSERT INTO `sys_roles_menus` (`menu_id`, `role_id`) VALUES (3, 1); -INSERT INTO `sys_roles_menus` (`menu_id`, `role_id`) VALUES (5, 1); -INSERT INTO `sys_roles_menus` (`menu_id`, `role_id`) VALUES (6, 1); -INSERT INTO `sys_roles_menus` (`menu_id`, `role_id`) VALUES (6, 2); -INSERT INTO `sys_roles_menus` (`menu_id`, `role_id`) VALUES (7, 1); -INSERT INTO `sys_roles_menus` (`menu_id`, `role_id`) VALUES (7, 2); -INSERT INTO `sys_roles_menus` (`menu_id`, `role_id`) VALUES (9, 1); -INSERT INTO `sys_roles_menus` (`menu_id`, `role_id`) VALUES (9, 2); -INSERT INTO `sys_roles_menus` (`menu_id`, `role_id`) VALUES (10, 1); -INSERT INTO `sys_roles_menus` (`menu_id`, `role_id`) VALUES (10, 2); -INSERT INTO `sys_roles_menus` (`menu_id`, `role_id`) VALUES (11, 1); -INSERT INTO `sys_roles_menus` (`menu_id`, `role_id`) VALUES (11, 2); -INSERT INTO `sys_roles_menus` (`menu_id`, `role_id`) VALUES (14, 1); -INSERT INTO `sys_roles_menus` (`menu_id`, `role_id`) VALUES (14, 2); -INSERT INTO `sys_roles_menus` (`menu_id`, `role_id`) VALUES (15, 1); -INSERT INTO `sys_roles_menus` (`menu_id`, `role_id`) VALUES (15, 2); -INSERT INTO `sys_roles_menus` (`menu_id`, `role_id`) VALUES (18, 1); -INSERT INTO `sys_roles_menus` (`menu_id`, `role_id`) VALUES (19, 1); -INSERT INTO `sys_roles_menus` (`menu_id`, `role_id`) VALUES (19, 2); -INSERT INTO `sys_roles_menus` (`menu_id`, `role_id`) VALUES (21, 1); -INSERT INTO `sys_roles_menus` (`menu_id`, `role_id`) VALUES (21, 2); -INSERT INTO `sys_roles_menus` (`menu_id`, `role_id`) VALUES (22, 1); -INSERT INTO `sys_roles_menus` (`menu_id`, `role_id`) VALUES (22, 2); -INSERT INTO `sys_roles_menus` (`menu_id`, `role_id`) VALUES (23, 1); -INSERT INTO `sys_roles_menus` (`menu_id`, `role_id`) VALUES (23, 2); -INSERT INTO `sys_roles_menus` (`menu_id`, `role_id`) VALUES (24, 1); -INSERT INTO `sys_roles_menus` (`menu_id`, `role_id`) VALUES (24, 2); -INSERT INTO `sys_roles_menus` (`menu_id`, `role_id`) VALUES (27, 1); -INSERT INTO `sys_roles_menus` (`menu_id`, `role_id`) VALUES (27, 2); -INSERT INTO `sys_roles_menus` (`menu_id`, `role_id`) VALUES (28, 1); -INSERT INTO `sys_roles_menus` (`menu_id`, `role_id`) VALUES (30, 1); -INSERT INTO `sys_roles_menus` (`menu_id`, `role_id`) VALUES (30, 2); -INSERT INTO `sys_roles_menus` (`menu_id`, `role_id`) VALUES (32, 1); -INSERT INTO `sys_roles_menus` (`menu_id`, `role_id`) VALUES (32, 2); -INSERT INTO `sys_roles_menus` (`menu_id`, `role_id`) VALUES (33, 1); -INSERT INTO `sys_roles_menus` (`menu_id`, `role_id`) VALUES (33, 2); -INSERT INTO `sys_roles_menus` (`menu_id`, `role_id`) VALUES (34, 1); -INSERT INTO `sys_roles_menus` (`menu_id`, `role_id`) VALUES (34, 2); -INSERT INTO `sys_roles_menus` (`menu_id`, `role_id`) VALUES (35, 1); -INSERT INTO `sys_roles_menus` (`menu_id`, `role_id`) VALUES (36, 1); -INSERT INTO `sys_roles_menus` (`menu_id`, `role_id`) VALUES (36, 2); -INSERT INTO `sys_roles_menus` (`menu_id`, `role_id`) VALUES (37, 1); -INSERT INTO `sys_roles_menus` (`menu_id`, `role_id`) VALUES (39, 1); -INSERT INTO `sys_roles_menus` (`menu_id`, `role_id`) VALUES (41, 1); -INSERT INTO `sys_roles_menus` (`menu_id`, `role_id`) VALUES (44, 1); -INSERT INTO `sys_roles_menus` (`menu_id`, `role_id`) VALUES (45, 1); -INSERT INTO `sys_roles_menus` (`menu_id`, `role_id`) VALUES (46, 1); -INSERT INTO `sys_roles_menus` (`menu_id`, `role_id`) VALUES (48, 1); -INSERT INTO `sys_roles_menus` (`menu_id`, `role_id`) VALUES (49, 1); -INSERT INTO `sys_roles_menus` (`menu_id`, `role_id`) VALUES (50, 1); -INSERT INTO `sys_roles_menus` (`menu_id`, `role_id`) VALUES (52, 1); -INSERT INTO `sys_roles_menus` (`menu_id`, `role_id`) VALUES (53, 1); -INSERT INTO `sys_roles_menus` (`menu_id`, `role_id`) VALUES (54, 1); -INSERT INTO `sys_roles_menus` (`menu_id`, `role_id`) VALUES (56, 1); -INSERT INTO `sys_roles_menus` (`menu_id`, `role_id`) VALUES (57, 1); -INSERT INTO `sys_roles_menus` (`menu_id`, `role_id`) VALUES (58, 1); -INSERT INTO `sys_roles_menus` (`menu_id`, `role_id`) VALUES (60, 1); -INSERT INTO `sys_roles_menus` (`menu_id`, `role_id`) VALUES (61, 1); -INSERT INTO `sys_roles_menus` (`menu_id`, `role_id`) VALUES (62, 1); -INSERT INTO `sys_roles_menus` (`menu_id`, `role_id`) VALUES (64, 1); -INSERT INTO `sys_roles_menus` (`menu_id`, `role_id`) VALUES (65, 1); -INSERT INTO `sys_roles_menus` (`menu_id`, `role_id`) VALUES (66, 1); -INSERT INTO `sys_roles_menus` (`menu_id`, `role_id`) VALUES (73, 1); -INSERT INTO `sys_roles_menus` (`menu_id`, `role_id`) VALUES (74, 1); -INSERT INTO `sys_roles_menus` (`menu_id`, `role_id`) VALUES (75, 1); -INSERT INTO `sys_roles_menus` (`menu_id`, `role_id`) VALUES (77, 1); -INSERT INTO `sys_roles_menus` (`menu_id`, `role_id`) VALUES (78, 1); -INSERT INTO `sys_roles_menus` (`menu_id`, `role_id`) VALUES (79, 1); -INSERT INTO `sys_roles_menus` (`menu_id`, `role_id`) VALUES (80, 1); -INSERT INTO `sys_roles_menus` (`menu_id`, `role_id`) VALUES (80, 2); -INSERT INTO `sys_roles_menus` (`menu_id`, `role_id`) VALUES (82, 1); -INSERT INTO `sys_roles_menus` (`menu_id`, `role_id`) VALUES (82, 2); -INSERT INTO `sys_roles_menus` (`menu_id`, `role_id`) VALUES (83, 1); -INSERT INTO `sys_roles_menus` (`menu_id`, `role_id`) VALUES (83, 2); -INSERT INTO `sys_roles_menus` (`menu_id`, `role_id`) VALUES (90, 1); -INSERT INTO `sys_roles_menus` (`menu_id`, `role_id`) VALUES (92, 1); -INSERT INTO `sys_roles_menus` (`menu_id`, `role_id`) VALUES (93, 1); -INSERT INTO `sys_roles_menus` (`menu_id`, `role_id`) VALUES (94, 1); -INSERT INTO `sys_roles_menus` (`menu_id`, `role_id`) VALUES (97, 1); -INSERT INTO `sys_roles_menus` (`menu_id`, `role_id`) VALUES (98, 1); -INSERT INTO `sys_roles_menus` (`menu_id`, `role_id`) VALUES (102, 1); -INSERT INTO `sys_roles_menus` (`menu_id`, `role_id`) VALUES (103, 1); -INSERT INTO `sys_roles_menus` (`menu_id`, `role_id`) VALUES (104, 1); -INSERT INTO `sys_roles_menus` (`menu_id`, `role_id`) VALUES (105, 1); -INSERT INTO `sys_roles_menus` (`menu_id`, `role_id`) VALUES (106, 1); -INSERT INTO `sys_roles_menus` (`menu_id`, `role_id`) VALUES (107, 1); -INSERT INTO `sys_roles_menus` (`menu_id`, `role_id`) VALUES (108, 1); -INSERT INTO `sys_roles_menus` (`menu_id`, `role_id`) VALUES (109, 1); -INSERT INTO `sys_roles_menus` (`menu_id`, `role_id`) VALUES (110, 1); -INSERT INTO `sys_roles_menus` (`menu_id`, `role_id`) VALUES (111, 1); -INSERT INTO `sys_roles_menus` (`menu_id`, `role_id`) VALUES (116, 1); -INSERT INTO `sys_roles_menus` (`menu_id`, `role_id`) VALUES (116, 2); -COMMIT; - --- ---------------------------- --- Table structure for sys_user --- ---------------------------- -DROP TABLE IF EXISTS `sys_user`; -CREATE TABLE `sys_user` ( - `user_id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'ID', - `dept_id` bigint(20) DEFAULT NULL COMMENT 'Department Name', - `username` varchar(180) DEFAULT NULL COMMENT 'Username', - `nick_name` varchar(255) DEFAULT NULL COMMENT 'Nickname', - `gender` varchar(2) DEFAULT NULL COMMENT 'Gender', - `phone` varchar(255) DEFAULT NULL COMMENT 'Phone Number', - `email` varchar(180) DEFAULT NULL COMMENT 'Email', - `avatar_name` varchar(255) DEFAULT NULL COMMENT 'Avatar Address', - `avatar_path` varchar(255) DEFAULT NULL COMMENT 'Avatar Real Path', - `password` varchar(255) DEFAULT NULL COMMENT 'Password', - `is_admin` bit(1) DEFAULT b'0' COMMENT 'Is Admin Account', - `enabled` bit(1) DEFAULT NULL COMMENT 'Status: 1 Enabled, 0 Disabled', - `create_by` varchar(255) DEFAULT NULL COMMENT 'Created By', - `update_by` varchar(255) DEFAULT NULL COMMENT 'Updated By', - `pwd_reset_time` datetime DEFAULT NULL COMMENT 'Password Reset Time', - `create_time` datetime DEFAULT NULL COMMENT 'Creation Date', - `update_time` datetime DEFAULT NULL COMMENT 'Update Date', - PRIMARY KEY (`user_id`) USING BTREE, - UNIQUE KEY `uniq_email` (`email`) USING BTREE, - UNIQUE KEY `uniq_username` (`username`) USING BTREE, - KEY `idx_dept_id` (`dept_id`) USING BTREE, - KEY `idx_enabled` (`enabled`) -) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=COMPACT COMMENT='System User'; - --- ---------------------------- --- Records of sys_user --- ---------------------------- -BEGIN; -INSERT INTO `sys_user` (`user_id`, `dept_id`, `username`, `nick_name`, `gender`, `phone`, `email`, `avatar_name`, `avatar_path`, `password`, `is_admin`, `enabled`, `create_by`, `update_by`, `pwd_reset_time`, `create_time`, `update_time`) VALUES (1, 2, 'admin', 'Administrator', 'Male', '18888888888', '201507802@qq.com', 'avatar-20250114101539224.png', '/Users/jie/Documents/work/me/admin/eladmin-mp/eladmin/~/avatar/avatar-20250114101539224.png', '$2a$10$Egp1/gvFlt7zhlXVfEFw4OfWQCGPw0ClmMcc6FjTnvXNRVf9zdMRa', b'1', b'1', NULL, 'admin', '2020-05-03 16:38:31', '2018-08-23 09:11:56', '2020-09-05 10:43:31'); -INSERT INTO `sys_user` (`user_id`, `dept_id`, `username`, `nick_name`, `gender`, `phone`, `email`, `avatar_name`, `avatar_path`, `password`, `is_admin`, `enabled`, `create_by`, `update_by`, `pwd_reset_time`, `create_time`, `update_time`) VALUES (2, 2, 'test', 'Test', 'Male', '19999999999', '231@qq.com', NULL, NULL, '$2a$10$4XcyudOYTSz6fue6KFNMHeUQnCX5jbBQypLEnGk1PmekXt5c95JcK', b'0', b'1', 'admin', 'admin', NULL, '2020-05-05 11:15:49', '2020-09-05 10:43:38'); -COMMIT; - --- ---------------------------- --- Table structure for sys_users_jobs --- ---------------------------- -DROP TABLE IF EXISTS `sys_users_jobs`; -CREATE TABLE `sys_users_jobs` ( - `user_id` bigint(20) NOT NULL COMMENT 'User ID', - `job_id` bigint(20) NOT NULL COMMENT 'Job ID', - PRIMARY KEY (`user_id`,`job_id`), - KEY `idx_user_id` (`user_id`), - KEY `idx_job_id` (`job_id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci COMMENT='User-Job Association Table'; - --- ---------------------------- --- Records of sys_users_jobs --- ---------------------------- -BEGIN; -INSERT INTO `sys_users_jobs` (`user_id`, `job_id`) VALUES (1, 11); -INSERT INTO `sys_users_jobs` (`user_id`, `job_id`) VALUES (2, 12); -COMMIT; - --- ---------------------------- --- Table structure for sys_users_roles --- ---------------------------- -DROP TABLE IF EXISTS `sys_users_roles`; -CREATE TABLE `sys_users_roles` ( - `user_id` bigint(20) NOT NULL COMMENT 'User ID', - `role_id` bigint(20) NOT NULL COMMENT 'Role ID', - PRIMARY KEY (`user_id`,`role_id`) USING BTREE, - KEY `idx_user_id` (`user_id`), - KEY `idx_role_id` (`role_id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=COMPACT COMMENT='User-Role Association'; - --- ---------------------------- --- Records of sys_users_roles --- ---------------------------- -BEGIN; -INSERT INTO `sys_users_roles` (`user_id`, `role_id`) VALUES (1, 1); -INSERT INTO `sys_users_roles` (`user_id`, `role_id`) VALUES (2, 2); -COMMIT; - --- ---------------------------- --- Table structure for tool_alipay_config --- ---------------------------- -DROP TABLE IF EXISTS `tool_alipay_config`; -CREATE TABLE `tool_alipay_config` ( - `config_id` bigint(20) NOT NULL COMMENT 'ID', - `app_id` varchar(255) DEFAULT NULL COMMENT 'App ID', - `charset` varchar(255) DEFAULT NULL COMMENT 'Encoding', - `format` varchar(255) DEFAULT NULL COMMENT 'Type (fixed format: json)', - `gateway_url` varchar(255) DEFAULT NULL COMMENT 'Gateway URL', - `notify_url` varchar(255) DEFAULT NULL COMMENT 'Async Callback', - `private_key` text DEFAULT NULL COMMENT 'Private Key', - `public_key` text DEFAULT NULL COMMENT 'Public Key', - `return_url` varchar(255) DEFAULT NULL COMMENT 'Callback URL', - `sign_type` varchar(255) DEFAULT NULL COMMENT 'Signature Type', - `sys_service_provider_id` varchar(255) DEFAULT NULL COMMENT 'Merchant ID', - PRIMARY KEY (`config_id`) USING BTREE -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=COMPACT COMMENT='Alipay Configuration'; - --- ---------------------------- --- Records of tool_alipay_config --- ---------------------------- -BEGIN; -COMMIT; - --- ---------------------------- --- Table structure for tool_email_config --- ---------------------------- -DROP TABLE IF EXISTS `tool_email_config`; -CREATE TABLE `tool_email_config` ( - `config_id` bigint(20) NOT NULL COMMENT 'ID', - `from_user` varchar(255) DEFAULT NULL COMMENT 'Sender', - `host` varchar(255) DEFAULT NULL COMMENT 'SMTP Server Address', - `pass` varchar(255) DEFAULT NULL COMMENT 'Password', - `port` varchar(255) DEFAULT NULL COMMENT 'Port', - `user` varchar(255) DEFAULT NULL COMMENT 'Sender Username', - PRIMARY KEY (`config_id`) USING BTREE -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=COMPACT COMMENT='Email Configuration'; - --- ---------------------------- --- Records of tool_email_config --- ---------------------------- -BEGIN; -COMMIT; - --- ---------------------------- --- Table structure for tool_local_storage --- ---------------------------- -DROP TABLE IF EXISTS `tool_local_storage`; -CREATE TABLE `tool_local_storage` ( - `storage_id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'ID', - `real_name` varchar(255) DEFAULT NULL COMMENT 'Real File Name', - `name` varchar(255) DEFAULT NULL COMMENT 'File Name', - `suffix` varchar(255) DEFAULT NULL COMMENT 'Suffix', - `path` varchar(255) DEFAULT NULL COMMENT 'Path', - `type` varchar(255) DEFAULT NULL COMMENT 'Type', - `size` varchar(100) DEFAULT NULL COMMENT 'Size', - `create_by` varchar(255) DEFAULT NULL COMMENT 'Created By', - `update_by` varchar(255) DEFAULT NULL COMMENT 'Updated By', - `create_time` datetime DEFAULT NULL COMMENT 'Creation Date', - `update_time` datetime DEFAULT NULL COMMENT 'Update Time', - PRIMARY KEY (`storage_id`) USING BTREE -) ENGINE=InnoDB AUTO_INCREMENT=12 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=COMPACT COMMENT='Local Storage'; - --- ---------------------------- --- Records of tool_local_storage --- ---------------------------- -BEGIN; -COMMIT; - --- ---------------------------- --- Table structure for tool_qiniu_config --- ---------------------------- -DROP TABLE IF EXISTS `tool_qiniu_config`; -CREATE TABLE `tool_qiniu_config` ( - `config_id` bigint(20) NOT NULL COMMENT 'ID', - `access_key` text DEFAULT NULL COMMENT 'accessKey', - `bucket` varchar(255) DEFAULT NULL COMMENT 'Bucket Identifier', - `host` varchar(255) NOT NULL COMMENT 'External Domain', - `secret_key` text DEFAULT NULL COMMENT 'secretKey', - `type` varchar(255) DEFAULT NULL COMMENT 'Space Type', - `zone` varchar(255) DEFAULT NULL COMMENT 'Zone', - PRIMARY KEY (`config_id`) USING BTREE -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=COMPACT COMMENT='Qiniu Cloud Configuration'; - --- ---------------------------- --- Records of tool_qiniu_config --- ---------------------------- -BEGIN; -COMMIT; - --- ---------------------------- --- Table structure for tool_qiniu_content --- ---------------------------- -DROP TABLE IF EXISTS `tool_qiniu_content`; -CREATE TABLE `tool_qiniu_content` ( - `content_id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'ID', - `bucket` varchar(255) DEFAULT NULL COMMENT 'Bucket Identifier', - `name` varchar(180) DEFAULT NULL COMMENT 'File Name', - `size` varchar(255) DEFAULT NULL COMMENT 'File Size', - `type` varchar(255) DEFAULT NULL COMMENT 'File Type: Private or Public', - `url` varchar(255) DEFAULT NULL COMMENT 'File URL', - `suffix` varchar(255) DEFAULT NULL COMMENT 'File Suffix', - `update_time` datetime DEFAULT NULL COMMENT 'Upload or Sync Time', - PRIMARY KEY (`content_id`) USING BTREE, - UNIQUE KEY `uniq_name` (`name`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=COMPACT COMMENT='Qiniu Cloud File Storage'; - --- ---------------------------- --- Records of tool_qiniu_content --- ---------------------------- -BEGIN; -COMMIT; - -SET FOREIGN_KEY_CHECKS = 1;