ServiceTokenController.java 1019 B

123456789101112131415161718192021222324252627282930313233343536
  1. package com.diagbot.web;
  2. import com.diagbot.dto.RespDTO;
  3. import com.diagbot.facade.ServiceTokenFacade;
  4. import org.springframework.beans.factory.annotation.Autowired;
  5. import org.springframework.web.bind.annotation.PostMapping;
  6. import org.springframework.web.bind.annotation.RequestMapping;
  7. import org.springframework.web.bind.annotation.RequestParam;
  8. import org.springframework.web.bind.annotation.RestController;
  9. import springfox.documentation.annotations.ApiIgnore;
  10. /**
  11. * <p>
  12. * 服务令牌表 前端控制器
  13. * </p>
  14. *
  15. * @author zhaops
  16. * @since 2018-09-17
  17. */
  18. @RestController
  19. @RequestMapping("/serviceToken")
  20. public class ServiceTokenController {
  21. @Autowired
  22. ServiceTokenFacade serviceTokenFacade;
  23. @PostMapping("/hasPermission")
  24. @ApiIgnore
  25. public RespDTO<Boolean> hasPermission(@RequestParam("appkey") String appkey, @RequestParam("secret") String secret, @RequestParam("productId") Long productId) {
  26. return serviceTokenFacade.hasPermission(appkey, secret, productId);
  27. }
  28. }