IndexController.java
1.88 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
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;
/**
* 首页相关
* Created by weiwenfu@163.com on 2018/12/12 下午 3:03.
*/
@RestController
@RequestMapping(value = BaseController.WX_NAMESPACE + "/index", produces = "application/json")
public class IndexController {
@Autowired
private IndexService indexService;
/**
* banner
*
* @return
*/
@ResponseBody
@RequestMapping(value = "/banner", method = {RequestMethod.POST, RequestMethod.GET}, produces = "application/json")
public Map<String, Object> banner() {
return indexService.banner();
}
/**
* 首页分类
*
* @return
*/
@ResponseBody
@RequestMapping(value = "/categoryList", method = {RequestMethod.POST, RequestMethod.GET}, produces = "application/json")
public Map<String, Object> categoryList() {
return indexService.categoryList();
}
/**
* 首页分类-两条数据
*
* @return
*/
@ResponseBody
@RequestMapping(value = "/categoryDetail", method = {RequestMethod.POST, RequestMethod.GET}, produces = "application/json")
public Map<String, Object> categoryDetail() {
return indexService.categoryDetail();
}
/**
* 首页直播课
*
* @return
*/
@ResponseBody
@RequestMapping(value = "/livingCourseToday", method = {RequestMethod.POST, RequestMethod.GET}, produces = "application/json")
public Map<String, Object> livingCourseToday() {
return indexService.livingCourseToday();
}
}