• 准备有空开发一个管理端代码生成器


    1

    选择项目架构。

    1. 前后端一体的mysql+redis+spring boot+spring mvc+mybatis plus+shiro+jsp+jquery+bootstrap+tomcat。
    2. 前后端一体的mysql+redis+spring boot+spring mvc+mybatis plus+shiro+freemarker/thymeleaf+jquery+bootstrap+tomcat
    3. 前后端分离的mysql+redis+spring boot+spring mvc+mybatis plus+shiro+jwt+vue+elementUI+nginx+tomcat
    4. 前后端分离的mysql+redis+spring cloud+spring boot+spring mvc+mybatis plus+jwt+shiro+vue+elementUI+nginx+tomcat

    确定管理员和用户是同一张表还是不同表。
    确定前端密码加密方式(md5、rsa、des、aes)。
    确定数据库密码加密方式(md5、rsa、des、aes)。

    2

    勾选基础功能。

    1. 文件上传下载,支持配置文件切换上传方式(alioss、awsoss、ftp、local)。
    2. 发送短信,支持配置文件切换短信接口提供商(ali、tencent、chuanlan)。
    3. 发送邮件。
    4. 图形验证码。
    5. 国际化。
    6. 翻译,支持配置文件切换翻译接口提供商(baidu、google、youdao、microsoft、kingsoft)。
    7. AOP全局日志、异常、事务。
    8. 注册(邮箱、手机号)
    9. 登录(邮箱、手机号)
    10. 忘记密码
    11. 修改密码
    12. 修改账户信息
    13. 记住账号密码/记住token
    14. 网页端第三方登录跳转方式(wechat、qq、weibo、google、facebook、twitter)
    15. 网页端第三方登录扫码方式(wechat、qq、weibo、google、facebook、twitter)
    16. APP端第三方登录(wechat、qq、weibo、google、facebook、twitter)

    3

    提供每个表的建表语句即可。

    drop table if exists `news`;
    create table `news` (
    `id` int primary key not null auto_increment,
    news_type tinyint not null default 1 comment '新闻类型,1自有新闻,2合作伙伴新闻',
    source_id  int comment '新闻来源表id,source_news表,外键,如果为空则表示该新闻为原创文章',
    partner varchar(50) comment '合作伙伴,partner新闻合作伙伴表id,外键',
    `media` varchar(50) comment '来源媒体,新闻来源的媒体,外键,对应media表id',
    `newsid` varchar(50) comment '源ID,新闻合作伙伴推送过来时自带的新闻id',
    `author` varchar(50) comment '作者,新闻发布的作者',
    `digest` varchar(200) comment '新闻内容摘要,允许为null',
    `content` text not null comment '新闻内容,含相关页面标签如

    等', `ctext` text not null comment '新闻内容,不含相关页面标签', `title` varchar(200) not null comment '标题', `img1` varchar(200) comment '图片链接1', `img2` varchar(200) comment '图片链接2', `img3` varchar(200) comment '图片链接3', `newsurl` varchar(200) comment 'http链接,新闻详情指向的URL', `newsurlhttps` varchar(200) comment 'https链接,新闻详情指向的https URL', `source_channel` varchar(50) comment '源频道,源频道是合作方提供,到底是频道id还是频道name不用管,用映射关系表和我们的频道进行对应', `copyright` varchar(500) comment '版权说明', `type` tinyint default 1 comment '新闻类型,1普通新闻,2图文新闻', is_contain_image tinyint default 0 comment'是否包含图片,0未知,1包含,2不包含', image_count int default 0 comment'图片个数', `newstime` datetime comment '新闻发生时间', push_time datetime comment '发布时间,此发布时间是在我们系统发布时间,与source_news表的push_time无关', `remark` varchar(200) comment '备注', create_admin_user_id int comment '创建人,发布人用户(管理端)id,外键', update_admin_user_id int comment '最后修改人', push_admin_user_id int comment '最后发布人', `valid` tinyint not null default '1' comment '状态,0=无效,1=有效,3=已删除', `is_auto_import` tinyint not null default 3 comment '是否系统自动导入,1系统自动导入,2人为手动导入,3非导入', `is_not_review` tinyint not null default 1 comment '是否免审,1需要审核,2无需审核', `status` tinyint not null default 1 comment '发布状态,1草稿(未修改),2已发布待审核,3审核已驳回,4审核已通过', `weight_type` tinyint not null default 3 comment '权重类型,1置顶,2热门,3普通', `weight` int not null default 1 comment '权重值,值越大,权重越高', `weight_start_time` datetime comment '权重开始时间,如果为空则表示立即生效', `weight_end_time` datetime comment '权重结束时间,如果为空则表示永久生效', `weightstr` varchar(2000) not null default '00' comment '所有标签的权重值拼接的字符串', approve_admin_user_id varchar(50) comment '审批人id,如有多个按分号;分隔', approve_time datetime comment '最后审核通过时间', update_time datetime comment '修改时间', create_time timestamp not null default current_timestamp comment '录入时间' ) engine=innodb default charset=utf8 comment='新闻表';

    • 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

    4

    点击生成。

    5

    修改生成后的代码。

    生成的结果:
    1.能生成完整的前端代码。
    2.提供基础的表格json配置文件:

    {
    	"data" : "id",
    	"table" : "news",
    	"showName" : "",
    	"style" : "width: 3%;",
    	"align" : "center"
    },{
    	"data" : "source_id",//数据库列名
    	"field" : "sourceId",//实体类属性名
    	"showName" : " 新闻来源表id",//显示的列名
    	"style" : "width: 3%;",//列的css样式,一般只设置宽度即可
    	"searchType" : "browse",//搜索类型,即在表格上方的搜索区域中,该字段使用什么搜索方式,
    	"refTable" : "source",//该字段所引用的表的表名
    	"refId" : "id",//该字段所引用的表的列名
    	"refName" : "name",//最终显示引用的表的列名
    	"refWhere" : "1=1"//引用的表的条件
    },{
    	"data" : "partner",
    	"showName" : " 合作伙伴",
    	"style" : "width: 3%;",
    	"searchType" : "text",
    },{
    	"data" : "media",
    	"showName" : " 来源媒体",
    	"style" : "width: 3%;",
    	"searchType" : "text",
    },{
    	"data" : "newsid",
    	"showName" : " 源ID",
    	"style" : "width: 3%;",
    	"searchType" : "text",
    },{
    	"data" : "author",
    	"showName" : " 作者",
    	"style" : "width: 3%;",
    	"searchType" : "text",
    },{
    	"data" : "digest",
    	"showName" : " 新闻内容摘要",
    	"style" : "width: 3%;",
    	"searchType" : "text",
    },{
    	"data" : "title",
    	"showName" : " 标题",
    	"style" : "width: 3%;",
    	"searchType" : "text",
    },{
    	"data" : "newsurl",
    	"showName" : " http链接",
    	"style" : "width: 3%;",
    	"searchType" : "text",
    },{
    	"data" : "newsurlhttps",
    	"showName" : " https链接",
    	"style" : "width: 3%;",
    	"searchType" : "text",
    },{
    	"data" : "source_channel",
    	"showName" : " 源频道",
    	"style" : "width: 3%;",
    	"searchType" : "text",
    },{
    	"data" : "copyright",
    	"showName" : " 版权说明",
    	"style" : "width: 3%;",
    	"searchType" : "text",
    },{
    	"data" : "type_name",
    	"field" : "type",
    	"showName" : " 新闻类型",
    	"style" : "width: 3%;",
    	"searchType" : "option",
    },{
    	"data" : "is_contain_image_name",
    	"field" : "isContainImage",
    	"showName" : " 是否包含图片",
    	"style" : "width: 3%;",
    	"searchType" : "option",
    },{
    	"data" : "newstime",
    	"showName" : " 新闻发生时间",
    	"style" : "width: 6%;",
    	"searchType" : "date",
    	"addType" : "none",
    	"editType" : "none",
    	"searchWhereKey" : "between",
    },{
    	"data" : "push_time",
    	"showName" : " 发布时间",
    	"style" : "width: 6%;",
    	"searchType" : "date",
    	"addType" : "none",
    	"editType" : "none",
    	"searchWhereKey" : "between",
    },{
    	"data" : "remark",
    	"showName" : " 备注",
    	"style" : "width: 3%;",
    	"searchType" : "text",
    },{
    	"data" : "create_admin_user_id",
    	"field" : "createAdminUserId",
    	"showName" : " 创建人",
    	"style" : "width: 3%;",
    	"searchType" : "browse",
    	"refTable" : "create_admin_user",
    	"refId" : "id",
    	"refName" : "name",
    	"refWhere" : "1=1"
    },{
    	"data" : "valid_name",
    	"field" : "valid",
    	"showName" : " 状态",
    	"style" : "width: 3%;",
    	"searchType" : "option",
    },{
    	"data" : "is_auto_import_name",
    	"field" : "isAutoImport",
    	"showName" : " 是否系统自动导入",
    	"style" : "width: 3%;",
    	"searchType" : "option",
    },{
    	"data" : "is_not_review_name",
    	"field" : "isNotReview",
    	"showName" : " 是否免审",
    	"style" : "width: 3%;",
    	"searchType" : "option",
    },{
    	"data" : "status_name",
    	"field" : "status",
    	"showName" : " 新闻状态",
    	"style" : "width: 3%;",
    	"searchType" : "option",
    },{
    	"data" : "approve_admin_user_id",
    	"field" : "approveAdminUserId",
    	"showName" : " 审批人id",
    	"style" : "width: 3%;",
    	"searchType" : "browse",
    	"refTable" : "approve_admin_user",
    	"refId" : "id",
    	"refName" : "name",
    	"refWhere" : "1=1"
    },{
    	"data" : "approve_time",
    	"showName" : " 最后审核通过时间",
    	"style" : "width: 6%;",
    	"searchType" : "date",
    	"addType" : "none",
    	"editType" : "none",
    	"searchWhereKey" : "between",
    },{
    	"data" : "update_time",
    	"showName" : " 修改时间",
    	"style" : "width: 6%;",
    	"searchType" : "date",
    	"addType" : "none",
    	"editType" : "none",
    	"searchWhereKey" : "between",
    },{
    	"data" : "create_time",
    	"showName" : " 录入时间",
    	"style" : "width: 6%;",
    	"searchType" : "date",
    	"addType" : "none",
    	"editType" : "none",
    	"searchWhereKey" : "between",
    },{
    	"data" : "content",
    	"showName" : " 新闻内容",
    	"style" : "width: 3%;",
    	"searchType" : "text",
    },{
    	"data" : "ctext",
    	"showName" : " 新闻内容",
    	"style" : "width: 3%;",
    	"searchType" : "text",
    },{
    	"data" : "",
    	"showName" : "操作",
    	"align" : "center"
    }
    
    • 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
    • 118
    • 119
    • 120
    • 121
    • 122
    • 123
    • 124
    • 125
    • 126
    • 127
    • 128
    • 129
    • 130
    • 131
    • 132
    • 133
    • 134
    • 135
    • 136
    • 137
    • 138
    • 139
    • 140
    • 141
    • 142
    • 143
    • 144
    • 145
    • 146
    • 147
    • 148
    • 149
    • 150
    • 151
    • 152
    • 153
    • 154
    • 155
    • 156
    • 157
    • 158
    • 159
    • 160
    • 161
    • 162
    • 163
    • 164
    • 165
    • 166
    • 167
    • 168
    • 169
    • 170
    • 171
    • 172
    • 173
    • 174
    • 175
    • 176
    • 177
    • 178
    • 179
    • 180
    • 181
    • 182

    控制列在前端的展示很简单,因为列在前端展示一共有:
    1.表格列
    2.搜索条件
    3.新增数据
    4.修改信息
    5.展示详情

    只需要控制是否在上述功能区域中是否显示、如何显示即可。

    目前本人已开发出了一个简略版的mysql+spring boot+spring mvc+mybatis+shiro+jsp+jquery+bootstrap+tomcat

  • 相关阅读:
    竞赛 深度学习 机器视觉 人脸识别系统 - opencv python
    C#winform门诊医生系统+sqlserver
    【车间调度】基于改进鲸鱼算法解决柔性车间调度多目标问题附matlab代码
    数据挖掘与机器学习:循环结构
    C++学习 --stack
    MySQL复习资料(附加)case when
    .gitignore 不生效的解决方案
    PrimalScript通用脚本环境
    Lecture 10 Semaphores Ⅱ(信号量)
    Cannot activate rust-analyzer: bootstrap error
  • 原文地址:https://blog.csdn.net/u012643122/article/details/127682652