You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

37 lines
1.3 KiB

  1. package com.simple.controller;
  2. import com.simple.common.Result;
  3. import com.simple.common.ResultData;
  4. import com.simple.domain.dto.WxUserCouponDto;
  5. import com.simple.service.WxUserCouponService;
  6. import io.swagger.annotations.ApiOperation;
  7. import org.springframework.beans.factory.annotation.Autowired;
  8. import org.springframework.web.bind.annotation.PostMapping;
  9. import org.springframework.web.bind.annotation.RequestBody;
  10. import org.springframework.web.bind.annotation.RequestMapping;
  11. import org.springframework.web.bind.annotation.RestController;
  12. /**
  13. * Created by syf on 2018/8/10.
  14. */
  15. @RestController
  16. @RequestMapping("wxUserCoupon")
  17. public class WxUserCouponController {
  18. @Autowired
  19. private WxUserCouponService wxUserCouponService;
  20. @ApiOperation("查询用户卡券接口")
  21. @PostMapping("findByStatus")
  22. public ResultData findByStatus(@RequestBody WxUserCouponDto wxUserCoupon) {
  23. //根据用户id,用户卡券状态查找
  24. if(wxUserCoupon==null||wxUserCoupon.getcUserId()==null||wxUserCoupon.getCouponStatus()==null){
  25. return new ResultData(Result.ERROR,"查询失败");
  26. }
  27. return new ResultData(Result.SUCCESS,"查询成功",wxUserCouponService.findList(wxUserCoupon.getcUserId(),wxUserCoupon.getCouponStatus()));
  28. }
  29. }