Skip to content

Commit

Permalink
更换域名dolyw.com
Browse files Browse the repository at this point in the history
  • Loading branch information
dolyw committed May 11, 2019
1 parent a5fc04f commit 2f1fd79
Show file tree
Hide file tree
Showing 30 changed files with 81 additions and 83 deletions.
20 changes: 10 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
## ViewGenerator

[![License](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)
[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](https://github.com/wang926454/SpringBootGenerator/pulls)
[![GitHub stars](https://img.shields.io/github/stars/wang926454/SpringBootGenerator.svg?style=social&label=Stars)](https://github.com/wang926454/SpringBootGenerator)
[![GitHub forks](https://img.shields.io/github/forks/wang926454/SpringBootGenerator.svg?style=social&label=Fork)](https://github.com/wang926454/SpringBootGenerator)
[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](https://github.com/dolyw/ViewGenerator/pulls)
[![GitHub stars](https://img.shields.io/github/stars/dolyw/ViewGenerator.svg?style=social&label=Stars)](https://github.com/dolyw/ViewGenerator)
[![GitHub forks](https://img.shields.io/github/forks/dolyw/ViewGenerator.svg?style=social&label=Fork)](https://github.com/dolyw/ViewGenerator)

> 可视化自定义模板代码生成系统
#### 项目相关

版本 | 操作 | 链接
----|------|----
SpringBoot1.5(第一版) | Test类生成代码 | [https://github.com/wang926454/SpringBootGenerator/releases](https://github.com/wang926454/SpringBootGenerator/releases)
SpringBoot2.1(第二版) | Test类生成代码 | [https://github.com/wang926454/SpringBootGenerator/releases](https://github.com/wang926454/SpringBootGenerator/releases)
SpringBoot1.5(第一版) | Test类生成代码 | [https://github.com/dolyw/ViewGenerator/releases](https://github.com/dolyw/ViewGenerator/releases)
SpringBoot2.1(第二版) | Test类生成代码 | [https://github.com/dolyw/ViewGenerator/releases](https://github.com/dolyw/ViewGenerator/releases)
SpringBoot1.5(第三版) | 可视化界面或Test类两种 | 当前

#### 项目介绍
Expand Down Expand Up @@ -43,23 +43,23 @@ SpringBoot + Mybatis + PageHelper + 通用Mapper + Thymeleaf(Amaze UI(布局) +
```
启动首页界面
```
![image text](https://docs.wang64.cn/Project/ViewGenerator/image/20190406001.png)
![image text](https://docs.dolyw.com/Project/ViewGenerator/image/20190406001.png)
```
生成代码界面如下
```
![image text](https://docs.wang64.cn/Project/ViewGenerator/image/20190406002.png)
![image text](https://docs.dolyw.com/Project/ViewGenerator/image/20190406002.png)
```
查看表详细信息界面如下
```
![image text](https://docs.wang64.cn/Project/ViewGenerator/image/20190406003.png)
![image text](https://docs.dolyw.com/Project/ViewGenerator/image/20190406003.png)
```
输入表名生成代码界面如下
```
![image text](https://docs.wang64.cn/Project/ViewGenerator/image/20190406004.png)
![image text](https://docs.dolyw.com/Project/ViewGenerator/image/20190406004.png)
```
配置更新界面如下
```
![image text](https://docs.wang64.cn/Project/ViewGenerator/image/20190406005.png)
![image text](https://docs.dolyw.com/Project/ViewGenerator/image/20190406005.png)

#### 搭建参考

Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/example/Application.java
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

/**
* Application
* @author Wang926454
* @author dolyw.com
* @date 2018/11/16 19:29
*/
@SpringBootApplication
Expand Down
38 changes: 19 additions & 19 deletions src/main/java/com/example/common/IBaseService.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

/**
* IBaseService
* @author Wang926454
* @author dolyw.com
* @date 2018/8/9 15:45
*/
public interface IBaseService<T> {
Expand All @@ -17,7 +17,7 @@ public interface IBaseService<T> {
* 根据实体中的属性值进行查询,查询条件使用等号
* @param record
* @return java.util.List<T>
* @author Wang926454
* @author dolyw.com
* @date 2018/8/9 15:43
*/
List<T> select(T record);
Expand All @@ -26,7 +26,7 @@ public interface IBaseService<T> {
* 根据主键字段进行查询,方法参数必须包含完整的主键属性,查询条件使用等号
* @param key
* @return T
* @author Wang926454
* @author dolyw.com
* @date 2018/8/9 15:43
*/
T selectByPrimaryKey(Object key);
Expand All @@ -35,7 +35,7 @@ public interface IBaseService<T> {
* 查询全部结果,select(null)方法能达到同样的效果
* @param
* @return java.util.List<T>
* @author Wang926454
* @author dolyw.com
* @date 2018/8/9 15:43
*/
List<T> selectAll();
Expand All @@ -44,7 +44,7 @@ public interface IBaseService<T> {
* 根据实体中的属性进行查询,只能有一个返回值,有多个结果是抛出异常,查询条件使用等号
* @param record
* @return T
* @author Wang926454
* @author dolyw.com
* @date 2018/8/9 15:43
*/
T selectOne(T record);
Expand All @@ -53,7 +53,7 @@ public interface IBaseService<T> {
* 根据实体中的属性查询总数,查询条件使用等号
* @param record
* @return int
* @author Wang926454
* @author dolyw.com
* @date 2018/8/9 15:43
*/
int selectCount(T record);
Expand All @@ -63,7 +63,7 @@ public interface IBaseService<T> {
* 保存一个实体,null的属性也会保存,不会使用数据库默认值
* @param record
* @return int
* @author Wang926454
* @author dolyw.com
* @date 2018/8/9 15:43
*/
int insert(T record);
Expand All @@ -72,7 +72,7 @@ public interface IBaseService<T> {
* 保存一个实体,null的属性不会保存,会使用数据库默认值
* @param record
* @return int
* @author Wang926454
* @author dolyw.com
* @date 2018/8/9 15:43
*/
int insertSelective(T record);
Expand All @@ -82,7 +82,7 @@ public interface IBaseService<T> {
* 根据主键更新实体全部字段,null值会被更新
* @param record
* @return int
* @author Wang926454
* @author dolyw.com
* @date 2018/8/9 15:43
*/
int updateByPrimaryKey(T record);
Expand All @@ -91,7 +91,7 @@ public interface IBaseService<T> {
* 根据主键更新属性不为null的值
* @param record
* @return int
* @author Wang926454
* @author dolyw.com
* @date 2018/8/9 15:43
*/
int updateByPrimaryKeySelective(T record);
Expand All @@ -101,7 +101,7 @@ public interface IBaseService<T> {
* 根据实体属性作为条件进行删除,查询条件使用等号
* @param record
* @return int
* @author Wang926454
* @author dolyw.com
* @date 2018/8/9 15:43
*/
int delete(T record);
Expand All @@ -110,7 +110,7 @@ public interface IBaseService<T> {
* 根据主键字段进行删除,方法参数必须包含完整的主键属性
* @param key
* @return int
* @author Wang926454
* @author dolyw.com
* @date 2018/8/9 15:44
*/
int deleteByPrimaryKey(Object key);
Expand All @@ -120,7 +120,7 @@ public interface IBaseService<T> {
* 根据Example条件进行查询,这个查询支持通过Example类指定查询列,通过selectProperties方法指定查询列
* @param example
* @return java.util.List<T>
* @author Wang926454
* @author dolyw.com
* @date 2018/8/9 15:44
*/
List<T> selectByExample(Object example);
Expand All @@ -129,7 +129,7 @@ public interface IBaseService<T> {
* 根据Example条件进行查询总数
* @param example
* @return int
* @author Wang926454
* @author dolyw.com
* @date 2018/8/9 15:44
*/
int selectCountByExample(Object example);
Expand All @@ -139,7 +139,7 @@ public interface IBaseService<T> {
* @param record
* @param example
* @return int
* @author Wang926454
* @author dolyw.com
* @date 2018/8/9 15:44
*/
int updateByExample(@Param("record") T record, @Param("example") Object example);
Expand All @@ -149,7 +149,7 @@ public interface IBaseService<T> {
* @param record
* @param example
* @return int
* @author Wang926454
* @author dolyw.com
* @date 2018/8/9 15:44
*/
int updateByExampleSelective(@Param("record") T record, @Param("example") Object example);
Expand All @@ -158,7 +158,7 @@ public interface IBaseService<T> {
* 根据Example条件删除数据
* @param example
* @return int
* @author Wang926454
* @author dolyw.com
* @date 2018/8/9 15:44
*/
int deleteByExample(Object example);
Expand All @@ -169,7 +169,7 @@ public interface IBaseService<T> {
* @param record
* @param rowBounds
* @return java.util.List<T>
* @author Wang926454
* @author dolyw.com
* @date 2018/8/9 15:44
*/
List<T> selectByRowBounds(T record, RowBounds rowBounds);
Expand All @@ -179,7 +179,7 @@ public interface IBaseService<T> {
* @param example
* @param rowBounds
* @return java.util.List<T>
* @author Wang926454
* @author dolyw.com
* @date 2018/8/9 15:44
*/
List<T> selectByExampleAndRowBounds(Object example, RowBounds rowBounds);
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/example/common/ResponseBean.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

/**
* ResponseBean
* @author Wang926454
* @author dolyw.com
* @date 2018/8/30 11:39
*/
public class ResponseBean {
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/example/common/impl/BaseServiceImpl.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

/**
* BaseServiceImpl
* @author Wang926454
* @author dolyw.com
* @date 2018/8/9 15:45
*/
public abstract class BaseServiceImpl<T> implements IBaseService<T> {
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/com/example/config/DataBaseConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

/**
* Dao配置注入
* @author Wang926454
* @author dolyw.com
* @date 2019/4/5 17:56
*/
@Configuration
Expand All @@ -36,7 +36,7 @@ public class DataBaseConfig {
* @param
* @throws
* @return com.example.dao.GeneratorDao
* @author Wang926454
* @author dolyw.com
* @date 2019/4/5 17:59
*/
@Bean
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/example/config/ExceptionAdvice.java
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

/**
* 异常控制处理器
* @author Wang926454
* @author dolyw.com
* @date 2018/8/30 14:02
*/
@RestControllerAdvice
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/example/config/WebMvcConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

/**
* SpringBoot全局支持CORS(跨源请求)的配置
* @author Wang926454
* @author dolyw.com
* @date 2018/8/9 17:28
*/
@Configuration
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/example/constant/Constant.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

/**
* Constant
* @author Wang926454
* @author dolyw.com
* @date 2019/4/6 19:50
*/
public interface Constant {
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/example/constant/DataBaseEnum.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

/**
* 数据库类型
* @author Wang926454
* @author dolyw.com
* @date 2019/4/6 19:53
*/
public enum DataBaseEnum {
Expand Down
22 changes: 11 additions & 11 deletions src/main/java/com/example/controller/DataBaseController.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* PDMS wliduo https://github.com/wang926454
* Created By Wang926454
* PDMS wliduo https://github.com/dolyw
* Created By dolyw.com
* Date By (2019-04-05 18:00:26)
*/
package com.example.controller;
Expand Down Expand Up @@ -67,7 +67,7 @@ public DataBaseController(GeneratorDao generatorDao) {

/**
* 列表
* @author Wang926454
* @author dolyw.com
* @date 2019-04-05 18:00:26
*/
@GetMapping
Expand All @@ -94,7 +94,7 @@ public ResponseBean list(@RequestParam(defaultValue = "1") Integer page,

/**
* 获取所有表名
* @author Wang926454
* @author dolyw.com
* @date 2019-04-08 16:00:26
*/
@GetMapping("/tableNames/all")
Expand All @@ -114,7 +114,7 @@ public ResponseBean all() {

/**
* 表详细字段信息
* @author Wang926454
* @author dolyw.com
* @date 2019-04-05 18:00:26
*/
@GetMapping("/{tableName}")
Expand All @@ -128,7 +128,7 @@ public ResponseBean detail(@PathVariable("tableName") String tableName) {

/**
* 生成代码到输出路径
* @author Wang926454
* @author dolyw.com
* @date 2019-04-05 18:00:26
*/
@PostMapping("/{tableName}")
Expand Down Expand Up @@ -163,7 +163,7 @@ public ResponseBean genTable(@PathVariable("tableName") String tableName) throws

/**
* 生成代码为Zip文件下载
* @author Wang926454
* @author dolyw.com
* @date 2019-04-05 18:00:26
*/
@GetMapping("/zip/{tableName}")
Expand All @@ -181,7 +181,7 @@ public void genTableToZip(@PathVariable("tableName") String tableName,
}
// 生成代码到临时路径
if (genCode(tableNames, tempDir.getPath())) {
StringBuilder comment = new StringBuilder("项目地址:https://github.com/wang926454/SpringBootGenerator\r\n\r\n");
StringBuilder comment = new StringBuilder("项目地址:https://github.com/dolyw/ViewGenerator\r\n\r\n");
for (String tempName : tableNames) {
comment.append(tempName + "\r\n");
}
Expand All @@ -203,7 +203,7 @@ public void genTableToZip(@PathVariable("tableName") String tableName,

/**
* 打开Windows系统的代码输出文件夹
* @author Wang926454
* @author dolyw.com
* @date 2019-04-05 18:00:26
*/
@GetMapping("/open")
Expand All @@ -225,7 +225,7 @@ public ResponseBean open() {

/**
* 读取更新配置文件generator.properties
* @author Wang926454
* @author dolyw.com
* @date 2019-04-05 18:00:26
*/
@PutMapping("/config")
Expand Down Expand Up @@ -288,7 +288,7 @@ public ResponseBean config(@RequestBody Map<String, String> config) {
* @param outRoot 代码输出文件夹
* @throws IOException
* @return boolean
* @author Wang926454
* @author dolyw.com
* @date 2019/4/8 17:19
*/
public boolean genCode(String[] tableNames, String outRoot) throws IOException {
Expand Down
Loading

0 comments on commit 2f1fd79

Please sign in to comment.