Skip to content

Commit 20e91ef

Browse files
authoredAug 25, 2019
Merge pull request #32 from geekidea/dev
🏇 5 Minutes Finish CRUD Former-commit-id: d352970abafd0171f21253d9d10a2020c18143ea
2 parents e235169 + 765697b commit 20e91ef

File tree

15 files changed

+523
-9
lines changed

15 files changed

+523
-9
lines changed
 

‎CHANGELOG.md

+2
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,15 @@
1818
- Add `DownloadHandler` `DefaultDownloadHandler` 文件下载回调自定义处理器
1919
- Modify `config/WebMvcConfig` --> `core/SpringBootPlusWebMvcConfig`
2020
- Modify `ImageController` --> `ResouceController`,请求路径 `/api/resource`
21+
- Add `SysUser` CRUD
2122

2223
### 🐞 Bug Fixes
2324
- Fix 文件下载路径潜在安全漏洞,过滤 `../` 非法路径参数
2425
- Fix 优化文件下载,Firefox 中文乱码问题
2526

2627
### 📔 Documentation
2728
- [spring-boot-plus-architecture](https://raw.githubusercontent.com/geekidea/spring-boot-plus/master/docs/img/spring-boot-plus-architecture.jpg)
29+
- [5 Minutes Finish CRUD](https://github.com/geekidea/spring-boot-plus#5-minutes-finish-crud)
2830

2931
### 🔨 Dependency Upgrades
3032
- `pom.xml` 使用 `spring-boot-starter-validation` 替换 `hibernate-validator` 依赖

‎README-zh.md

+82-1
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,82 @@ cd spring-boot-plus
8888
mvn clean package -Plocal
8989
```
9090

91-
### 项目入口类
91+
92+
## 5分钟完成增删改查
93+
94+
### 创建数据库表
95+
```sql
96+
-- ----------------------------
97+
-- Table structure for sys_user
98+
-- ----------------------------
99+
drop table if exists `sys_user`;
100+
create table sys_user(
101+
id bigint not null comment '主键',
102+
name varchar(20) null comment '用户名称',
103+
account varchar(20) not null comment '账号',
104+
pwd varchar(20) not null comment '密码',
105+
remark varchar(200) null comment '备注',
106+
create_time timestamp default CURRENT_TIMESTAMP null comment '创建时间',
107+
update_time timestamp null comment '修改时间',
108+
primary key (`id`),
109+
constraint sys_user_account_uindex
110+
unique (account)
111+
) comment '系统用户';
112+
-- ----------------------------
113+
-- Records of sys_user
114+
-- ----------------------------
115+
INSERT INTO sys_user (id, name, account, pwd, remark, create_time, update_time) VALUES (1, 'Administrator', 'admin', '123456', 'Administrator Account', '2019-08-26 00:52:01', null);
116+
117+
```
118+
119+
### CodeGenerator CRUD
120+
> 修改数据库信息
121+
122+
>修改组件名称/作者/数据库表名称/主键id
123+
124+
```text
125+
/src/test/java/io/geekidea/springbootplus/test/CodeGenerator.java
126+
```
127+
128+
```java
129+
/**
130+
* spring-boot-plus代码生成器入口类
131+
* @author geekidea
132+
* @date 2018-11-08
133+
*/
134+
public class CodeGenerator {
135+
private static final String USER_NAME = "root";
136+
private static final String PASSWORD = "root";
137+
private static final String DRIVER_NAME = "com.mysql.jdbc.Driver";
138+
private static final String DRIVER_URL = "jdbc:mysql://localhost:3306/spring_boot_plus?useUnicode=true&characterEncoding=UTF-8&useSSL=false";
139+
// CODE...
140+
// ############################ 配置部分 start ############################
141+
// 模块名称
142+
private static final String MODULE_NAME = "system";
143+
// 作者
144+
private static final String AUTHOR = "geekidea";
145+
// 生成的表名称
146+
private static final String TABLE_NAME = "sys_user";
147+
// 主键数据库列名称
148+
private static final String PK_ID_COLUMN_NAME = "id";
149+
// 代码生成策略 true:All/false:SIMPLE
150+
private static final boolean GENERATOR_STRATEGY = true;
151+
// 分页列表查询是否排序 true:有排序参数/false:无
152+
private static final boolean PAGE_LIST_ORDER = false;
153+
// ############################ 配置部分 end ############################
154+
155+
public static void main(String[] args) {
156+
// Run...
157+
}
158+
}
159+
```
160+
161+
### 启动项目
162+
> 项目入口类
163+
```text
164+
/src/main/java/io/geekidea/springbootplus/SpringBootPlusApplication.java
165+
```
166+
92167
```java
93168
/**
94169
* spring-boot-plus 项目启动入口
@@ -114,6 +189,12 @@ public class SpringBootPlusApplication {
114189
}
115190
```
116191

192+
### 访问项目swagger文档
193+
[http://127.0.0.1:8888/swagger-ui.html](http://127.0.0.1:8888/swagger-ui.html)
194+
195+
### 系统用户 增删改查分页Swagger
196+
![sys_user_swagger-zh.png](https://raw.githubusercontent.com/geekidea/spring-boot-plus/master/docs/img/sys_user_swagger-zh.png)
197+
117198
## 快速开始
118199
[快速开始](https://springboot.plus/guide/quick-start.html)
119200

‎README.md

+86-5
Original file line numberDiff line numberDiff line change
@@ -27,15 +27,15 @@
2727
## Purpose
2828
> Everyone can develop projects independently, quickly and efficiently!
2929
30-
## Docs
30+
## Repository
3131
#### [GITHUB](https://github.com/geekidea/spring-boot-plus) | [GITEE](https://gitee.com/geekidea/spring-boot-plus)
3232

33-
#### Website:[springboot.plus](http://springboot.plus "springboot.plus")
33+
#### Website
34+
#### [springboot.plus](http://springboot.plus "springboot.plus")
3435

3536
# Architecture
3637
![spring-boot-plus-architecture.jpg](https://raw.githubusercontent.com/geekidea/spring-boot-plus/master/docs/img/spring-boot-plus-architecture.jpg)
3738

38-
3939
## Features
4040
- Integrated spring boot common development component set, common configuration, AOP log, etc
4141
- Integrated mybatis-plus fast dao operation
@@ -48,7 +48,6 @@
4848
- Integrated Spring Boot Admin, real-time detection of project operation
4949
- Integrate maven-assembly-plugin for different environment package deployment, including startup and restart commands, and extract configuration files to external config directory
5050

51-
5251
### Project Environment
5352
Middleware | Version | Remark
5453
-|-|-
@@ -88,7 +87,82 @@ cd spring-boot-plus
8887
mvn clean package -Plocal
8988
```
9089

91-
### Project Main Class
90+
91+
## 5 Minutes Finish CRUD
92+
93+
### 1. Create Table
94+
```sql
95+
-- ----------------------------
96+
-- Table structure for sys_user
97+
-- ----------------------------
98+
drop table if exists `sys_user`;
99+
create table sys_user(
100+
id bigint not null comment 'id',
101+
name varchar(20) null comment 'name',
102+
account varchar(20) not null comment 'account',
103+
pwd varchar(20) not null comment 'password',
104+
remark varchar(200) null comment 'remark',
105+
create_time timestamp default CURRENT_TIMESTAMP null comment 'create time',
106+
update_time timestamp null comment 'update time',
107+
primary key (`id`),
108+
constraint sys_user_account_uindex
109+
unique (account)
110+
) comment 'SystemUser';
111+
-- ----------------------------
112+
-- Records of sys_user
113+
-- ----------------------------
114+
INSERT INTO sys_user (id, name, account, pwd, remark, create_time, update_time) VALUES (1, 'Administrator', 'admin', '123456', 'Administrator Account', '2019-08-26 00:52:01', null);
115+
116+
```
117+
118+
### 2. Generator CRUD CODE
119+
> Modify database info
120+
121+
> Modify module name / author / table name / primary key id
122+
123+
```text
124+
/src/test/java/io/geekidea/springbootplus/test/CodeGenerator.java
125+
```
126+
127+
```java
128+
/**
129+
* spring-boot-plus Code Generator
130+
* @author geekidea
131+
* @date 2018-11-08
132+
*/
133+
public class CodeGenerator {
134+
private static final String USER_NAME = "root";
135+
private static final String PASSWORD = "root";
136+
private static final String DRIVER_NAME = "com.mysql.jdbc.Driver";
137+
private static final String DRIVER_URL = "jdbc:mysql://localhost:3306/spring_boot_plus?useUnicode=true&characterEncoding=UTF-8&useSSL=false";
138+
// CODE...
139+
// ############################ Config start ############################
140+
// Module name
141+
private static final String MODULE_NAME = "system";
142+
// Author
143+
private static final String AUTHOR = "geekidea";
144+
// Table name
145+
private static final String TABLE_NAME = "sys_user";
146+
// Primary key id
147+
private static final String PK_ID_COLUMN_NAME = "id";
148+
// Generator strategy. true:All / false:SIMPLE
149+
private static final boolean GENERATOR_STRATEGY = true;
150+
// Pagination list query Whether to sort. true:sort/false:non
151+
private static final boolean PAGE_LIST_ORDER = false;
152+
// ############################ Config end ############################
153+
154+
public static void main(String[] args) {
155+
// Run...
156+
}
157+
}
158+
```
159+
160+
### 3. Startup Project
161+
> Project Main Class
162+
```text
163+
/src/main/java/io/geekidea/springbootplus/SpringBootPlusApplication.java
164+
```
165+
92166
```java
93167
/**
94168
* spring-boot-plus Project Main Class
@@ -114,6 +188,13 @@ public class SpringBootPlusApplication {
114188
}
115189
```
116190

191+
### 4. Access project swagger docs
192+
[http://127.0.0.1:8888/swagger-ui.html](http://127.0.0.1:8888/swagger-ui.html)
193+
194+
### 5. SysUser CRUD Swagger
195+
![sys_user_swagger.png](https://raw.githubusercontent.com/geekidea/spring-boot-plus/master/docs/img/sys_user_swagger.png)
196+
197+
117198
## Quick Start
118199
[Quick Start](https://springboot.plus/guide/quick-start.html)
119200

‎docs/img/sys_user_swagger-zh.png

112 KB
Loading

‎docs/img/sys_user_swagger.png

103 KB
Loading
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
package io.geekidea.springbootplus.system.entity;
2+
3+
import com.baomidou.mybatisplus.annotation.IdType;
4+
import java.util.Date;
5+
import com.baomidou.mybatisplus.annotation.TableId;
6+
import io.geekidea.springbootplus.common.entity.BaseEntity;
7+
import io.swagger.annotations.ApiModel;
8+
import io.swagger.annotations.ApiModelProperty;
9+
import lombok.Data;
10+
import lombok.EqualsAndHashCode;
11+
12+
import java.util.Date;
13+
14+
/**
15+
* <p>
16+
* SystemUser
17+
* </p>
18+
*
19+
* @author geekidea
20+
* @since 2019-08-26
21+
*/
22+
@Data
23+
@EqualsAndHashCode(callSuper = true)
24+
@ApiModel(value="SysUser对象", description="SystemUser")
25+
public class SysUser extends BaseEntity {
26+
27+
private static final long serialVersionUID = 1L;
28+
29+
@ApiModelProperty(value = "id")
30+
@TableId(value = "id", type = IdType.ID_WORKER)
31+
private Long id;
32+
33+
@ApiModelProperty(value = "name")
34+
private String name;
35+
36+
@ApiModelProperty(value = "account")
37+
private String account;
38+
39+
@ApiModelProperty(value = "password")
40+
private String pwd;
41+
42+
@ApiModelProperty(value = "remark")
43+
private String remark;
44+
45+
@ApiModelProperty(value = "create time")
46+
private Date createTime;
47+
48+
@ApiModelProperty(value = "update time")
49+
private Date updateTime;
50+
51+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
package io.geekidea.springbootplus.system.mapper;
2+
3+
import com.baomidou.mybatisplus.core.metadata.IPage;
4+
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
5+
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
6+
import io.geekidea.springbootplus.system.entity.SysUser;
7+
import io.geekidea.springbootplus.system.web.param.SysUserQueryParam;
8+
import io.geekidea.springbootplus.system.web.vo.SysUserQueryVo;
9+
import org.apache.ibatis.annotations.Param;
10+
import org.springframework.stereotype.Repository;
11+
12+
import java.io.Serializable;
13+
14+
/**
15+
* <p>
16+
* SystemUser Mapper 接口
17+
* </p>
18+
*
19+
* @author geekidea
20+
* @since 2019-08-26
21+
*/
22+
@Repository
23+
public interface SysUserMapper extends BaseMapper<SysUser> {
24+
25+
/**
26+
* 根据ID获取查询对象
27+
* @param id
28+
* @return
29+
*/
30+
SysUserQueryVo getSysUserById(Serializable id);
31+
32+
/**
33+
* 获取分页对象
34+
* @param page
35+
* @param sysUserQueryParam
36+
* @return
37+
*/
38+
IPage<SysUserQueryVo> getSysUserPageList(@Param("page") Page page, @Param("param") SysUserQueryParam sysUserQueryParam);
39+
40+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
package io.geekidea.springbootplus.system.service;
2+
3+
import io.geekidea.springbootplus.system.entity.SysUser;
4+
import io.geekidea.springbootplus.common.service.BaseService;
5+
import io.geekidea.springbootplus.system.web.param.SysUserQueryParam;
6+
import io.geekidea.springbootplus.system.web.vo.SysUserQueryVo;
7+
import io.geekidea.springbootplus.common.web.vo.Paging;
8+
9+
import java.io.Serializable;
10+
11+
/**
12+
* <p>
13+
* SystemUser 服务类
14+
* </p>
15+
*
16+
* @author geekidea
17+
* @since 2019-08-26
18+
*/
19+
public interface SysUserService extends BaseService<SysUser> {
20+
21+
/**
22+
* 根据ID获取查询对象
23+
* @param id
24+
* @return
25+
*/
26+
SysUserQueryVo getSysUserById(Serializable id) throws Exception;
27+
28+
/**
29+
* 获取分页对象
30+
* @param sysUserQueryParam
31+
* @return
32+
*/
33+
Paging<SysUserQueryVo> getSysUserPageList(SysUserQueryParam sysUserQueryParam) throws Exception;
34+
35+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
package io.geekidea.springbootplus.system.service.impl;
2+
3+
import io.geekidea.springbootplus.system.entity.SysUser;
4+
import io.geekidea.springbootplus.system.mapper.SysUserMapper;
5+
import io.geekidea.springbootplus.system.service.SysUserService;
6+
import io.geekidea.springbootplus.system.web.param.SysUserQueryParam;
7+
import io.geekidea.springbootplus.system.web.vo.SysUserQueryVo;
8+
import io.geekidea.springbootplus.common.service.impl.BaseServiceImpl;
9+
import io.geekidea.springbootplus.common.web.vo.Paging;
10+
import lombok.extern.slf4j.Slf4j;
11+
import org.springframework.stereotype.Service;
12+
import org.springframework.transaction.annotation.Transactional;
13+
import org.springframework.beans.factory.annotation.Autowired;
14+
15+
import com.baomidou.mybatisplus.core.metadata.IPage;
16+
import com.baomidou.mybatisplus.core.metadata.OrderItem;
17+
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
18+
import java.io.Serializable;
19+
20+
21+
/**
22+
* <p>
23+
* SystemUser 服务实现类
24+
* </p>
25+
*
26+
* @author geekidea
27+
* @since 2019-08-26
28+
*/
29+
@Slf4j
30+
@Service
31+
@Transactional(rollbackFor = Exception.class)
32+
public class SysUserServiceImpl extends BaseServiceImpl<SysUserMapper, SysUser> implements SysUserService {
33+
34+
@Autowired
35+
private SysUserMapper sysUserMapper;
36+
37+
@Override
38+
public SysUserQueryVo getSysUserById(Serializable id) throws Exception{
39+
return sysUserMapper.getSysUserById(id);
40+
}
41+
42+
@Override
43+
public Paging<SysUserQueryVo> getSysUserPageList(SysUserQueryParam sysUserQueryParam) throws Exception{
44+
Page page = setPageParam(sysUserQueryParam,OrderItem.desc("create_time"));
45+
IPage<SysUserQueryVo> iPage = sysUserMapper.getSysUserPageList(page,sysUserQueryParam);
46+
return new Paging(iPage);
47+
}
48+
49+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
package io.geekidea.springbootplus.system.web.controller;
2+
3+
import io.geekidea.springbootplus.system.entity.SysUser;
4+
import io.geekidea.springbootplus.system.service.SysUserService;
5+
import io.geekidea.springbootplus.system.web.param.SysUserQueryParam;
6+
import io.geekidea.springbootplus.system.web.vo.SysUserQueryVo;
7+
import io.geekidea.springbootplus.common.web.controller.BaseController;
8+
import io.geekidea.springbootplus.common.api.ApiResult;
9+
import io.swagger.annotations.Api;
10+
import io.swagger.annotations.ApiOperation;
11+
import lombok.extern.slf4j.Slf4j;
12+
import org.springframework.beans.factory.annotation.Autowired;
13+
import org.springframework.web.bind.annotation.PostMapping;
14+
import org.springframework.web.bind.annotation.RequestBody;
15+
import org.springframework.web.bind.annotation.RequestMapping;
16+
import org.springframework.web.bind.annotation.RestController;
17+
18+
import javax.validation.Valid;
19+
20+
import io.geekidea.springbootplus.common.web.vo.Paging;
21+
import io.geekidea.springbootplus.common.web.param.IdParam;
22+
23+
/**
24+
* <p>
25+
* SystemUser 前端控制器
26+
* </p>
27+
*
28+
* @author geekidea
29+
* @since 2019-08-26
30+
*/
31+
@Slf4j
32+
@RestController
33+
@RequestMapping("/sysUser")
34+
@Api("SystemUser API")
35+
public class SysUserController extends BaseController {
36+
37+
@Autowired
38+
private SysUserService sysUserService;
39+
40+
/**
41+
* Save SystemUser
42+
*/
43+
@PostMapping("/add")
44+
@ApiOperation(value = "Save SysUser",notes = "Save SystemUser",response = ApiResult.class)
45+
public ApiResult<Boolean> addSysUser(@Valid @RequestBody SysUser sysUser) throws Exception{
46+
boolean flag = sysUserService.save(sysUser);
47+
return ApiResult.result(flag);
48+
}
49+
50+
/**
51+
* Update SystemUser
52+
*/
53+
@PostMapping("/update")
54+
@ApiOperation(value = "Update SysUser",notes = "Update SystemUser",response = ApiResult.class)
55+
public ApiResult<Boolean> updateSysUser(@Valid @RequestBody SysUser sysUser) throws Exception{
56+
boolean flag = sysUserService.updateById(sysUser);
57+
return ApiResult.result(flag);
58+
}
59+
60+
/**
61+
* Delete SystemUser
62+
*/
63+
@PostMapping("/delete")
64+
@ApiOperation(value = "Delete SysUser",notes = "Delete SystemUser",response = ApiResult.class)
65+
public ApiResult<Boolean> deleteSysUser(@Valid @RequestBody IdParam idParam) throws Exception{
66+
boolean flag = sysUserService.removeById(idParam.getId());
67+
return ApiResult.result(flag);
68+
}
69+
70+
/**
71+
* Get SystemUser
72+
*/
73+
@PostMapping("/info")
74+
@ApiOperation(value = "Get SysUser Detail",notes = "SystemUser Info",response = SysUserQueryVo.class)
75+
public ApiResult<SysUserQueryVo> getSysUser(@Valid @RequestBody IdParam idParam) throws Exception{
76+
SysUserQueryVo sysUserQueryVo = sysUserService.getSysUserById(idParam.getId());
77+
return ApiResult.ok(sysUserQueryVo);
78+
}
79+
80+
/**
81+
* SystemUser Pagination
82+
*/
83+
@PostMapping("/getPageList")
84+
@ApiOperation(value = "Get SysUserPagination",notes = "SystemUser Pagination",response = SysUserQueryVo.class)
85+
public ApiResult<Paging<SysUserQueryVo>> getSysUserPageList(@Valid @RequestBody(required = false) SysUserQueryParam sysUserQueryParam) throws Exception{
86+
Paging<SysUserQueryVo> paging = sysUserService.getSysUserPageList(sysUserQueryParam);
87+
return ApiResult.ok(paging);
88+
}
89+
90+
}
91+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
package io.geekidea.springbootplus.system.web.param;
2+
3+
import io.swagger.annotations.ApiModel;
4+
import lombok.Data;
5+
import lombok.EqualsAndHashCode;
6+
7+
import io.geekidea.springbootplus.common.web.param.QueryParam;
8+
9+
/**
10+
* <p>
11+
* SystemUser 查询参数对象
12+
* </p>
13+
*
14+
* @author geekidea
15+
* @date 2019-08-26
16+
*/
17+
@Data
18+
@EqualsAndHashCode(callSuper = true)
19+
@ApiModel(value="SysUserQueryParam对象", description="SystemUser查询参数")
20+
public class SysUserQueryParam extends QueryParam {
21+
private static final long serialVersionUID = 1L;
22+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
package io.geekidea.springbootplus.system.web.vo;
2+
3+
import io.swagger.annotations.ApiModel;
4+
import io.swagger.annotations.ApiModelProperty;
5+
import lombok.Data;
6+
import java.io.Serializable;
7+
8+
import java.util.Date;
9+
10+
/**
11+
* <p>
12+
* SystemUser 查询结果对象
13+
* </p>
14+
*
15+
* @author geekidea
16+
* @date 2019-08-26
17+
*/
18+
@Data
19+
@ApiModel(value="SysUserQueryVo对象", description="SystemUser查询参数")
20+
public class SysUserQueryVo implements Serializable{
21+
private static final long serialVersionUID = 1L;
22+
23+
@ApiModelProperty(value = "id")
24+
private Long id;
25+
26+
@ApiModelProperty(value = "name")
27+
private String name;
28+
29+
@ApiModelProperty(value = "account")
30+
private String account;
31+
32+
@ApiModelProperty(value = "password")
33+
private String pwd;
34+
35+
@ApiModelProperty(value = "remark")
36+
private String remark;
37+
38+
@ApiModelProperty(value = "create time")
39+
private Date createTime;
40+
41+
@ApiModelProperty(value = "update time")
42+
private Date updateTime;
43+
44+
}

‎src/main/resources/config/application-local.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ spring:
3131
datasource:
3232
url: jdbc:mysql://localhost:3306/spring_boot_plus?serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf8&useSSL=false&allowPublicKeyRetrieval=true
3333
username: root
34-
password: rootroot
34+
password: root
3535

3636
# Redis配置
3737
redis:
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
3+
<mapper namespace="io.geekidea.springbootplus.system.mapper.SysUserMapper">
4+
5+
<!-- 通用查询结果列 -->
6+
<sql id="Base_Column_List">
7+
id, name, account, pwd, remark, create_time, update_time
8+
</sql>
9+
10+
<select id="getSysUserById" resultType="io.geekidea.springbootplus.system.web.vo.SysUserQueryVo">
11+
select <include refid="Base_Column_List"/> from sys_user where id = #{id}
12+
</select>
13+
14+
<select id="getSysUserPageList" resultType="io.geekidea.springbootplus.system.web.vo.SysUserQueryVo">
15+
select <include refid="Base_Column_List"/> from sys_user
16+
</select>
17+
18+
</mapper>

‎src/test/java/io/geekidea/springbootplus/test/CodeGenerator.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -59,9 +59,9 @@ public class CodeGenerator {
5959
// 作者
6060
private static final String AUTHOR = "geekidea";
6161
// 生成的表名称
62-
private static final String TABLE_NAME = "sys_log";
62+
private static final String TABLE_NAME = "sys_user";
6363
// 主键数据库列名称
64-
private static final String PK_ID_COLUMN_NAME = "log_id";
64+
private static final String PK_ID_COLUMN_NAME = "id";
6565
// 代码生成策略 true:All/false:SIMPLE
6666
private static final boolean GENERATOR_STRATEGY = true;
6767
// 分页列表查询是否排序 true:有排序参数/false:无

0 commit comments

Comments
 (0)
Please sign in to comment.