package com.ym.mec.web.controller;

import com.ym.mec.auth.api.client.SysUserFeignService;
import com.ym.mec.auth.api.entity.SysUser;
import com.ym.mec.biz.dal.page.SysCouponCodeQueryInfo;
import com.ym.mec.biz.service.SysCouponCodeService;
import com.ym.mec.common.controller.BaseController;
import com.ym.mec.common.entity.HttpResponseResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RequestMapping("sysCouponCode")
@Api(tags = "优惠券明细")
@RestController
public class SysCouponCodeController extends BaseController {

	@Autowired
	private SysCouponCodeService sysCouponCodeService;
	@Autowired
	private SysUserFeignService sysUserFeignService;

	@ApiOperation("分页查询")
	@RequestMapping(value = "queryPage")
	@PreAuthorize("@pcs.hasPermissions('sysCouponCode/queryPage')")
	public HttpResponseResult queryPage(SysCouponCodeQueryInfo queryInfo) {
		return succeed(sysCouponCodeService.querySysCouponUseList(queryInfo));
	}
}
