diff --git a/ruoyi/sql/test.sql b/ruoyi/sql/test.sql deleted file mode 100644 index e3020de6..00000000 --- a/ruoyi/sql/test.sql +++ /dev/null @@ -1,57 +0,0 @@ -/* - Navicat Premium Data Transfer - - Source Server : 192.168.0.222 - Source Server Type : MySQL - Source Server Version : 80019 - Source Host : 192.168.0.222:3306 - Source Schema : ry-vue - - Target Server Type : MySQL - Target Server Version : 80019 - File Encoding : 65001 - - Date: 14/02/2020 13:29:11 -*/ - -SET NAMES utf8mb4; -SET FOREIGN_KEY_CHECKS = 0; - --- ---------------------------- --- Table structure for chkj_test --- ---------------------------- -DROP TABLE IF EXISTS `chkj_test`; -CREATE TABLE `chkj_test` ( - `id` int(0) NOT NULL AUTO_INCREMENT COMMENT '主键', - `test_key` varchar(255) NOT NULL DEFAULT '' COMMENT 'key键', - `value` varchar(255) NOT NULL DEFAULT '' COMMENT '值', - `version` int(0) NULL DEFAULT 0 COMMENT '版本', - `create_time` datetime(0) NULL DEFAULT NULL COMMENT '创建时间', - `deleted` tinyint(0) NULL DEFAULT 0 COMMENT '删除状态', - PRIMARY KEY (`id`) USING BTREE -) ENGINE = InnoDB AUTO_INCREMENT = 4 COMMENT = '测试表' ROW_FORMAT = Dynamic; - --- ---------------------------- --- Records of gen_table --- ---------------------------- -INSERT INTO `gen_table` VALUES (1, 'chkj_test', '测试表', 'CsTest', 'crud', 'com.ruoyi.project.cstest', 'cstest', 'cstest', '测试', 'Lion Li', '{}', 'admin', '2020-02-12 03:39:31', '', '2020-02-14 04:55:27', '测试代码生成器'); - --- ---------------------------- --- Records of gen_table_column --- ---------------------------- -INSERT INTO `gen_table_column` VALUES (1, '1', 'id', '主键', 'int', 'Integer', 'id', '1', '1', NULL, '1', NULL, NULL, NULL, 'EQ', 'input', '', 1, 'admin', '2020-02-12 03:39:31', '', '2020-02-14 04:55:27'); -INSERT INTO `gen_table_column` VALUES (2, '1', 'test_key', 'key键', 'varchar(255)', 'String', 'testKey', '0', '0', '1', '1', '1', '1', '1', 'LIKE', 'input', '', 2, 'admin', '2020-02-12 03:39:31', '', '2020-02-14 04:55:27'); -INSERT INTO `gen_table_column` VALUES (3, '1', 'value', '值', 'varchar(255)', 'String', 'value', '0', '0', '1', '1', '1', '1', '1', 'LIKE', 'input', '', 3, 'admin', '2020-02-12 03:39:31', '', '2020-02-14 04:55:27'); -INSERT INTO `gen_table_column` VALUES (4, '1', 'version', '版本', 'int', 'Integer', 'version', '0', '0', '1', NULL, NULL, NULL, NULL, 'EQ', 'input', '', 4, 'admin', '2020-02-12 03:39:31', '', '2020-02-14 04:55:27'); -INSERT INTO `gen_table_column` VALUES (5, '1', 'create_time', '创建时间', 'datetime', 'Date', 'createTime', '0', '0', '1', NULL, NULL, '1', '1', 'EQ', 'datetime', '', 5, 'admin', '2020-02-12 03:39:31', '', '2020-02-14 04:55:27'); -INSERT INTO `gen_table_column` VALUES (6, '1', 'deleted', '删除状态', 'tinyint', 'Integer', 'deleted', '0', '0', '1', NULL, NULL, NULL, NULL, 'EQ', 'input', '', 6, 'admin', '2020-02-12 03:39:31', '', '2020-02-14 04:55:27'); - -INSERT INTO `sys_menu`(`menu_id`, `menu_name`, `parent_id`, `order_num`, `path`, `component`, `is_frame`, `menu_type`, `visible`, `perms`, `icon`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (2000, '测试用例', 0, 5, '', NULL, 1, 'M', '0', NULL, 'bug', 'admin', '2020-02-12 03:57:28', '', NULL, ''); -INSERT INTO `sys_menu`(`menu_id`, `menu_name`, `parent_id`, `order_num`, `path`, `component`, `is_frame`, `menu_type`, `visible`, `perms`, `icon`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (2007, '测试', 2000, 1, 'cstest', 'cstest/cstest/index', 1, 'C', '0', 'cstest:cstest:list', '#', 'admin', '2018-03-01 00:00:00', 'ry', '2018-03-01 00:00:00', '测试菜单'); -INSERT INTO `sys_menu`(`menu_id`, `menu_name`, `parent_id`, `order_num`, `path`, `component`, `is_frame`, `menu_type`, `visible`, `perms`, `icon`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (2008, '测试查询', 2007, 1, '#', '', 1, 'F', '0', 'cstest:cstest:query', '#', 'admin', '2018-03-01 00:00:00', 'ry', '2018-03-01 00:00:00', ''); -INSERT INTO `sys_menu`(`menu_id`, `menu_name`, `parent_id`, `order_num`, `path`, `component`, `is_frame`, `menu_type`, `visible`, `perms`, `icon`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (2009, '测试新增', 2007, 2, '#', '', 1, 'F', '0', 'cstest:cstest:add', '#', 'admin', '2018-03-01 00:00:00', 'ry', '2018-03-01 00:00:00', ''); -INSERT INTO `sys_menu`(`menu_id`, `menu_name`, `parent_id`, `order_num`, `path`, `component`, `is_frame`, `menu_type`, `visible`, `perms`, `icon`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (2010, '测试修改', 2007, 3, '#', '', 1, 'F', '0', 'cstest:cstest:edit', '#', 'admin', '2018-03-01 00:00:00', 'ry', '2018-03-01 00:00:00', ''); -INSERT INTO `sys_menu`(`menu_id`, `menu_name`, `parent_id`, `order_num`, `path`, `component`, `is_frame`, `menu_type`, `visible`, `perms`, `icon`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (2011, '测试删除', 2007, 4, '#', '', 1, 'F', '0', 'cstest:cstest:remove', '#', 'admin', '2018-03-01 00:00:00', 'ry', '2018-03-01 00:00:00', ''); -INSERT INTO `sys_menu`(`menu_id`, `menu_name`, `parent_id`, `order_num`, `path`, `component`, `is_frame`, `menu_type`, `visible`, `perms`, `icon`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (2012, '测试导出', 2007, 5, '#', '', 1, 'F', '0', 'cstest:cstest:export', '#', 'admin', '2018-03-01 00:00:00', 'ry', '2018-03-01 00:00:00', ''); - -SET FOREIGN_KEY_CHECKS = 1; \ No newline at end of file diff --git a/ruoyi/src/main/java/com/ruoyi/project/cstest/controller/CsTestController.java b/ruoyi/src/main/java/com/ruoyi/project/cstest/controller/CsTestController.java deleted file mode 100644 index 2c4edc28..00000000 --- a/ruoyi/src/main/java/com/ruoyi/project/cstest/controller/CsTestController.java +++ /dev/null @@ -1,114 +0,0 @@ -package com.ruoyi.project.cstest.controller; - -import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; - -import java.util.List; -import java.util.Arrays; - -import com.ruoyi.common.utils.StringUtils; -import lombok.AllArgsConstructor; -import org.springframework.security.access.prepost.PreAuthorize; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.PostMapping; -import org.springframework.web.bind.annotation.PutMapping; -import org.springframework.web.bind.annotation.DeleteMapping; -import org.springframework.web.bind.annotation.PathVariable; -import org.springframework.web.bind.annotation.RequestBody; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RestController; -import com.ruoyi.framework.aspectj.lang.annotation.Log; -import com.ruoyi.framework.aspectj.lang.enums.BusinessType; -import com.ruoyi.project.cstest.domain.CsTest; -import com.ruoyi.project.cstest.service.ICsTestService; -import com.ruoyi.framework.web.controller.BaseController; -import com.ruoyi.framework.web.domain.AjaxResult; -import com.ruoyi.common.utils.poi.ExcelUtil; -import com.ruoyi.framework.web.page.TableDataInfo; - -/** - * 测试Controller - * - * @author Lion Li - * @date 2020-02-14 - */ -@AllArgsConstructor -@RestController -@RequestMapping("/cstest/cstest" ) -public class CsTestController extends BaseController { - - private final ICsTestService iCsTestService; - - /** - * 查询测试列表 - */ - @PreAuthorize("@ss.hasPermi('cstest:cstest:list')" ) - @GetMapping("/list" ) - public TableDataInfo list(CsTest csTest) { - startPage(); - LambdaQueryWrapper lqw = new LambdaQueryWrapper(); - if (StringUtils.isNotBlank(csTest.getTestKey())){ - lqw.like(CsTest::getTestKey ,csTest.getTestKey()); - } - if (StringUtils.isNotBlank(csTest.getValue())){ - lqw.like(CsTest::getValue ,csTest.getValue()); - } - if (csTest.getCreateTime() != null){ - lqw.eq(CsTest::getCreateTime ,csTest.getCreateTime()); - } - List list = iCsTestService.list(lqw); - return getDataTable(list); - } - - /** - * 导出测试列表 - */ - @PreAuthorize("@ss.hasPermi('cstest:cstest:export')" ) - @Log(title = "测试" , businessType = BusinessType.EXPORT) - @GetMapping("/export" ) - public AjaxResult export(CsTest csTest) { - LambdaQueryWrapper lqw = new LambdaQueryWrapper(csTest); - List list = iCsTestService.list(lqw); - ExcelUtil util = new ExcelUtil(CsTest. class); - return util.exportExcel(list, "cstest" ); - } - - /** - * 获取测试详细信息 - */ - @PreAuthorize("@ss.hasPermi('cstest:cstest:query')" ) - @GetMapping(value = "/{id}" ) - public AjaxResult getInfo(@PathVariable("id" ) Integer id) { - return AjaxResult.success(iCsTestService.getById(id)); - } - - /** - * 新增测试 - */ - @PreAuthorize("@ss.hasPermi('cstest:cstest:add')" ) - @Log(title = "测试" , businessType = BusinessType.INSERT) - @PostMapping - public AjaxResult add(@RequestBody CsTest csTest) { - return toAjax(iCsTestService.save(csTest) ? 1 : 0); - } - - /** - * 修改测试 - */ - @PreAuthorize("@ss.hasPermi('cstest:cstest:edit')" ) - @Log(title = "测试" , businessType = BusinessType.UPDATE) - @PutMapping - public AjaxResult edit(@RequestBody CsTest csTest) { - return toAjax(iCsTestService.updateById(csTest) ? 1 : 0); - } - - /** - * 删除测试 - */ - @PreAuthorize("@ss.hasPermi('cstest:cstest:remove')" ) - @Log(title = "测试" , businessType = BusinessType.DELETE) - @DeleteMapping("/{ids}" ) - public AjaxResult remove(@PathVariable Integer[] ids) { - return toAjax(iCsTestService.removeByIds(Arrays.asList(ids)) ? 1 : 0); - } -} diff --git a/ruoyi/src/main/java/com/ruoyi/project/cstest/domain/CsTest.java b/ruoyi/src/main/java/com/ruoyi/project/cstest/domain/CsTest.java deleted file mode 100644 index 583c6885..00000000 --- a/ruoyi/src/main/java/com/ruoyi/project/cstest/domain/CsTest.java +++ /dev/null @@ -1,62 +0,0 @@ -package com.ruoyi.project.cstest.domain; - -import com.baomidou.mybatisplus.annotation.*; -import com.fasterxml.jackson.annotation.JsonFormat; -import lombok.Data; -import lombok.EqualsAndHashCode; -import lombok.NoArgsConstructor; -import lombok.ToString; -import lombok.experimental.Accessors; -import com.ruoyi.framework.aspectj.lang.annotation.Excel; - -import java.io.Serializable; -import java.util.Date; - -/** - * 测试对象 chkj_test - * - * @author Lion Li - * @date 2020-02-14 - */ -@Data -@ToString -@EqualsAndHashCode -@NoArgsConstructor -@Accessors(chain = true) -@TableName("chkj_test") -public class CsTest implements Serializable { - -private static final long serialVersionUID=1L; - - - /** 主键 */ - @TableId(value = "id", type = IdType.AUTO) - private Integer id; - - - /** key键 */ - @Excel(name = "key键") - private String testKey; - - - /** 值 */ - @Excel(name = "值") - private String value; - - - /** 版本 */ - @Version - private Integer version; - - - /** 创建时间 */ - @Excel(name = "创建时间" , width = 30, dateFormat = "yyyy-MM-dd") - @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") - private Date createTime; - - - /** 删除状态 */ - @TableLogic - private Integer deleted; - -} diff --git a/ruoyi/src/main/java/com/ruoyi/project/cstest/mapper/CsTestMapper.java b/ruoyi/src/main/java/com/ruoyi/project/cstest/mapper/CsTestMapper.java deleted file mode 100644 index 6034f3ba..00000000 --- a/ruoyi/src/main/java/com/ruoyi/project/cstest/mapper/CsTestMapper.java +++ /dev/null @@ -1,14 +0,0 @@ -package com.ruoyi.project.cstest.mapper; - -import com.ruoyi.project.cstest.domain.CsTest; -import com.baomidou.mybatisplus.core.mapper.BaseMapper; - -/** - * 测试Mapper接口 - * - * @author Lion Li - * @date 2020-02-14 - */ -public interface CsTestMapper extends BaseMapper { - -} diff --git a/ruoyi/src/main/java/com/ruoyi/project/cstest/service/ICsTestService.java b/ruoyi/src/main/java/com/ruoyi/project/cstest/service/ICsTestService.java deleted file mode 100644 index d579d58a..00000000 --- a/ruoyi/src/main/java/com/ruoyi/project/cstest/service/ICsTestService.java +++ /dev/null @@ -1,14 +0,0 @@ -package com.ruoyi.project.cstest.service; - -import com.ruoyi.project.cstest.domain.CsTest; -import com.baomidou.mybatisplus.extension.service.IService; - -/** - * 测试Service接口 - * - * @author Lion Li - * @date 2020-02-14 - */ -public interface ICsTestService extends IService { - -} diff --git a/ruoyi/src/main/java/com/ruoyi/project/cstest/service/impl/CsTestServiceImpl.java b/ruoyi/src/main/java/com/ruoyi/project/cstest/service/impl/CsTestServiceImpl.java deleted file mode 100644 index 9b00e9bb..00000000 --- a/ruoyi/src/main/java/com/ruoyi/project/cstest/service/impl/CsTestServiceImpl.java +++ /dev/null @@ -1,18 +0,0 @@ -package com.ruoyi.project.cstest.service.impl; - -import org.springframework.stereotype.Service; -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import com.ruoyi.project.cstest.mapper.CsTestMapper; -import com.ruoyi.project.cstest.domain.CsTest; -import com.ruoyi.project.cstest.service.ICsTestService; - -/** - * 测试Service业务层处理 - * - * @author Lion Li - * @date 2020-02-14 - */ -@Service -public class CsTestServiceImpl extends ServiceImpl implements ICsTestService { - -}