From 7c54f286318be632f3f0afa319fb018e9ac3e779 Mon Sep 17 00:00:00 2001 From: wenc000 <450292408@qq.com> Date: Sat, 9 May 2020 19:30:34 +0800 Subject: [PATCH] =?UTF-8?q?api=E6=8E=A5=E5=8F=A3=E5=88=86=E7=B1=BB?= =?UTF-8?q?=EF=BC=8CappToken=E7=B1=BB=E5=88=AB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/cm/common/config/SwaggerConfig.java | 6 +++--- .../com/cm/common/constants/ISystemConstant.java | 16 ++++++++-------- .../com/cm/common/enums/AppTokenTypeEnum.java | 1 + .../src/test/java/com/cm/LicenseTest.java | 5 +++-- 4 files changed, 15 insertions(+), 13 deletions(-) diff --git a/cloud-common/src/main/java/com/cm/common/config/SwaggerConfig.java b/cloud-common/src/main/java/com/cm/common/config/SwaggerConfig.java index 301c462..2d7da2b 100644 --- a/cloud-common/src/main/java/com/cm/common/config/SwaggerConfig.java +++ b/cloud-common/src/main/java/com/cm/common/config/SwaggerConfig.java @@ -142,18 +142,18 @@ public class SwaggerConfig { } @Bean - public Docket createRestApiWeb() { + public Docket createRestApiWechatMiniApp() { List responseMessageList = responseMessageList(); return new Docket(DocumentationType.SWAGGER_2) .globalResponseMessage(RequestMethod.POST, responseMessageList) .globalResponseMessage(RequestMethod.DELETE, responseMessageList) .globalResponseMessage(RequestMethod.PUT, responseMessageList) .globalResponseMessage(RequestMethod.GET, responseMessageList) - .groupName(ISystemConstant.API_GROUP_WEB) + .groupName(ISystemConstant.API_GROUP_WECHAT_MINI_APP) .apiInfo(apiInfo()) .select() .apis(RequestHandlerSelectors.basePackage(swaggerBasePackage)) - .paths(PathSelectors.ant("/web/**")) + .paths(PathSelectors.ant("/wxminiapp/**")) .build(); } diff --git a/cloud-common/src/main/java/com/cm/common/constants/ISystemConstant.java b/cloud-common/src/main/java/com/cm/common/constants/ISystemConstant.java index d8257ee..8656a17 100644 --- a/cloud-common/src/main/java/com/cm/common/constants/ISystemConstant.java +++ b/cloud-common/src/main/java/com/cm/common/constants/ISystemConstant.java @@ -33,9 +33,9 @@ public interface ISystemConstant { */ String API_TAGS_WECHAT_PREFIX = "微信接口-"; /** - * 网页接口 + * 微信小程序接口 */ - String API_TAGS_WEB_PREFIX = "网页接口-"; + String API_TAGS_WECHAT_MINI_APP_PREFIX = "微信小程序接口-"; /** * 系统接口分组 */ @@ -57,17 +57,13 @@ public interface ISystemConstant { */ String API_GROUP_WECHAT = "WECHAT"; /** - * 网页接口分组 + * 微信小程序接口分组 */ - String API_GROUP_WEB = "WEB"; + String API_GROUP_WECHAT_MINI_APP = "WXMINIAPP"; /** * api前缀 */ String API_PREFIX = "/api"; - /** - * 网页前缀 - */ - String API_WEB_PREFIX = "/web"; /** * 路由前缀 */ @@ -100,6 +96,10 @@ public interface ISystemConstant { * 微信路由前缀 */ String WECHAT_ROUTE_PREFIX = "/wechatroute"; + /** + * 微信小程序前缀 + */ + String WECHAT_MINI_APP_PREFIX = "/wxminiapp"; /** * true */ diff --git a/cloud-common/src/main/java/com/cm/common/enums/AppTokenTypeEnum.java b/cloud-common/src/main/java/com/cm/common/enums/AppTokenTypeEnum.java index 68529b4..3abab72 100644 --- a/cloud-common/src/main/java/com/cm/common/enums/AppTokenTypeEnum.java +++ b/cloud-common/src/main/java/com/cm/common/enums/AppTokenTypeEnum.java @@ -13,6 +13,7 @@ package com.cm.common.enums; public enum AppTokenTypeEnum { WECHAT("wechat"), + WECHAT_MINI_APP("wxminiapp"), APP("app"); private String type; diff --git a/cloud-security/src/test/java/com/cm/LicenseTest.java b/cloud-security/src/test/java/com/cm/LicenseTest.java index f4d4473..3711dc2 100644 --- a/cloud-security/src/test/java/com/cm/LicenseTest.java +++ b/cloud-security/src/test/java/com/cm/LicenseTest.java @@ -35,11 +35,12 @@ public class LicenseTest { // 东河新三务公开:00-16-3E-00-79-BC // 本机:F0-79-60-1E-49-FC // 应急管理局测试服务器(58.18.22.25):00-50-56-BE-3C-BC + // 包头政法委:00-50-56-93-2D-29 // 内蒙古艺校:18-66-DA-E8-EC-D4 // String mac = AddressUtil.getMacAddress(); // System.out.println(mac); - - String license = License.getLicense("2020-04-22", "40", "18-66-DA-E8-EC-D4", "_System_License_"); + // 环保统一用户:FA-16-3E-17-20-7D + String license = License.getLicense("2020-05-08", "10000", "FA-16-3E-17-20-7D", "_System_License_"); System.out.println(license); }