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 0437f8ba
authored
Mar 14, 2020
by
魏文甫
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
1 parent
8f6e8099
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
27 additions
and
15 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/java/com/server/web/controller/IndexController.java
View file @
0437f8b
...
@@ -3,6 +3,8 @@ package com.server.web.controller;
...
@@ -3,6 +3,8 @@ package com.server.web.controller;
import
com.server.web.common.service.IndexService
;
import
com.server.web.common.service.IndexService
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.RequestMapping
;
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
org.springframework.web.bind.annotation.RestController
;
import
java.util.Map
;
import
java.util.Map
;
...
@@ -23,7 +25,8 @@ public class IndexController {
...
@@ -23,7 +25,8 @@ public class IndexController {
*
*
* @return
* @return
*/
*/
@RequestMapping
(
"/banner"
)
@ResponseBody
@RequestMapping
(
value
=
"/banner"
,
method
=
{
RequestMethod
.
POST
,
RequestMethod
.
GET
},
produces
=
"application/json"
)
public
Map
<
String
,
Object
>
banner
()
{
public
Map
<
String
,
Object
>
banner
()
{
return
indexService
.
banner
();
return
indexService
.
banner
();
}
}
...
@@ -33,7 +36,8 @@ public class IndexController {
...
@@ -33,7 +36,8 @@ public class IndexController {
*
*
* @return
* @return
*/
*/
@RequestMapping
(
"/categoryList"
)
@ResponseBody
@RequestMapping
(
value
=
"/categoryList"
,
method
=
{
RequestMethod
.
POST
,
RequestMethod
.
GET
},
produces
=
"application/json"
)
public
Map
<
String
,
Object
>
categoryList
()
{
public
Map
<
String
,
Object
>
categoryList
()
{
return
indexService
.
categoryList
();
return
indexService
.
categoryList
();
}
}
...
@@ -43,7 +47,8 @@ public class IndexController {
...
@@ -43,7 +47,8 @@ public class IndexController {
*
*
* @return
* @return
*/
*/
@RequestMapping
(
"/categoryDetail"
)
@ResponseBody
@RequestMapping
(
value
=
"/categoryDetail"
,
method
=
{
RequestMethod
.
POST
,
RequestMethod
.
GET
},
produces
=
"application/json"
)
public
Map
<
String
,
Object
>
categoryDetail
()
{
public
Map
<
String
,
Object
>
categoryDetail
()
{
return
indexService
.
categoryDetail
();
return
indexService
.
categoryDetail
();
}
}
...
@@ -53,7 +58,8 @@ public class IndexController {
...
@@ -53,7 +58,8 @@ public class IndexController {
*
*
* @return
* @return
*/
*/
@RequestMapping
(
"/livingCourseToday"
)
@ResponseBody
@RequestMapping
(
value
=
"/livingCourseToday"
,
method
=
{
RequestMethod
.
POST
,
RequestMethod
.
GET
},
produces
=
"application/json"
)
public
Map
<
String
,
Object
>
livingCourseToday
()
{
public
Map
<
String
,
Object
>
livingCourseToday
()
{
return
indexService
.
livingCourseToday
();
return
indexService
.
livingCourseToday
();
}
}
...
...
src/main/java/com/server/web/controller/InformationController.java
View file @
0437f8b
...
@@ -3,9 +3,7 @@ package com.server.web.controller;
...
@@ -3,9 +3,7 @@ package com.server.web.controller;
import
com.server.web.common.model.TKzyUser
;
import
com.server.web.common.model.TKzyUser
;
import
com.server.web.common.service.InformationService
;
import
com.server.web.common.service.InformationService
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.RestController
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletRequest
;
import
java.util.Map
;
import
java.util.Map
;
...
@@ -24,7 +22,8 @@ public class InformationController extends BaseController {
...
@@ -24,7 +22,8 @@ public class InformationController extends BaseController {
*
*
* @return
* @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
)
{
public
Map
<
String
,
Object
>
secondClassList
(
HttpServletRequest
request
,
@RequestParam
(
value
=
"firstId"
)
Long
firstId
)
{
return
informationService
.
secondClassList
(
firstId
);
return
informationService
.
secondClassList
(
firstId
);
}
}
...
@@ -34,7 +33,8 @@ public class InformationController extends BaseController {
...
@@ -34,7 +33,8 @@ public class InformationController extends BaseController {
*
*
* @return
* @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
,
public
Map
<
String
,
Object
>
secondClassDetail
(
HttpServletRequest
request
,
@RequestParam
(
value
=
"secondId"
)
Long
secondId
,
@RequestParam
(
value
=
"pageNo"
,
defaultValue
=
"1"
)
Integer
pageNo
,
@RequestParam
(
value
=
"pageSize"
)
Integer
pageSize
)
{
@RequestParam
(
value
=
"pageNo"
,
defaultValue
=
"1"
)
Integer
pageNo
,
@RequestParam
(
value
=
"pageSize"
)
Integer
pageSize
)
{
return
informationService
.
secondClassDetail
(
secondId
,
pageNo
,
pageSize
);
return
informationService
.
secondClassDetail
(
secondId
,
pageNo
,
pageSize
);
...
@@ -47,7 +47,8 @@ public class InformationController extends BaseController {
...
@@ -47,7 +47,8 @@ public class InformationController extends BaseController {
* @param informationId
* @param informationId
* @return
* @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
)
{
public
Map
<
String
,
Object
>
informationDetail
(
HttpServletRequest
request
,
@RequestParam
(
value
=
"informationId"
)
Long
informationId
)
{
return
informationService
.
informationDetail
(
informationId
);
return
informationService
.
informationDetail
(
informationId
);
}
}
...
@@ -61,7 +62,8 @@ public class InformationController extends BaseController {
...
@@ -61,7 +62,8 @@ public class InformationController extends BaseController {
* @param pageSize
* @param pageSize
* @return
* @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
,
public
Map
<
String
,
Object
>
informationCommentList
(
HttpServletRequest
request
,
@RequestParam
(
value
=
"informationId"
)
Long
informationId
,
@RequestParam
(
value
=
"pageNo"
,
defaultValue
=
"1"
)
Integer
pageNo
,
@RequestParam
(
value
=
"pageSize"
)
Integer
pageSize
)
{
@RequestParam
(
value
=
"pageNo"
,
defaultValue
=
"1"
)
Integer
pageNo
,
@RequestParam
(
value
=
"pageSize"
)
Integer
pageSize
)
{
return
informationService
.
informationCommentList
(
informationId
,
pageNo
,
pageSize
);
return
informationService
.
informationCommentList
(
informationId
,
pageNo
,
pageSize
);
...
@@ -74,7 +76,8 @@ public class InformationController extends BaseController {
...
@@ -74,7 +76,8 @@ public class InformationController extends BaseController {
* @param comment
* @param comment
* @return
* @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
)
{
public
Map
<
String
,
Object
>
informationComment
(
HttpServletRequest
request
,
@RequestParam
(
value
=
"informationId"
)
Long
informationId
,
@RequestParam
(
value
=
"comment"
)
String
comment
)
{
TKzyUser
tKzyUser
=
getLoginUser
(
request
);
TKzyUser
tKzyUser
=
getLoginUser
(
request
);
Long
userId
=
null
;
Long
userId
=
null
;
...
...
src/main/java/com/server/web/controller/UserController.java
View file @
0437f8b
...
@@ -31,7 +31,8 @@ public class UserController extends BaseController {
...
@@ -31,7 +31,8 @@ public class UserController extends BaseController {
private
TKzyUserMapper
tKzyUserMapper
;
private
TKzyUserMapper
tKzyUserMapper
;
@PostMapping
(
"/userData"
)
@ResponseBody
@RequestMapping
(
value
=
"/userData"
,
method
=
{
RequestMethod
.
POST
,
RequestMethod
.
GET
},
produces
=
"application/json"
)
public
Map
userData
(
HttpServletRequest
request
)
{
public
Map
userData
(
HttpServletRequest
request
)
{
TKzyUser
loginUser
=
getLoginUser
(
request
);
TKzyUser
loginUser
=
getLoginUser
(
request
);
if
(
loginUser
!=
null
&&
loginUser
.
getId
()
!=
null
)
{
if
(
loginUser
!=
null
&&
loginUser
.
getId
()
!=
null
)
{
...
@@ -40,7 +41,8 @@ public class UserController extends BaseController {
...
@@ -40,7 +41,8 @@ public class UserController extends BaseController {
return
returnSuccess
(
loginUser
);
return
returnSuccess
(
loginUser
);
}
}
@PostMapping
(
"/register"
)
@ResponseBody
@RequestMapping
(
value
=
"/register"
,
method
=
{
RequestMethod
.
POST
,
RequestMethod
.
GET
},
produces
=
"application/json"
)
public
Map
register
(
HttpServletRequest
request
)
{
public
Map
register
(
HttpServletRequest
request
)
{
TKzyUser
user
=
getLoginUser
(
request
);
TKzyUser
user
=
getLoginUser
(
request
);
String
phone
=
request
.
getParameter
(
"phone"
);
String
phone
=
request
.
getParameter
(
"phone"
);
...
@@ -92,7 +94,8 @@ public class UserController extends BaseController {
...
@@ -92,7 +94,8 @@ public class UserController extends BaseController {
return
returnSuccess
(
user
);
return
returnSuccess
(
user
);
}
}
@PostMapping
(
"/update"
)
@ResponseBody
@RequestMapping
(
value
=
"/update"
,
method
=
{
RequestMethod
.
POST
,
RequestMethod
.
GET
},
produces
=
"application/json"
)
public
Map
update
(
HttpServletRequest
request
)
{
public
Map
update
(
HttpServletRequest
request
)
{
TKzyUser
loginUser
=
getLoginUser
(
request
);
TKzyUser
loginUser
=
getLoginUser
(
request
);
if
(
loginUser
==
null
)
{
if
(
loginUser
==
null
)
{
...
...
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