添加小程序直播后端服务接口以及配置

This commit is contained in:
xuwenbo
2020-08-10 14:06:39 +08:00
parent b36c991504
commit 496f5cd6a0
16 changed files with 805 additions and 4 deletions

View File

@ -53,8 +53,10 @@ public interface ShopConstants {
* 微信公众号service
*/
String YSHOP_WEIXIN_MP_SERVICE = "yshop_weixin_mp_service";
/**
* 微信小程序service
*/
String YSHOP_WEIXIN_MA_SERVICE = "yshop_weixin_ma_service";
/**
* 商城默认密码
@ -166,4 +168,6 @@ public interface ShopConstants {
String YSHOP_REDIS_CITY_KEY = "yshop:city";
String YSHOP_APP_LOGIN_USER = "app-online-token";
}

View File

@ -37,6 +37,8 @@ public class SystemConfigConstants {
public final static String WECHAT_SHARE_TITLE="wechat_share_title";
public final static String WECHAT_SOURCEID="wechat_sourceid";
public final static String WECHAT_TOKEN="wechat_token";
public final static String WECHAT_MA_TOKEN="wechat_ma_token";
public final static String WECHAT_MA_ENCODINGAESKEY="wechat_ma_encodingaeskey";
public final static String WECHAT_TYPE="wechat_type";
public final static String WXAPP_APPID="wxapp_appId";
public final static String WXAPP_SECRET="wxapp_secret";

View File

@ -0,0 +1,26 @@
package co.yixiang.utils;
import com.google.gson.JsonObject;
import com.google.gson.JsonParser;
import com.google.gson.stream.JsonReader;
import java.io.Reader;
/**
* @author niefy
*/
public class GsonParser {
private static final JsonParser JSON_PARSER = new JsonParser();
public static JsonObject parse(String json) {
return JSON_PARSER.parse(json).getAsJsonObject();
}
public static JsonObject parse(Reader json) {
return JSON_PARSER.parse(json).getAsJsonObject();
}
public static JsonObject parse(JsonReader json) {
return JSON_PARSER.parse(json).getAsJsonObject();
}
}

View File

@ -145,6 +145,21 @@ public class ShopKeyUtils {
return wxAppSecret+getExtendValue();
}
/**
* 微信公众号验证token
*/
public static String getWechatMaToken(){
String wechatToken= SystemConfigConstants.WECHAT_MA_TOKEN;
return wechatToken+getExtendValue();
}
/**
* 微信公众号 EncodingAESKey
*/
public static String getWechatMaEncodingAESKey(){
String wechatEncodingAESKey= SystemConfigConstants.WECHAT_MA_ENCODINGAESKEY;
return wechatEncodingAESKey+getExtendValue();
}
/**
* 支付appId
*/
@ -153,4 +168,13 @@ public class ShopKeyUtils {
return wxNativeAppAppId+getExtendValue();
}
/**
* 微信小程序service
* @return
*/
public static String getYshopWeiXinMaSevice() {
String yshopWeiXinMaSevice= ShopConstants.YSHOP_WEIXIN_MA_SERVICE;
return yshopWeiXinMaSevice+getExtendValue();
}
}