|
@@ -4,8 +4,11 @@ package com.diagbot.web;
|
|
|
import com.diagbot.dto.RespDTO;
|
|
|
import com.diagbot.facade.ServiceTokenFacade;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
-import org.springframework.stereotype.Controller;
|
|
|
+import org.springframework.web.bind.annotation.PostMapping;
|
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
+import org.springframework.web.bind.annotation.RequestParam;
|
|
|
+import org.springframework.web.bind.annotation.RestController;
|
|
|
+import springfox.documentation.annotations.ApiIgnore;
|
|
|
|
|
|
/**
|
|
|
* <p>
|
|
@@ -15,7 +18,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
* @author zhaops
|
|
|
* @since 2018-09-17
|
|
|
*/
|
|
|
-@Controller
|
|
|
+@RestController
|
|
|
@RequestMapping("/serviceToken")
|
|
|
public class ServiceTokenController {
|
|
|
|
|
@@ -23,9 +26,10 @@ public class ServiceTokenController {
|
|
|
ServiceTokenFacade serviceTokenFacade;
|
|
|
|
|
|
|
|
|
- @RequestMapping("/hasPermisson")
|
|
|
- public RespDTO<Boolean> hasPermission(String appkey, String secret, Long productId) {
|
|
|
- return serviceTokenFacade.hasPermisson(appkey, secret, productId);
|
|
|
+ @PostMapping("/hasPermission")
|
|
|
+ @ApiIgnore
|
|
|
+ public RespDTO<Boolean> hasPermission(@RequestParam("appkey") String appkey, @RequestParam("secret") String secret, @RequestParam("productId") Long productId) {
|
|
|
+ return serviceTokenFacade.hasPermission(appkey, secret, productId);
|
|
|
}
|
|
|
|
|
|
}
|