提交 e5af1379 编写于 作者: 穆雄雄's avatar 穆雄雄

部署上线时,会出现type_list字段找不到,修改SysConfigMapper文件中的type关键词为ty即可。(可能与数据库版本有关系,我用的是5.7)

上级 845de8bf
......@@ -4,61 +4,6 @@
<mapper namespace="com.zyd.blog.persistence.mapper.SysConfigMapper">
<select id="getSiteInfo" resultType="map">
/*SELECT
co.articleCount AS articleCount,
co.commentCount AS commentCount,
co.tagCount AS tagCount,
co.typeCount AS typeCount,
da.recorde_time AS lastUpdateTime
FROM
(
SELECT
a.article_count AS articleCount,
t.tag_count AS tagCount,
ty.type_count AS typeCount,
c.comment_count AS commentCount
FROM
(
SELECT
COUNT(1) AS article_count
FROM
biz_article
WHERE
`status` = 1
) a,
(
SELECT
COUNT(1) AS tag_count
FROM
biz_tags
) t,
(
SELECT
COUNT(1) AS type_count
FROM
biz_type
WHERE
available = 1
) ty,
(
SELECT
COUNT(1) AS comment_count
FROM
biz_comment
WHERE
`status` = 'APPROVED'
) c
) co
LEFT JOIN (
SELECT
DATE_FORMAT( recorde_time, '%Y年%m月%d日%H点') AS recorde_time
FROM
sys_update_recorde
ORDER BY
create_time DESC
LIMIT 1
) da
ON 1 = 1;*/
SELECT co.articleCount AS articleCount,
co.commentCount AS commentCount,
......@@ -71,7 +16,7 @@
FROM (
SELECT a.article_count AS articleCount,
t.tag_count AS tagCount,
type.type_count AS typeCount,
ty.type_count AS typeCount,
c.comment_count AS commentCount,
look.look_count AS lookCount,
zan.zan_count AS zanCount
......@@ -88,7 +33,7 @@
SELECT COUNT(1) AS type_count
FROM biz_type
WHERE available = 1
) TYPE,
) ty,
(
SELECT COUNT(1) AS comment_count
FROM biz_comment
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册