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.
 
 
 
 
 

33 lines
1.1 KiB

  1. package com.simple.controller;
  2. import com.simple.common.Result;
  3. import com.simple.common.ResultData;
  4. import com.simple.service.WxCouponService;
  5. import io.swagger.annotations.Api;
  6. import io.swagger.annotations.ApiImplicitParam;
  7. import io.swagger.annotations.ApiOperation;
  8. import org.apache.log4j.Logger;
  9. import org.springframework.beans.factory.annotation.Autowired;
  10. import org.springframework.web.bind.annotation.GetMapping;
  11. import org.springframework.web.bind.annotation.RequestMapping;
  12. import org.springframework.web.bind.annotation.RestController;
  13. @RestController
  14. @RequestMapping("/api/coupon")
  15. @Api(description="券类相关接口")
  16. public class WxCouponController extends BaseController {
  17. private Logger logger = Logger.getLogger(WxCouponController.class);
  18. @Autowired
  19. private WxCouponService wxCouponService;
  20. @ApiOperation("根据id查询接口")
  21. @GetMapping("/findById")
  22. @ApiImplicitParam(name = "id", value = "id", dataType = "Long", paramType = "query", required = true)
  23. public ResultData findById(Long id) {
  24. return new ResultData(Result.SUCCESS, "查询成功", wxCouponService.getById(id));
  25. }
  26. }