CRMController.java
1.5 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
package com.tianbo.warehouse.controller;
import com.github.pagehelper.PageInfo;
import com.tianbo.warehouse.annotation.LogAnnotation;
import com.tianbo.warehouse.controller.response.ResultJson;
import com.tianbo.warehouse.model.ROLE;
import com.tianbo.warehouse.model.RolePermission;
import com.tianbo.warehouse.service.RoleService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.validation.Valid;
@RestController()
@RequestMapping("/crm")
@Api(tags = {"客户资源管理"})
public class CRMController {
@Autowired
RoleService roleService;
@ApiOperation(value = "查询客户资源列表", notes = "查询客户资源列表")
@PostMapping("/list")
public ResultJson<PageInfo<ROLE>> list(@RequestParam(value = "pageNum",required = false,defaultValue = "1")
int pageNum,
@RequestParam(value = "pageSize",required = false,defaultValue = "10")
int pageSize,
@RequestBody ROLE role){
PageInfo<ROLE> rolePageInfo = roleService.orgSelectWithRootNoTree(role,pageNum, pageSize);
return new ResultJson<PageInfo<ROLE>>("200","success",rolePageInfo);
}
}