添加小程序直播后端服务接口以及配置
This commit is contained in:
@ -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";
|
||||
|
||||
|
||||
}
|
||||
|
@ -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";
|
||||
|
26
yshop-common/src/main/java/co/yixiang/utils/GsonParser.java
Normal file
26
yshop-common/src/main/java/co/yixiang/utils/GsonParser.java
Normal 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();
|
||||
}
|
||||
}
|
@ -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();
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user