This commit is contained in:
parent
60a752c839
commit
32545d6cdd
|
|
@ -14,6 +14,8 @@ import cn.jpush.api.push.model.PushPayload;
|
||||||
import cn.jpush.api.push.model.audience.Audience;
|
import cn.jpush.api.push.model.audience.Audience;
|
||||||
import cn.jpush.api.push.model.notification.IosNotification;
|
import cn.jpush.api.push.model.notification.IosNotification;
|
||||||
import cn.jpush.api.push.model.notification.Notification;
|
import cn.jpush.api.push.model.notification.Notification;
|
||||||
|
import com.ifish.util.IfishFilePath;
|
||||||
|
import com.ifish.util.IfishUtil;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
|
|
@ -29,10 +31,17 @@ public class JiGuangPush {
|
||||||
// private static final String masterSecret = "60162c8cf195ce9f4dc76629";
|
// private static final String masterSecret = "60162c8cf195ce9f4dc76629";
|
||||||
// private static final String appKey = "d970d5e193cb2a0bbe41653c";
|
// private static final String appKey = "d970d5e193cb2a0bbe41653c";
|
||||||
//测试
|
//测试
|
||||||
private final static String masterSecret = "4f759a0609dcd9d2edb06125";
|
private static String masterSecret = "4f759a0609dcd9d2edb06125";
|
||||||
private final static String appKey = "6e5e9d757570859b3f274bb8";
|
private static String appKey = "6e5e9d757570859b3f274bb8";
|
||||||
|
|
||||||
static {
|
static {
|
||||||
|
if (IfishUtil.isOnLine()) {
|
||||||
|
appKey = IfishFilePath.AppKeyFormal;
|
||||||
|
masterSecret = IfishFilePath.MasterSecretFormal;
|
||||||
|
} else {
|
||||||
|
appKey = IfishFilePath.AppKeyFormal;
|
||||||
|
masterSecret = IfishFilePath.MasterSecretFormal;
|
||||||
|
}
|
||||||
jPushClient = new JPushClient(masterSecret, appKey);
|
jPushClient = new JPushClient(masterSecret, appKey);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@
|
||||||
*/
|
*/
|
||||||
package com.ifish.config;
|
package com.ifish.config;
|
||||||
|
|
||||||
import com.ifish.util.IfishFilePath;
|
import com.ifish.util.IfishUtil;
|
||||||
import org.springframework.context.annotation.Bean;
|
import org.springframework.context.annotation.Bean;
|
||||||
import org.springframework.context.annotation.Configuration;
|
import org.springframework.context.annotation.Configuration;
|
||||||
import org.springframework.data.redis.connection.RedisConnectionFactory;
|
import org.springframework.data.redis.connection.RedisConnectionFactory;
|
||||||
|
|
@ -26,7 +26,7 @@ public class RedisConfig {
|
||||||
|
|
||||||
// //获取当前操作系统(servers_os为服务器设置的属性JAVA_OPTS=%JAVA_OPTS% -Dservers_os=online84)
|
// //获取当前操作系统(servers_os为服务器设置的属性JAVA_OPTS=%JAVA_OPTS% -Dservers_os=online84)
|
||||||
// String servers_os = System.getProperty("servers_os") == null ? "" : System.getProperty("servers_os");
|
// String servers_os = System.getProperty("servers_os") == null ? "" : System.getProperty("servers_os");
|
||||||
if (IfishFilePath.link_img_head.contains("ifish7")) {
|
if (IfishUtil.isOnLine()) {
|
||||||
//站点线上服务器
|
//站点线上服务器
|
||||||
cf.setHostName("120.55.190.56");
|
cf.setHostName("120.55.190.56");
|
||||||
cf.setPort(3796);
|
cf.setPort(3796);
|
||||||
|
|
|
||||||
|
|
@ -29,7 +29,7 @@ public class FastDFSClient implements FastDFSClientI {
|
||||||
//获取classpath路径下配置文件"fdfs_client.conf"的路径
|
//获取classpath路径下配置文件"fdfs_client.conf"的路径
|
||||||
//conf直接写相对于classpath的位置,不需要写classpath:
|
//conf直接写相对于classpath的位置,不需要写classpath:
|
||||||
String conf = "";
|
String conf = "";
|
||||||
if (IfishFilePath.link_img_head.contains("ifish7")) {
|
if (IfishUtil.isOnLine()) {
|
||||||
conf = "fdfs_client_ifish7.conf";
|
conf = "fdfs_client_ifish7.conf";
|
||||||
} else {
|
} else {
|
||||||
conf = "fdfs_client_zhangxinyanv5.conf";
|
conf = "fdfs_client_zhangxinyanv5.conf";
|
||||||
|
|
|
||||||
|
|
@ -16,34 +16,20 @@ import java.util.Properties;
|
||||||
*/
|
*/
|
||||||
public class IfishFilePath {
|
public class IfishFilePath {
|
||||||
|
|
||||||
//头像地址
|
|
||||||
public static String path_img;
|
|
||||||
/**
|
/**
|
||||||
* 图片头地址
|
* 图片头地址
|
||||||
*/
|
*/
|
||||||
public static String link_img_head;
|
public static String link_img_head;
|
||||||
//商家图片地址
|
|
||||||
public static String path_shops;
|
|
||||||
//商品介绍图片
|
|
||||||
public static String path_commodity;
|
|
||||||
//微信分享页面
|
|
||||||
public static String path_share_html;
|
|
||||||
//微信分享页图片
|
|
||||||
public static String path_share_img;
|
|
||||||
//看护报告页面
|
|
||||||
public static String path_look_html;
|
|
||||||
//看护报告图片
|
|
||||||
public static String path_look_img;
|
|
||||||
//html名字
|
|
||||||
public static String html_name;
|
|
||||||
//图片上传格式
|
//图片上传格式
|
||||||
public static String check_style;
|
public static String check_style;
|
||||||
//云信爱鱼奇官方帐号
|
|
||||||
public static String ifish_account;
|
public static String AppKeyFormal;
|
||||||
//IM官方手机号
|
|
||||||
public static String netease_phone;
|
public static String MasterSecretFormal;
|
||||||
//直播间封面
|
|
||||||
public static String path_room_img;
|
public static String AppKey;
|
||||||
|
|
||||||
|
public static String MasterSecret;
|
||||||
//开发模式
|
//开发模式
|
||||||
public static boolean devModel;
|
public static boolean devModel;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -64,6 +64,19 @@ public class IfishUtil {
|
||||||
*/
|
*/
|
||||||
public static final int CacheTime_DAYS = 1;
|
public static final int CacheTime_DAYS = 1;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否在线上运行,true在线上,false在测试环境
|
||||||
|
*
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public static boolean isOnLine() {
|
||||||
|
if (IfishFilePath.link_img_head.contains("ifish7")) {
|
||||||
|
return true;
|
||||||
|
} else {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Object转Json
|
* Object转Json
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -1,27 +1,11 @@
|
||||||
#\u5934\u50cf\u5b58\u50a8\u8def\u5f84
|
#\u6b63\u5f0f\u73af\u5883\u6781\u5149AppKey
|
||||||
path_img=/mydata/tmp/Img/app
|
AppKeyFormal=123
|
||||||
#\u5546\u5bb6\u8ba4\u8bc1\u56fe\u7247
|
#\u6b63\u5f0f\u73af\u5883\u6781\u5149Master Secret
|
||||||
path_shops=/mydata/tmp/Img/shops
|
MasterSecretFormal=123
|
||||||
#\u5546\u54c1\u4ecb\u7ecd\u56fe\u7247
|
#\u6d4b\u8bd5\u73af\u5883\u6781\u5149AppKey
|
||||||
path_commodity=/mydata/tmp/Img/commodity
|
AppKey=6e5e9d757570859b3f274bb8
|
||||||
#\u76f4\u64ad\u95f4\u5c01\u9762
|
#\u6d4b\u8bd5\u73af\u5883\u6781\u5149Master Secret
|
||||||
path_room_img=/mydata/tmp/Img/room
|
MasterSecret=4f759a0609dcd9d2edb06125
|
||||||
#\u5fae\u4fe1\u5206\u4eab\u9875\u9762
|
|
||||||
path_share_html=/mydata/tmp/html/
|
|
||||||
#\u5fae\u4fe1\u5206\u4eab\u9875\u56fe\u7247
|
|
||||||
path_share_img=/mydata/tmp/html/images/share
|
|
||||||
#\u770b\u62a4\u62a5\u544a\u9875\u9762
|
|
||||||
path_look_html=/mydata/tmp/look/
|
|
||||||
#\u770b\u62a4\u62a5\u544a\u56fe\u7247
|
|
||||||
path_look_img=/mydata/tmp/look/images/share
|
|
||||||
#\u770b\u62a4\u62a5\u544a\u6a21\u7248html\u540d\u5b57
|
|
||||||
html_name=index.html
|
|
||||||
#\u4e91\u4fe1\u7231\u9c7c\u5947\u5b98\u65b9\u5e10\u53f7
|
|
||||||
ifish_account=ifish
|
|
||||||
#IM\u5b98\u65b9\u624b\u673a\u53f7
|
|
||||||
netease_phone=18501773036
|
|
||||||
#\u672c\u5730
|
|
||||||
#link_img_head=http://192.168.61.128:81/
|
|
||||||
#\u6d4b\u8bd5\u73af\u5883
|
#\u6d4b\u8bd5\u73af\u5883
|
||||||
link_img_head=http://139.196.24.156:83/
|
link_img_head=http://139.196.24.156:83/
|
||||||
#\u6b63\u5f0f\u73af\u5883
|
#\u6b63\u5f0f\u73af\u5883
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue