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 a40ef3ab
authored
Mar 14, 2020
by
魏文甫
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'wei_master' into '105'
Wei master See merge request
!14
2 parents
b8d94d0a
0437f8ba
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
38 additions
and
19 deletions
src/main/java/com/server/web/controller/IndexController.java
src/main/java/com/server/web/controller/InformationController.java
src/main/java/com/server/web/controller/UserController.java
src/main/resources/mybatis/mapping/IntegralMapper.xml
src/main/java/com/server/web/controller/IndexController.java
View file @
a40ef3a
...
...
@@ -3,6 +3,8 @@ package com.server.web.controller;
import
com.server.web.common.service.IndexService
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMethod
;
import
org.springframework.web.bind.annotation.ResponseBody
;
import
org.springframework.web.bind.annotation.RestController
;
import
java.util.Map
;
...
...
@@ -23,7 +25,8 @@ public class IndexController {
*
* @return
*/
@RequestMapping
(
"/banner"
)
@ResponseBody
@RequestMapping
(
value
=
"/banner"
,
method
=
{
RequestMethod
.
POST
,
RequestMethod
.
GET
},
produces
=
"application/json"
)
public
Map
<
String
,
Object
>
banner
()
{
return
indexService
.
banner
();
}
...
...
@@ -33,7 +36,8 @@ public class IndexController {
*
* @return
*/
@RequestMapping
(
"/categoryList"
)
@ResponseBody
@RequestMapping
(
value
=
"/categoryList"
,
method
=
{
RequestMethod
.
POST
,
RequestMethod
.
GET
},
produces
=
"application/json"
)
public
Map
<
String
,
Object
>
categoryList
()
{
return
indexService
.
categoryList
();
}
...
...
@@ -43,7 +47,8 @@ public class IndexController {
*
* @return
*/
@RequestMapping
(
"/categoryDetail"
)
@ResponseBody
@RequestMapping
(
value
=
"/categoryDetail"
,
method
=
{
RequestMethod
.
POST
,
RequestMethod
.
GET
},
produces
=
"application/json"
)
public
Map
<
String
,
Object
>
categoryDetail
()
{
return
indexService
.
categoryDetail
();
}
...
...
@@ -53,7 +58,8 @@ public class IndexController {
*
* @return
*/
@RequestMapping
(
"/livingCourseToday"
)
@ResponseBody
@RequestMapping
(
value
=
"/livingCourseToday"
,
method
=
{
RequestMethod
.
POST
,
RequestMethod
.
GET
},
produces
=
"application/json"
)
public
Map
<
String
,
Object
>
livingCourseToday
()
{
return
indexService
.
livingCourseToday
();
}
...
...
src/main/java/com/server/web/controller/InformationController.java
View file @
a40ef3a
...
...
@@ -3,9 +3,7 @@ package com.server.web.controller;
import
com.server.web.common.model.TKzyUser
;
import
com.server.web.common.service.InformationService
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.springframework.web.bind.annotation.*
;
import
javax.servlet.http.HttpServletRequest
;
import
java.util.Map
;
...
...
@@ -24,7 +22,8 @@ public class InformationController extends BaseController {
*
* @return
*/
@RequestMapping
(
"/secondClassList"
)
@ResponseBody
@RequestMapping
(
value
=
"/secondClassList"
,
method
=
{
RequestMethod
.
POST
,
RequestMethod
.
GET
},
produces
=
"application/json"
)
public
Map
<
String
,
Object
>
secondClassList
(
HttpServletRequest
request
,
@RequestParam
(
value
=
"firstId"
)
Long
firstId
)
{
return
informationService
.
secondClassList
(
firstId
);
}
...
...
@@ -34,7 +33,8 @@ public class InformationController extends BaseController {
*
* @return
*/
@RequestMapping
(
"/secondClassDetail"
)
@ResponseBody
@RequestMapping
(
value
=
"/secondClassDetail"
,
method
=
{
RequestMethod
.
POST
,
RequestMethod
.
GET
},
produces
=
"application/json"
)
public
Map
<
String
,
Object
>
secondClassDetail
(
HttpServletRequest
request
,
@RequestParam
(
value
=
"secondId"
)
Long
secondId
,
@RequestParam
(
value
=
"pageNo"
,
defaultValue
=
"1"
)
Integer
pageNo
,
@RequestParam
(
value
=
"pageSize"
)
Integer
pageSize
)
{
return
informationService
.
secondClassDetail
(
secondId
,
pageNo
,
pageSize
);
...
...
@@ -47,7 +47,8 @@ public class InformationController extends BaseController {
* @param informationId
* @return
*/
@RequestMapping
(
"/informationDetail"
)
@ResponseBody
@RequestMapping
(
value
=
"/informationDetail"
,
method
=
{
RequestMethod
.
POST
,
RequestMethod
.
GET
},
produces
=
"application/json"
)
public
Map
<
String
,
Object
>
informationDetail
(
HttpServletRequest
request
,
@RequestParam
(
value
=
"informationId"
)
Long
informationId
)
{
return
informationService
.
informationDetail
(
informationId
);
}
...
...
@@ -61,7 +62,8 @@ public class InformationController extends BaseController {
* @param pageSize
* @return
*/
@RequestMapping
(
"/informationCommentList"
)
@ResponseBody
@RequestMapping
(
value
=
"/informationCommentList"
,
method
=
{
RequestMethod
.
POST
,
RequestMethod
.
GET
},
produces
=
"application/json"
)
public
Map
<
String
,
Object
>
informationCommentList
(
HttpServletRequest
request
,
@RequestParam
(
value
=
"informationId"
)
Long
informationId
,
@RequestParam
(
value
=
"pageNo"
,
defaultValue
=
"1"
)
Integer
pageNo
,
@RequestParam
(
value
=
"pageSize"
)
Integer
pageSize
)
{
return
informationService
.
informationCommentList
(
informationId
,
pageNo
,
pageSize
);
...
...
@@ -74,7 +76,8 @@ public class InformationController extends BaseController {
* @param comment
* @return
*/
@RequestMapping
(
"/informationComment"
)
@ResponseBody
@RequestMapping
(
value
=
"/informationComment"
,
method
=
{
RequestMethod
.
POST
,
RequestMethod
.
GET
},
produces
=
"application/json"
)
public
Map
<
String
,
Object
>
informationComment
(
HttpServletRequest
request
,
@RequestParam
(
value
=
"informationId"
)
Long
informationId
,
@RequestParam
(
value
=
"comment"
)
String
comment
)
{
TKzyUser
tKzyUser
=
getLoginUser
(
request
);
Long
userId
=
null
;
...
...
src/main/java/com/server/web/controller/UserController.java
View file @
a40ef3a
...
...
@@ -3,6 +3,7 @@ package com.server.web.controller;
import
com.server.utils.ResultMapUtil
;
import
com.server.utils.SendSMSUtil
;
import
com.server.utils.VerifyCodeUtils
;
import
com.server.web.common.mapper.TKzyUserMapper
;
import
com.server.web.common.model.TKzyUser
;
import
com.server.web.common.model.TKzyUserExample
;
import
com.server.web.common.service.UserService
;
...
...
@@ -26,15 +27,22 @@ import java.util.concurrent.TimeUnit;
public
class
UserController
extends
BaseController
{
@Autowired
UserService
userService
;
@Autowired
private
TKzyUserMapper
tKzyUserMapper
;
@PostMapping
(
"/userData"
)
@ResponseBody
@RequestMapping
(
value
=
"/userData"
,
method
=
{
RequestMethod
.
POST
,
RequestMethod
.
GET
},
produces
=
"application/json"
)
public
Map
userData
(
HttpServletRequest
request
)
{
TKzyUser
loginUser
=
getLoginUser
(
request
);
if
(
loginUser
!=
null
&&
loginUser
.
getId
()
!=
null
)
{
loginUser
=
tKzyUserMapper
.
selectByPrimaryKey
(
loginUser
.
getId
());
}
return
returnSuccess
(
loginUser
);
}
@PostMapping
(
"/register"
)
@ResponseBody
@RequestMapping
(
value
=
"/register"
,
method
=
{
RequestMethod
.
POST
,
RequestMethod
.
GET
},
produces
=
"application/json"
)
public
Map
register
(
HttpServletRequest
request
)
{
TKzyUser
user
=
getLoginUser
(
request
);
String
phone
=
request
.
getParameter
(
"phone"
);
...
...
@@ -86,7 +94,8 @@ public class UserController extends BaseController {
return
returnSuccess
(
user
);
}
@PostMapping
(
"/update"
)
@ResponseBody
@RequestMapping
(
value
=
"/update"
,
method
=
{
RequestMethod
.
POST
,
RequestMethod
.
GET
},
produces
=
"application/json"
)
public
Map
update
(
HttpServletRequest
request
)
{
TKzyUser
loginUser
=
getLoginUser
(
request
);
if
(
loginUser
==
null
)
{
...
...
@@ -222,7 +231,7 @@ public class UserController extends BaseController {
* @return
*/
@ResponseBody
@RequestMapping
(
value
=
"/signIn"
,
method
=
{
RequestMethod
.
POST
,
RequestMethod
.
GET
},
produces
=
"application/json"
)
@RequestMapping
(
value
=
"/signIn"
,
method
=
{
RequestMethod
.
POST
,
RequestMethod
.
GET
},
produces
=
"application/json"
)
public
Map
<
String
,
Object
>
signIn
(
HttpServletRequest
request
)
{
TKzyUser
loginUser
=
getLoginUser
(
request
);
if
(
loginUser
==
null
||
loginUser
.
getId
()
==
null
)
{
...
...
@@ -238,7 +247,7 @@ public class UserController extends BaseController {
* @return
*/
@ResponseBody
@RequestMapping
(
value
=
"/signInList"
,
method
=
{
RequestMethod
.
POST
,
RequestMethod
.
GET
},
produces
=
"application/json"
)
@RequestMapping
(
value
=
"/signInList"
,
method
=
{
RequestMethod
.
POST
,
RequestMethod
.
GET
},
produces
=
"application/json"
)
public
Map
<
String
,
Object
>
signInList
(
HttpServletRequest
request
)
{
TKzyUser
loginUser
=
getLoginUser
(
request
);
if
(
loginUser
==
null
||
loginUser
.
getId
()
==
null
)
{
...
...
src/main/resources/mybatis/mapping/IntegralMapper.xml
View file @
a40ef3a
...
...
@@ -24,7 +24,7 @@
WHERE
t.source_type = 1
AND t.user_id = #{userId,jdbcType=BIGINT}
AND DATE_FORMAT(t.create_dt, '%Y-%m-%') = #{tod
ya
,jdbcType=VARCHAR}
limit
t.id DESC limit 0,1
AND DATE_FORMAT(t.create_dt, '%Y-%m-%') = #{tod
ay
,jdbcType=VARCHAR}
ORDER BY
t.id DESC limit 0,1
</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