commit | author | age
|
91dc6c
|
1 |
<?xml version="1.0" encoding="UTF-8"?> |
I |
2 |
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
|
3 |
<mapper namespace="vip.xiaonuo.modular.blogarticletype.mapper.BlogArticleTypeMapper"> |
|
4 |
|
88f419
|
5 |
<select id="listCount" resultType="vip.xiaonuo.modular.blogarticletype.entity.BlogArticleTypeVo"> |
c5e66a
|
6 |
SELECT |
I |
7 |
t1.id, |
|
8 |
t1.type_name AS typeName, |
|
9 |
t2.count |
|
10 |
FROM |
e99de8
|
11 |
blog_article_type t1 left join |
c5e66a
|
12 |
( |
I |
13 |
SELECT |
|
14 |
t.id, |
4adb00
|
15 |
count(t.id) `count` |
c5e66a
|
16 |
FROM |
I |
17 |
blog_article a, |
|
18 |
blog_article_type t |
|
19 |
WHERE |
|
20 |
a.article_type_id = t.id |
|
21 |
AND a.is_enable = 1 |
|
22 |
AND a.editor_status = 1 |
|
23 |
AND t.is_enable = 1 |
dc050f
|
24 |
AND a.publish_date < now() |
I |
25 |
|
c5e66a
|
26 |
GROUP BY |
I |
27 |
t.id |
|
28 |
) t2 |
e99de8
|
29 |
on |
c5e66a
|
30 |
t1.id = t2.id |
4adb00
|
31 |
where t1.is_show_face = 1 |
c5e66a
|
32 |
ORDER BY |
I |
33 |
t1.top_value ASC, |
|
34 |
t1.create_date DESC |
|
35 |
</select> |
|
36 |
|
91dc6c
|
37 |
</mapper> |