Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
wangming
/
kzy-wx
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 70f7872e
authored
Mar 16, 2020
by
魏文甫
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
1 parent
f9f9df67
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
27 additions
and
7 deletions
src/main/java/com/server/web/common/service/Impl/InformationServiceImpl.java
src/main/resources/mybatis/mapping/informationMapper.xml
src/main/java/com/server/web/common/service/Impl/InformationServiceImpl.java
View file @
70f7872
...
...
@@ -65,15 +65,10 @@ public class InformationServiceImpl implements InformationService {
param
.
put
(
"secondId"
,
secondId
);
if
(
tBaseSecondClass
.
getType
()
==
1
)
{
list
=
informationMapper
.
secondClassDetailInformation
(
param
);
total
=
informationMapper
.
secondClassDetailInformationTotal
(
param
);
}
else
{
list
=
informationMapper
.
secondClassDetailCourse
(
param
);
total
=
informationMapper
.
secondClassDetailCourseTotal
(
param
);
}
Map
<
String
,
Object
>
dataMap
=
new
HashMap
<
String
,
Object
>();
dataMap
.
put
(
"list"
,
list
);
dataMap
.
put
(
"total"
,
total
);
return
returnMap
(
"1"
,
""
,
dataMap
);
return
returnMap
(
"1"
,
""
,
list
);
}
/**
...
...
src/main/resources/mybatis/mapping/informationMapper.xml
View file @
70f7872
...
...
@@ -47,12 +47,24 @@
LEFT JOIN t_base_second_class sc ON rc.second_class_id = sc.id AND sc.type = 1
WHERE
i.is_delete = 0
AND sc.type =
2
AND sc.type =
1
AND rc.second_class_id = #{secondId,jdbcType=BIGINT}
ORDER BY
i.id DESC
LIMIT ${start},${pageSize}
</select>
<select
id=
"secondClassDetailInformationTotal"
resultType=
"java.lang.Integer"
>
SELECT
count(i.id)
FROM
t_kzy_relation_class rc
LEFT JOIN t_kzy_information i ON rc.relation_id = i.id
LEFT JOIN t_base_second_class sc ON rc.second_class_id = sc.id AND sc.type = 1
WHERE
i.is_delete = 0
AND sc.type = 1
AND rc.second_class_id = #{secondId,jdbcType=BIGINT}
</select>
<select
id=
"secondClassDetailCourse"
resultType=
"java.util.HashMap"
>
SELECT
...
...
@@ -74,4 +86,16 @@
c.id DESC
LIMIT ${start},${pageSize}
</select>
<select
id=
"secondClassDetailCourseTotal"
resultType=
"java.lang.Integer"
>
SELECT
count(c.id)
FROM
t_kzy_relation_class rc
LEFT JOIN t_kzy_course c ON rc.relation_id = c.id
LEFT JOIN t_base_second_class sc ON rc.second_class_id = sc.id AND sc.type = 2
WHERE
c.is_delete = 0
AND sc.type = 2
AND rc.second_class_id = #{secondId,jdbcType=BIGINT}
</select>
</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