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 c84899b8
authored
Mar 16, 2020
by
魏文甫
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'wei_master' into '105'
Wei master See merge request
!25
2 parents
642ca12d
70f7872e
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
34 additions
and
7 deletions
src/main/java/com/server/web/common/mapping/InformationMapper.java
src/main/java/com/server/web/common/service/Impl/InformationServiceImpl.java
src/main/java/com/server/web/controller/UserController.java
src/main/resources/mybatis/mapping/informationMapper.xml
src/main/java/com/server/web/common/mapping/InformationMapper.java
View file @
c84899b
...
...
@@ -11,7 +11,11 @@ import java.util.Map;
public
interface
InformationMapper
{
List
<
Map
<
String
,
Object
>>
categoryDetail
(
@Param
(
"firstId"
)
Long
id
);
List
<
Map
<
String
,
Object
>>
secondClassDetailInformation
(
Map
<
String
,
Object
>
param
);
List
<
Map
<
String
,
Object
>>
secondClassDetailInformation
(
Map
<
String
,
Object
>
param
);
List
<
Map
<
String
,
Object
>>
secondClassDetailCourse
(
Map
<
String
,
Object
>
param
);
Integer
secondClassDetailInformationTotal
(
Map
<
String
,
Object
>
param
);
List
<
Map
<
String
,
Object
>>
secondClassDetailCourse
(
Map
<
String
,
Object
>
param
);
Integer
secondClassDetailCourseTotal
(
Map
<
String
,
Object
>
param
);
}
src/main/java/com/server/web/common/service/Impl/InformationServiceImpl.java
View file @
c84899b
...
...
@@ -58,6 +58,7 @@ public class InformationServiceImpl implements InformationService {
public
Map
<
String
,
Object
>
secondClassDetail
(
Long
secondId
,
Integer
pageNo
,
Integer
pageSize
)
{
TBaseSecondClass
tBaseSecondClass
=
tBaseSecondClassMapper
.
selectByPrimaryKey
(
secondId
);
List
<
Map
<
String
,
Object
>>
list
=
null
;
Integer
total
=
0
;
Map
<
String
,
Object
>
param
=
new
HashMap
<
String
,
Object
>();
param
.
put
(
"start"
,
(
pageNo
-
1
)
*
pageSize
);
param
.
put
(
"pageSize"
,
pageSize
);
...
...
src/main/java/com/server/web/controller/UserController.java
View file @
c84899b
...
...
@@ -75,11 +75,9 @@ public class UserController extends BaseController {
if
(!
CollectionUtils
.
isEmpty
(
users
))
{
TKzyUser
user1
=
users
.
get
(
0
);
if
(!
StringUtils
.
isEmpty
(
user1
.
getWxOpenid
())
&&
!
wxOpenId
.
equals
(
user1
.
getWxOpenid
()))
{
return
returnError
(
"0"
,
"该
微信已绑定其他手机号
"
,
null
);
return
returnError
(
"0"
,
"该
手机号已绑定其他微信
"
,
null
);
}
}
user
.
setWxOpenid
(
wxOpenId
);
user
.
setCreateDt
(
new
Date
());
user
.
setUserCategory
(
userCategory
==
null
?
null
:
Integer
.
valueOf
(
userCategory
));
...
...
@@ -90,7 +88,6 @@ public class UserController extends BaseController {
user
.
setLastLoginDt
(
new
Date
());
userMapper
.
insertSelective
(
user
);
request
.
getSession
().
setAttribute
(
WX_USER_SESSION_KEY
,
user
);
return
returnSuccess
(
user
);
}
...
...
src/main/resources/mybatis/mapping/informationMapper.xml
View file @
c84899b
...
...
@@ -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