Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit f546cb3

Browse files
committed
created bugfix
1 parent b11ccc7 commit f546cb3

File tree

4 files changed

+26
-23
lines changed

4 files changed

+26
-23
lines changed

config/db.sql

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ CREATE TABLE IF NOT EXISTS `website_setting` (
1818
`seo_keywords` varchar(63) NOT NULL DEFAULT '' COMMENT '页面 seo 通用keywords',
1919
`seo_description` varchar(255) NOT NULL DEFAULT '' COMMENT '页面 seo 通用description',
2020
`index_nav` varchar(4088) NOT NULL DEFAULT '' COMMENT '首页顶部导航,json 格式',
21-
`created_at` timestamp NOT NULL DEFAULT '2013-03-15 14:38:09' COMMENT '创建时间',
21+
`created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
2222
`updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '最后更新时间',
2323
PRIMARY KEY (`id`)
2424
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='网站设置信息';
@@ -38,7 +38,7 @@ CREATE TABLE IF NOT EXISTS `topics` (
3838
`tags` varchar(63) NOT NULL DEFAULT '' COMMENT 'tag,逗号分隔',
3939
`permission` tinyint unsigned NOT NULL DEFAULT 0 COMMENT '访问权限:0-公开;1-登录用户可见;2-关注的人可见;3-付费用户可见',
4040
`close_reply` tinyint unsigned NOT NULL DEFAULT 0 COMMENT '是否关闭回复评论功能,1-是;0-否',
41-
`ctime` timestamp NOT NULL DEFAULT '2013-03-15 14:38:09',
41+
`ctime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
4242
`mtime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
4343
PRIMARY KEY (`tid`),
4444
KEY `uid` (`uid`),
@@ -166,7 +166,7 @@ CREATE TABLE IF NOT EXISTS `user_info` (
166166
`vip_expire` int unsigned NOT NULL DEFAULT 0 COMMENT 'VIP到期日期,格式20200301',
167167
`status` tinyint unsigned NOT NULL DEFAULT 0 COMMENT '用户账号状态。0-默认;1-已审核;2-拒绝;3-冻结;4-停号',
168168
`is_root` tinyint unsigned NOT NULL DEFAULT 0 COMMENT '是否超级用户,不受权限控制:1-是',
169-
`ctime` timestamp NOT NULL DEFAULT '2013-03-15 14:38:09',
169+
`ctime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
170170
`mtime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
171171
PRIMARY KEY (`uid`),
172172
UNIQUE KEY (`username`),
@@ -177,7 +177,7 @@ CREATE TABLE IF NOT EXISTS `user_active` (
177177
`uid` int unsigned NOT NULL,
178178
`email` varchar(128) NOT NULL,
179179
`username` varchar(20) NOT NULL COMMENT '用户名',
180-
`weight` smallint NOT NULL DEFAULT 1 COMMENT '活跃度,越大越活跃',
180+
`weight` smallint unsigned NOT NULL DEFAULT 1 COMMENT '活跃度,越大越活跃',
181181
`avatar` varchar(128) NOT NULL DEFAULT '' COMMENT '头像(如果为空,则使用http://www.gravatar.com)',
182182
`mtime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
183183
PRIMARY KEY (`uid`),
@@ -189,7 +189,7 @@ CREATE TABLE IF NOT EXISTS `role` (
189189
`roleid` int unsigned NOT NULL AUTO_INCREMENT,
190190
`name` varchar(128) NOT NULL DEFAULT '' COMMENT '角色名',
191191
`op_user` varchar(20) NOT NULL DEFAULT '' COMMENT '操作人',
192-
`ctime` timestamp NOT NULL DEFAULT '2013-03-15 14:38:09',
192+
`ctime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
193193
`mtime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
194194
PRIMARY KEY (`roleid`),
195195
UNIQUE KEY (`name`)
@@ -202,7 +202,7 @@ CREATE TABLE IF NOT EXISTS `authority` (
202202
`menu2` int unsigned NOT NULL DEFAULT 0 COMMENT '所属二级菜单,本身为二级菜单,则为0',
203203
`route` varchar(128) NOT NULL DEFAULT '' COMMENT '路由(权限)',
204204
`op_user` varchar(20) NOT NULL COMMENT '操作人',
205-
`ctime` timestamp NOT NULL DEFAULT '2013-03-15 14:38:09',
205+
`ctime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
206206
`mtime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
207207
PRIMARY KEY (`aid`),
208208
KEY (`route`)
@@ -258,7 +258,7 @@ CREATE TABLE IF NOT EXISTS `wiki` (
258258
`cuid` varchar(100) NOT NULL DEFAULT '' COMMENT '贡献者uid,多个逗号分隔',
259259
`tags` varchar(63) NOT NULL DEFAULT '' COMMENT 'tag,逗号分隔',
260260
`viewnum` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '浏览数',
261-
`ctime` timestamp NOT NULL DEFAULT '2013-03-15 14:38:09',
261+
`ctime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
262262
`mtime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
263263
PRIMARY KEY (`id`),
264264
UNIQUE KEY `uri` (`uri`)
@@ -275,7 +275,7 @@ CREATE TABLE IF NOT EXISTS `resource` (
275275
`lastreplyuid` int unsigned NOT NULL DEFAULT 0 COMMENT '最后回复者',
276276
`lastreplytime` timestamp NOT NULL DEFAULT '2013-03-15 14:38:09' COMMENT '最后回复时间',
277277
`tags` varchar(63) NOT NULL DEFAULT '' COMMENT 'tag,逗号分隔',
278-
`ctime` timestamp NOT NULL DEFAULT '2013-03-15 14:38:09',
278+
`ctime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
279279
`mtime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
280280
PRIMARY KEY (`id`),
281281
KEY (`url`)
@@ -324,7 +324,7 @@ CREATE TABLE IF NOT EXISTS `articles` (
324324
`close_reply` tinyint unsigned NOT NULL DEFAULT 0 COMMENT '是否关闭回复评论功能,1-是;0-否',
325325
`status` tinyint unsigned NOT NULL DEFAULT 0 COMMENT '状态:0-初始抓取;1-已上线;2-下线(审核拒绝)',
326326
`op_user` varchar(20) NOT NULL DEFAULT '' COMMENT '操作人',
327-
`ctime` timestamp NOT NULL DEFAULT '2013-03-15 14:38:09',
327+
`ctime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
328328
`mtime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
329329
PRIMARY KEY (`id`),
330330
UNIQUE KEY (`url`),
@@ -436,7 +436,7 @@ CREATE TABLE IF NOT EXISTS `open_project` (
436436
`lastreplyuid` int unsigned NOT NULL DEFAULT 0 COMMENT '最后回复者',
437437
`lastreplytime` timestamp NOT NULL DEFAULT '2013-03-15 14:38:09' COMMENT '最后回复时间',
438438
`status` tinyint unsigned NOT NULL DEFAULT 0 COMMENT '状态:0-新建;1-已上线;2-下线(审核拒绝)',
439-
`ctime` timestamp NOT NULL DEFAULT '2013-03-15 14:38:09' COMMENT '加入时间',
439+
`ctime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '加入时间',
440440
`mtime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
441441
PRIMARY KEY (`id`),
442442
KEY (`uri`)
@@ -491,7 +491,7 @@ CREATE TABLE IF NOT EXISTS `book` (
491491
`cmtnum` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '评论数',
492492
`likenum` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '赞数(推荐数)',
493493
`uid` int unsigned NOT NULL DEFAULT 0 COMMENT '分享人UID',
494-
`created_at` timestamp NOT NULL DEFAULT '2013-03-15 14:38:09' COMMENT '创建时间',
494+
`created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
495495
`updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '最后更新时间',
496496
PRIMARY KEY (`id`),
497497
KEY `name` (`name`),
@@ -620,7 +620,7 @@ CREATE TABLE IF NOT EXISTS `feed` (
620620
`top` tinyint unsigned NOT NULL DEFAULT 0 COMMENT '置顶,0否,1置顶',
621621
`seq` int NOT NULL DEFAULT 0 COMMENT '排序用,越大越靠前',
622622
`state` tinyint unsigned NOT NULL DEFAULT 0 COMMENT '状态:0-正常;1-下线',
623-
`created_at` timestamp NOT NULL DEFAULT '2013-03-15 14:38:09' COMMENT '创建时间',
623+
`created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
624624
`updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '最后更新时间',
625625
PRIMARY KEY (`id`),
626626
UNIQUE KEY `uniq_objid_type` (`objid`, `objtype`),
@@ -820,7 +820,7 @@ CREATE TABLE `wechat_user` (
820820
`avatar` varchar(255) NOT NULL DEFAULT '' COMMENT '用户微信头像',
821821
`open_info` varchar(1024) NOT NULL DEFAULT '' COMMENT '用户微信的其他信息,json格式',
822822
`uid` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '用户UID',
823-
`created_at` timestamp NOT NULL DEFAULT '2013-03-15 14:38:09',
823+
`created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
824824
`updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
825825
PRIMARY KEY (`id`),
826826
UNIQUE KEY `openid` (`openid`),
@@ -834,7 +834,7 @@ CREATE TABLE `wechat_auto_reply` (
834834
`word` varchar(15) NOT NULL DEFAULT '' COMMENT '关键词',
835835
`msg_type` varchar(15) NOT NULL DEFAULT '' COMMENT '回复消息类型,和微信对应',
836836
`content` varchar(255) NOT NULL DEFAULT '' COMMENT '要回复的内容',
837-
`created_at` timestamp NOT NULL DEFAULT '2020-07-13 14:38:09',
837+
`created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
838838
`updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
839839
PRIMARY KEY (`id`),
840840
KEY `word` (`word`),

model/wechat.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ type WechatUser struct {
1919
SessionKey string
2020
OpenInfo string
2121
Uid int
22-
CreatedAt time.Time
22+
CreatedAt time.Time `xorm:"created"`
2323
UpdatedAt time.Time `xorm:"<-"`
2424
}
2525

@@ -36,6 +36,6 @@ type WechatAutoReply struct {
3636
Word string
3737
MsgType string
3838
Content string
39-
CreatedAt time.Time
39+
CreatedAt time.Time `xorm:"created"`
4040
UpdatedAt time.Time `xorm:"<-"`
4141
}

robots.txt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
User-agent: *
22
Allow: /
33
Sitemap:
4-
Disallow:/dl/golang/
4+
Disallow:/dl/golang/
5+
Disallow:/search
6+
Disallow:/wr
7+
Disallow:/ws

template/download/go.html

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,15 @@
1616
<h1>Go 安装包下载</h1>
1717

1818
<p>
19-
为你的系统下载了相应的安装包后,请按照 <a href="http://docs.studygolang.com/doc/install" target="_blank">安装说明</a> 进行安装。
19+
为你的系统下载了相应的安装包后,请按照 <a href="https://docs.studygolang.com/doc/install" target="_blank">安装说明</a> 进行安装。
2020
</p>
2121

2222
<p>
23-
如果你选择从源码构建,请参考 <a href="http://docs.studygolang.com/doc/install/source" target="_blank">从源码进行安装</a>
23+
如果你选择从源码构建,请参考 <a href="https://docs.studygolang.com/doc/install/source" target="_blank">从源码进行安装</a>
2424
</p>
2525

2626
<p>
27-
查看 <a href="http://docs.studygolang.com/doc/devel/release.html" target="_blank">发布历史</a> 了解更多关于 Go 各版本的发布说明。
27+
查看 <a href="https://docs.studygolang.com/doc/devel/release.html" target="_blank">发布历史</a> 了解更多关于 Go 各版本的发布说明。
2828
</p>
2929

3030
<h3 id="featured">推荐下载 <a class="permalink" href="#featured"></a></h3>
@@ -33,13 +33,13 @@ <h3 id="featured">推荐下载 <a class="permalink" href="#featured">¶</a></h3>
3333
<a class="download downloadBox" href="/dl/golang/{{.Filename}}">
3434
{{if eq .OS "Windows"}}
3535
<div class="platform">Microsoft Windows</div>
36-
<div class="reqs">Windows XP SP2 or later, Intel 64-bit 处理器</div>
36+
<div class="reqs">Windows 7 or later, Intel 64-bit 处理器</div>
3737
{{else if eq .OS "Linux"}}
3838
<div class="platform">Linux</div>
3939
<div class="reqs">Linux 2.6.23 or later, Intel 64-bit 处理器</div>
4040
{{else if eq .OS "macOS"}}
4141
<div class="platform">Apple macOS</div>
42-
<div class="reqs">macOS 10.8 or later, Intel 64-bit 处理器</div>
42+
<div class="reqs">macOS 10.12 or later, Intel 64-bit 处理器</div>
4343
{{else}}
4444
<div class="platform">源码</div>
4545
{{end}}
@@ -839,4 +839,4 @@ <h2 class="toggleButton" title="Click to hide downloads for this version">{{.}}
839839
$('table').addClass('table').wrap('<div class="table-responsive"></div>');
840840
});
841841
</script>
842-
{{end}}
842+
{{end}}

0 commit comments

Comments
 (0)