|
|
|
@@ -0,0 +1,36 @@ |
|
|
|
package com.simple.controller; |
|
|
|
|
|
|
|
import com.github.pagehelper.PageInfo; |
|
|
|
import com.simple.common.ResultData; |
|
|
|
import com.simple.domain.po.WxBusiness; |
|
|
|
import com.simple.domain.po.WxCUser; |
|
|
|
import com.simple.service.WxBusinessService; |
|
|
|
import io.swagger.annotations.ApiImplicitParam; |
|
|
|
import io.swagger.annotations.ApiImplicitParams; |
|
|
|
import io.swagger.annotations.ApiOperation; |
|
|
|
import org.apache.log4j.Logger; |
|
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
|
import org.springframework.web.bind.annotation.*; |
|
|
|
|
|
|
|
@RestController |
|
|
|
@RequestMapping("/api/wxBusiness") |
|
|
|
public class WxBusinessController extends BaseController |
|
|
|
{ |
|
|
|
private Logger logger = Logger.getLogger(WxBusinessController.class); |
|
|
|
|
|
|
|
@Autowired |
|
|
|
private WxBusinessService wxBusinessService; |
|
|
|
|
|
|
|
@ApiOperation("分页列表接口") |
|
|
|
@GetMapping("list") |
|
|
|
@ApiImplicitParams({ |
|
|
|
@ApiImplicitParam(name="pageNum",value="页数",dataType="int", paramType = "query",required=true), |
|
|
|
@ApiImplicitParam(name="pageSize",value="每页条数",dataType="int", paramType = "query",required=true)}) |
|
|
|
public ResultData list(WxBusiness wxBusiness,Integer pageNum, Integer pageSize) { |
|
|
|
if (null == wxBusiness) wxBusiness = new WxBusiness(); |
|
|
|
WxCUser user = getUser(); |
|
|
|
wxBusiness.setTenantId(user.getTenantId()); |
|
|
|
final PageInfo<WxBusiness> page = wxBusinessService.listAsPage(wxBusiness, pageNum, pageSize); |
|
|
|
return new ResultData(page); |
|
|
|
} |
|
|
|
} |