package com.simple.controller; import com.simple.common.Result; import com.simple.common.ResultData; import com.simple.domain.dto.WxUserCouponDto; import com.simple.service.WxUserCouponService; import io.swagger.annotations.ApiOperation; import org.springframework.beans.factory.annotation.Autowired; 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; /** * Created by syf on 2018/8/10. */ @RestController @RequestMapping("wxUserCoupon") public class WxUserCouponController { @Autowired private WxUserCouponService wxUserCouponService; @ApiOperation("查询用户卡券接口") @PostMapping("findByStatus") public ResultData findByStatus(@RequestBody WxUserCouponDto wxUserCoupon) { //根据用户id,用户卡券状态查找 if(wxUserCoupon==null||wxUserCoupon.getcUserId()==null||wxUserCoupon.getCouponStatus()==null){ return new ResultData(Result.ERROR,"查询失败"); } return new ResultData(Result.SUCCESS,"查询成功",wxUserCouponService.findList(wxUserCoupon.getcUserId(),wxUserCoupon.getCouponStatus())); } }