package com.cyjd.rights.controller; import com.baomidou.mybatisplus.core.metadata.IPage; import com.cyjd.rights.business.service.RightsOrderService; import com.cyjd.rights.dto.RightsOrderDto; import com.cyjd.rights.vo.RightsOrderVo; import com.github.pagehelper.PageHelper; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiParam; import lombok.extern.slf4j.Slf4j; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; @Api(value = "权益领取订单接口",tags = "权益领取订单接口") @RestController @RequestMapping("/rights/rightsOrder") @Slf4j public class RightsOrderController { @Autowired private RightsOrderService rightsOrderService; @ApiOperation(value="查看用户领取权益记录分页") @PostMapping(value = "/page") public IPage pageOrder(@Validated @RequestBody @ApiParam("用户领取权益对象") RightsOrderDto dto){ PageHelper.startPage(dto.getPageNum(), dto.getPageSize()); IPage page = rightsOrderService.getPageOrder(dto); return page; } }