Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
wangming
/
kzy-oss
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 4bf3fe30
authored
Mar 13, 2020
by
wangming
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'wangming' into '105'
分类管理 See merge request
!3
2 parents
c6a68a2e
23a19dcf
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
64 additions
and
0 deletions
src/main/java/com/server/web/controller/ClassController.java
src/main/resources/mybatis/mapping/queryModel.xml
src/main/java/com/server/web/controller/ClassController.java
View file @
4bf3fe3
This diff is collapsed.
Click to expand it.
src/main/resources/mybatis/mapping/queryModel.xml
View file @
4bf3fe3
...
@@ -61,4 +61,67 @@
...
@@ -61,4 +61,67 @@
ORDER BY t.create_dt DESC
ORDER BY t.create_dt DESC
</select>
</select>
<select
id=
"secondClassList"
resultType=
"java.util.HashMap"
parameterType=
"java.util.HashMap"
>
SELECT
t.id,
t.class_name as className,
t.type,
t.`status`,
t1.class_name as firstName,
t.pic_url as picUrl,
t.weight,
date_format(t.create_dt,'%Y-%m-%d %H:%i:%S') createDt
FROM
t_base_second_class t
LEFT JOIN t_base_first_class t1 ON t.first_id=t1.id
WHERE t.first_id = #{firstClassId,jdbcType=BIGINT}
ORDER BY t.weight DESC
</select>
<select
id=
"getSecondClassById"
resultType=
"java.util.HashMap"
parameterType=
"java.util.HashMap"
>
SELECT
t.id,
t.class_name as className,
t.type,
t.`status`,
t1.class_name as firstName,
t.pic_url as picUrl,
t.weight
FROM
t_base_second_class t
LEFT JOIN t_base_first_class t1 ON t.first_id=t1.id
WHERE t.id= #{id,jdbcType=BIGINT}
</select>
<select
id=
"selectFirstClassList"
resultType=
"java.util.HashMap"
parameterType=
"java.util.HashMap"
>
SELECT
t.id,
t.class_name as className
FROM
t_base_first_class t
WHERE t.`status` = 1
<if
test=
"name != null"
>
AND t.class_name LIKE #{name}
</if>
ORDER BY t.id DESC
</select>
<select
id=
"selectSecondClassList"
resultType=
"java.util.HashMap"
parameterType=
"java.util.HashMap"
>
SELECT
t.id,
t.class_name AS className
FROM
t_base_second_class t
WHERE
t.`status` = 1
<if
test=
"type != null"
>
AND t.type = #{type,jdbcType=INTEGER}
</if>
<if
test=
"name != null"
>
AND t.class_name LIKE #{name}
</if>
ORDER BY t.id DESC
</select>
</mapper>
</mapper>
\ No newline at end of file
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment