Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.
 
 
 
 
 

48 строки
1.9 KiB

  1. package com.simple.controller;
  2. import com.simple.domain.vo.WxCouponChannelVo;
  3. import com.simple.enums.EnumCouponChannelStatus;
  4. import io.swagger.annotations.Api;
  5. import org.slf4j.Logger;
  6. import org.slf4j.LoggerFactory;
  7. import org.springframework.beans.factory.annotation.Autowired;
  8. import org.springframework.util.Assert;
  9. import org.springframework.web.bind.annotation.*;
  10. import com.github.pagehelper.PageInfo;
  11. import com.simple.common.Result;
  12. import com.simple.common.ResultData;
  13. import com.simple.domain.po.WxCouponChannel;
  14. import com.simple.service.WxCouponChannelService;
  15. import io.swagger.annotations.ApiImplicitParam;
  16. import io.swagger.annotations.ApiImplicitParams;
  17. import io.swagger.annotations.ApiOperation;
  18. @RestController
  19. @RequestMapping("/api/wxCouponChannel")
  20. @Api(description = "发券渠道相关接口")
  21. public class WxCouponChannelController extends BaseController {
  22. private final Logger logger = LoggerFactory.getLogger(this.getClass());
  23. @Autowired
  24. private WxCouponChannelService wxCouponChannelService;
  25. @ApiOperation("分页列表接口")
  26. @GetMapping("list")
  27. @ApiImplicitParams({
  28. @ApiImplicitParam(name="pageNum",value="页数",dataType="int", paramType = "query",required=true),
  29. @ApiImplicitParam(name="pageSize",value="每页条数",dataType="int", paramType = "query",required=true)})
  30. public ResultData list(@ModelAttribute WxCouponChannel wxCouponChannel,Integer pageNum, Integer pageSize) {
  31. if (null == wxCouponChannel) wxCouponChannel = new WxCouponChannel();
  32. wxCouponChannel.setTenantId(getTenantId());
  33. wxCouponChannel.setStatus(EnumCouponChannelStatus.STATUS_THROW_IN.getCode());
  34. wxCouponChannel.setSortColumns(WxCouponChannel.Field.CreateDate_DESC);
  35. final PageInfo<WxCouponChannelVo> page = wxCouponChannelService.listPageCAPI(wxCouponChannel, pageNum, pageSize);
  36. return new ResultData(page);
  37. }
  38. }