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 b0d97c4e
authored
Mar 18, 2020
by
wangming
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'wangming' into '105'
二级分类 增加ID See merge request
!17
2 parents
ac96de27
2680ab7d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
1 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 @
b0d97c4
...
@@ -301,8 +301,9 @@ public class ClassController extends BaseController {
...
@@ -301,8 +301,9 @@ public class ClassController extends BaseController {
*/
*/
@ResponseBody
@ResponseBody
@RequestMapping
(
value
=
"/selectSecondClassList"
,
method
=
{
RequestMethod
.
POST
,
RequestMethod
.
GET
},
produces
=
"application/json"
)
@RequestMapping
(
value
=
"/selectSecondClassList"
,
method
=
{
RequestMethod
.
POST
,
RequestMethod
.
GET
},
produces
=
"application/json"
)
public
Map
<
String
,
Object
>
selectSecondClassList
(
@RequestParam
(
defaultValue
=
"-1"
)
Integer
type
,
@RequestParam
(
defaultValue
=
""
)
String
name
,
@RequestParam
(
defaultValue
=
"1"
)
Integer
pageNo
,
@RequestParam
(
defaultValue
=
"1"
)
Integer
pageSize
)
{
public
Map
<
String
,
Object
>
selectSecondClassList
(
long
id
,
@RequestParam
(
defaultValue
=
"-1"
)
Integer
type
,
@RequestParam
(
defaultValue
=
""
)
String
name
,
@RequestParam
(
defaultValue
=
"1"
)
Integer
pageNo
,
@RequestParam
(
defaultValue
=
"1"
)
Integer
pageSize
)
{
Map
paramMap
=
new
HashMap
<>();
Map
paramMap
=
new
HashMap
<>();
paramMap
.
put
(
"id"
,
id
);
if
(!(
""
).
equals
(
name
)){
if
(!(
""
).
equals
(
name
)){
paramMap
.
put
(
"name"
,
"%"
+
name
+
"%"
);
paramMap
.
put
(
"name"
,
"%"
+
name
+
"%"
);
}
}
...
...
src/main/resources/mybatis/mapping/queryModel.xml
View file @
b0d97c4
...
@@ -115,6 +115,7 @@
...
@@ -115,6 +115,7 @@
t_base_second_class t
t_base_second_class t
WHERE
WHERE
t.`status` = 1
t.`status` = 1
AND first_id = #{id,jdbcType=BIGINT}
<if
test=
"type != null"
>
<if
test=
"type != null"
>
AND t.type = #{type,jdbcType=INTEGER}
AND t.type = #{type,jdbcType=INTEGER}
</if>
</if>
...
...
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