duhuizhe
2024-04-19 64c4fd3c7067c7626dc960a70b4bc2c3662bc653
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
package com.yqzx.generator.action.model;
 
import com.yqzx.generator.config.JDBCTemplate;
import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Configuration;
 
import java.util.List;
 
/**
 * @description: 代码生成web传参
 * @author: chaoyapeng
 * @time: 2020/8/18 15:50
 */
@Data
@Configuration
@ConfigurationProperties(prefix = "geo")
public class GenQo {
    /**
     * 数据库驱动
     */
    private String driverName;
 
    /**
     * 数据库账号
     */
    private String userName;
 
    /**
     * 数据库密码
     */
    private String password;
 
    /**
     * 数据库连接地址
     */
    private String ip;
 
    /**
     * 数据库端口
     */
    private String port;
 
    /**
     * 数据库名
     */
    private String dataBaseName;
 
    /**
     * 数据库url
     */
//    private String url;
 
    /**
     * 项目地址
     */
    private String projectPath;
 
    /**
     * 作者
     */
    private String author;
 
    /**
     * 项目的包
     */
    private String projectPackage;
 
    /**
     * 表名称
     */
    private String tableName;
 
    /**
     * 业务名称
     */
    private String bizName;
 
    /**
     * 是否生成控制器代码开关
     */
    private Boolean controllerSwitch = false;
 
    /**
     * service
     */
    private Boolean serviceSwitch = false;
 
    /**
     * mapper的开关
     */
    private Boolean mapperSwitch = false;
 
    /**
     * 实体类的开关
     */
    private Boolean modelSwitch = false;
 
    /**
     * 查询实体类的开关
     */
    private Boolean querySwitch = false;
 
    /**
     * 查询参数对象
     */
    private List<TableInfo> queryTableInfo;
 
    /**
     * 获取数据库url 地址
     *
     * @return 数据库连接url
     */
    public String getUrl() {
        return String.format(JDBCTemplate.MYSQL_JDBC, this.getIp(), this.getPort(), this.getDataBaseName());
    }
}