审查视图

src/main/java/com/tianbo/warehouse/controller/CRMController.java 1.5 KB
朱兆平 authored
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
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 = "查询客户资源列表")
朱兆平 authored
28
    @PostMapping("/list")
朱兆平 authored
29 30 31 32 33 34 35 36 37 38 39 40 41
    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);

    }


}