|
|
@@ -50,6 +50,7 @@ import javax.servlet.http.Cookie;
|
|
|
import javax.servlet.http.HttpServletRequest;
|
|
|
import javax.servlet.http.HttpServletResponse;
|
|
|
import java.util.Date;
|
|
|
+import java.util.Optional;
|
|
|
|
|
|
/**
|
|
|
* @author chan
|
|
|
@@ -155,11 +156,11 @@ public class AuthorizationController {
|
|
|
* 微信js-sdk 权限验证
|
|
|
*/
|
|
|
@RequestMapping(value = "/jsTicket", method = RequestMethod.GET)
|
|
|
- public Result<JsSdkTicket> ticket(String url) throws Exception{
|
|
|
+ public Result<JsSdkTicket> ticket(String appId, String url) throws Exception{
|
|
|
if (StringUtils.isBlank(url)) {
|
|
|
throw BusinessRuntimeException.getInstance("请输入授权网址.");
|
|
|
}
|
|
|
- return GatewayResponse.SUCCESS.newBuilder().toResult(authorizationService.getJsTicket(weChatConfig.getAppid(),url));
|
|
|
+ return GatewayResponse.SUCCESS.newBuilder().toResult(authorizationService.getJsTicket(Optional.ofNullable(appId).orElse(weChatConfig.getAppid()),url));
|
|
|
|
|
|
}
|
|
|
|