InformationController.java
1.8 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
package com.server.web.controller;
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 javax.servlet.http.HttpServletRequest;
import java.util.Map;
/**
 * Created by weiwenfu@163.com on 2020/3/12 下午 4:53.
 */
@RestController
@RequestMapping(value = BaseController.WX_NAMESPACE + "/information", produces = "application/json")
public class InformationController {
    @Autowired
    private InformationService informationService;
    /**
     * 二级分类
     *
     * @return
     */
    @RequestMapping("/secondClassList")
    public Map<String, Object> secondClassList(HttpServletRequest request, @RequestParam(value = "firstId") Long firstId) {
        return informationService.secondClassList(firstId);
    }
    /**
     * 二级分类详情
     *
     * @return
     */
    @RequestMapping("/secondClassDetail")
    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);
    }
    /**
     * 资讯详情
     *
     * @param request
     * @param informationId
     * @return
     */
    @RequestMapping("/informationDetail")
    public Map<String, Object> informationDetail(HttpServletRequest request, @RequestParam(value = "informationId") Long informationId) {
        return informationService.informationDetail(informationId);
    }
}