zouxuan 1 éve
szülő
commit
52e87650ee

+ 1 - 1
cooleshow-auth/auth-api/src/main/java/com/yonge/cooleshow/auth/api/client/SysUserFeignService.java

@@ -54,7 +54,7 @@ public interface SysUserFeignService {
 										   @RequestParam("clientId")String clientId,
 										   @RequestParam("clientSecret")String clientSecret);
 
-	@PostMapping(value = "user/getTenantByClient")
+	@GetMapping(value = "user/getTenantByClient")
 	@ApiOperation(value = "获取机构编号")
 	HttpResponseResult<Long> getTenantByClient(@RequestParam("userId")Long userId,@RequestParam("clientId")String clientId);
 

+ 3 - 9
cooleshow-auth/auth-server/src/main/java/com/yonge/cooleshow/auth/web/controller/UserController.java

@@ -40,13 +40,7 @@ import org.springframework.http.MediaType;
 import org.springframework.security.access.prepost.PreAuthorize;
 import org.springframework.security.authentication.BadCredentialsException;
 import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.PathVariable;
-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.ResponseBody;
-import org.springframework.web.bind.annotation.RestController;
+import org.springframework.web.bind.annotation.*;
 
 import javax.validation.Valid;
 import java.text.MessageFormat;
@@ -135,8 +129,8 @@ public class UserController extends BaseController {
         return sysUserService.get(userId);
     }
 
-    @PostMapping(value = "/getTenantByClient", consumes = MediaType.APPLICATION_FORM_URLENCODED_VALUE)
-    public HttpResponseResult<Long> getTenantByClient(Long userId,String clientId) {
+    @GetMapping(value = "/getTenantByClient")
+    public HttpResponseResult<Long> getTenantByClient(@RequestParam("userId")Long userId, @RequestParam("clientId")String clientId) {
         return HttpResponseResult.succeed(sysUserService.getTenantByClient(userId,clientId));
     }