From 0ea9db59bf53ca58deb9d7fafbab64e409cce521 Mon Sep 17 00:00:00 2001 From: wanggeng888 <450292408@qq.com> Date: Sat, 22 May 2021 09:17:36 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=A0=E9=99=A4IM=EF=BC=8C=E4=BF=AE=E6=94=B9?= =?UTF-8?q?=E8=B5=84=E6=BA=90=E7=B3=BB=E7=BB=9F=E8=8F=9C=E5=8D=95=E8=AF=B7?= =?UTF-8?q?=E6=B1=82=E4=B8=BA=E5=BC=82=E6=AD=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../resources/system/menu/MenuResourceController.java | 7 ++++--- src/main/resources/application-test.yml | 9 ++++++--- .../resources/mybatis/mapper/system/menu/menu-mapper.xml | 2 +- src/main/resources/templates/main.html | 2 +- 4 files changed, 12 insertions(+), 8 deletions(-) diff --git a/src/main/java/com/cm/serviceusercenter/controller/resources/system/menu/MenuResourceController.java b/src/main/java/com/cm/serviceusercenter/controller/resources/system/menu/MenuResourceController.java index 06680e2..9ca4d5c 100644 --- a/src/main/java/com/cm/serviceusercenter/controller/resources/system/menu/MenuResourceController.java +++ b/src/main/java/com/cm/serviceusercenter/controller/resources/system/menu/MenuResourceController.java @@ -2,7 +2,6 @@ package com.cm.serviceusercenter.controller.resources.system.menu; import com.cm.common.constants.ISystemConstant; import com.cm.common.result.ErrorResult; -import com.cm.common.result.SuccessResult; import com.cm.common.result.SuccessResultData; import com.cm.serviceusercenter.controller.BaseController; import com.cm.serviceusercenter.pojo.dtos.MenuDTO; @@ -12,8 +11,10 @@ import io.swagger.annotations.*; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; +import javax.servlet.http.HttpServletRequest; import java.util.List; import java.util.Map; +import java.util.concurrent.Callable; /** * @ClassName: MenuController @@ -51,8 +52,8 @@ public class MenuResourceController extends BaseController { }) @ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)}) @GetMapping("listmenubyclientid/{clientId}/{userId}") - public SuccessResultData> listMenuByClientId(@PathVariable("clientId") String clientId, @PathVariable("userId") String userId) throws Exception { - return menuService.listMenuByClientIdAndUserId(clientId, userId); + public Callable>> listMenuByClientId(@PathVariable("clientId") String clientId, @PathVariable("userId") String userId, HttpServletRequest httpServletRequest) throws Exception { + return () -> menuService.listMenuByClientIdAndUserId(clientId, userId); } } diff --git a/src/main/resources/application-test.yml b/src/main/resources/application-test.yml index 20df9b5..0d53412 100644 --- a/src/main/resources/application-test.yml +++ b/src/main/resources/application-test.yml @@ -1,7 +1,7 @@ server: port: 7001 url: http://192.168.0.103:7001/usercenter - ws: ws://192.168.0.103:7001/usercenter/ws +# ws: ws://192.168.0.103:7001/usercenter/ws title: 统一用户管理平台 login-page-name: 统一用户管理平台 servlet: @@ -29,10 +29,13 @@ spring: datasource: druid: url: jdbc:mysql://49.233.36.36:6688/db_cloud?useUnicode=true&characterEncoding=utf8&characterSetResults=utf8&autoReconnect=true&failOverReadOnly=false&useSSL=false&serverTimezone=UTC +# url: jdbc:mysql://127.0.0.1:3306/db_cloud_v2_inspection?useUnicode=true&characterEncoding=utf8&characterSetResults=utf8&autoReconnect=true&failOverReadOnly=false&useSSL=false&serverTimezone=UTC db-type: mysql driver-class-name: com.mysql.cj.jdbc.Driver username: wanggeng +# username: root password: WenG>2132997 +# password: root initial-size: 2 min-idle: 2 max-active: 10 @@ -168,7 +171,7 @@ open-platform: wechat: mini-app: # 激活状态 - active: true + active: false authorizeUrl: https://api.weixin.qq.com/sns/jscode2session # 绑定用户连接,指向统一用户,可以内网 bindUserUrl: http://127.0.0.1:7001/usercenter/wxminiapp/sign/logincheckusername @@ -182,7 +185,7 @@ open-platform: # 公众号 official-account: # 开启跨域 - apiCrossOrigin: true + apiCrossOrigin: false activate: false authorize: authorize-url: https://open.weixin.qq.com/connect/oauth2/authorize diff --git a/src/main/resources/mybatis/mapper/system/menu/menu-mapper.xml b/src/main/resources/mybatis/mapper/system/menu/menu-mapper.xml index 38a3553..5dfebd2 100644 --- a/src/main/resources/mybatis/mapper/system/menu/menu-mapper.xml +++ b/src/main/resources/mybatis/mapper/system/menu/menu-mapper.xml @@ -146,7 +146,7 @@ - SELECT * FROM diff --git a/src/main/resources/templates/main.html b/src/main/resources/templates/main.html index b5f6bc6..de72547 100644 --- a/src/main/resources/templates/main.html +++ b/src/main/resources/templates/main.html @@ -162,7 +162,7 @@ base: 'assets/layuiadmin/' //静态资源所在路径 }).extend({ index: 'lib/index' //主入口模块 - }).use(['index', 'restajax', 'datamessage', 'dialog', 'im-socket'], function() { + }).use(['index', 'restajax', 'datamessage', 'dialog'/*, 'im-socket'*/], function() { var $ = layui.$; var layer = layui.layer;