diff --git a/src/main/java/com/ifish/config/RedisConfig.java b/src/main/java/com/ifish/config/RedisConfig.java index fbabe23..d52001a 100644 --- a/src/main/java/com/ifish/config/RedisConfig.java +++ b/src/main/java/com/ifish/config/RedisConfig.java @@ -6,6 +6,7 @@ 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.Configuration; import org.springframework.data.redis.connection.RedisConnectionFactory; @@ -26,7 +27,7 @@ public class RedisConfig { // //获取当前操作系统(servers_os为服务器设置的属性JAVA_OPTS=%JAVA_OPTS% -Dservers_os=online84) // 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.setPort(3796); diff --git a/src/main/java/com/ifish/helper/FastDFSClient.java b/src/main/java/com/ifish/helper/FastDFSClient.java index 189a2df..da78a50 100644 --- a/src/main/java/com/ifish/helper/FastDFSClient.java +++ b/src/main/java/com/ifish/helper/FastDFSClient.java @@ -29,7 +29,7 @@ public class FastDFSClient implements FastDFSClientI { //获取classpath路径下配置文件"fdfs_client.conf"的路径 //conf直接写相对于classpath的位置,不需要写classpath: String conf = ""; - if (IfishFilePath.link_img_head.contains("ifish7")) { + if (IfishUtil.isOnLine()) { conf = "fdfs_client_ifish7.conf"; } else { conf = "fdfs_client_zhangxinyanv5.conf"; diff --git a/src/main/java/com/ifish/mapper/Tbl_Push_List_MapperSql.java b/src/main/java/com/ifish/mapper/Tbl_Push_List_MapperSql.java index 7e9386b..fdb070b 100644 --- a/src/main/java/com/ifish/mapper/Tbl_Push_List_MapperSql.java +++ b/src/main/java/com/ifish/mapper/Tbl_Push_List_MapperSql.java @@ -69,9 +69,7 @@ public class Tbl_Push_List_MapperSql { } if (StringUtils.isNotBlank(pushType)) { sb.append(" AND a.push_type = #{pushType}"); - } else { - sb.append(" AND a.push_type <> 'remind_water'"); - } + } if (StringUtils.isNotBlank(sdkVersion)) { sb.append(" AND c.sdk_version = #{sdkversion}"); } @@ -117,9 +115,7 @@ public class Tbl_Push_List_MapperSql { } if (StringUtils.isNotBlank(pushType)) { sb.append(" AND a.push_type = #{pushType}"); - } else { - sb.append(" AND a.push_type <> 'remind_water'"); - } + } if (StringUtils.isNotBlank(sdkVersion)) { sb.append(" AND c.sdk_version = #{sdkversion}"); } diff --git a/src/main/java/com/ifish/util/IfishFilePath.java b/src/main/java/com/ifish/util/IfishFilePath.java index 521c71e..5ab2d13 100644 --- a/src/main/java/com/ifish/util/IfishFilePath.java +++ b/src/main/java/com/ifish/util/IfishFilePath.java @@ -16,36 +16,20 @@ import java.util.Properties; */ public class IfishFilePath { - //头像地址 - public static String path_img; /** * 图片头地址 */ 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 ifish_account; - //IM官方手机号 - public static String netease_phone; - //直播间封面 - public static String path_room_img; - //开发模式 - public static boolean devModel; + + public static String AppKeyFormal; + + public static String MasterSecretFormal; + + public static String AppKey; + + public static String MasterSecret; static { Properties prop = new Properties(); diff --git a/src/main/java/com/ifish/util/IfishUtil.java b/src/main/java/com/ifish/util/IfishUtil.java index aba4806..76306fe 100644 --- a/src/main/java/com/ifish/util/IfishUtil.java +++ b/src/main/java/com/ifish/util/IfishUtil.java @@ -64,6 +64,19 @@ public class IfishUtil { */ 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 */ diff --git a/src/main/resources/property.properties b/src/main/resources/property.properties index 7c9f526..edd072c 100644 --- a/src/main/resources/property.properties +++ b/src/main/resources/property.properties @@ -1,25 +1,11 @@ -#\u5934\u50cf\u5b58\u50a8\u8def\u5f84 -path_img=/mydata/tmp/Img/app -#\u5546\u5bb6\u8ba4\u8bc1\u56fe\u7247 -path_shops=/mydata/tmp/Img/shops -#\u5546\u54c1\u4ecb\u7ecd\u56fe\u7247 -path_commodity=/mydata/tmp/Img/commodity -#\u76f4\u64ad\u95f4\u5c01\u9762 -path_room_img=/mydata/tmp/Img/room -#\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 +#\u6b63\u5f0f\u73af\u5883\u6781\u5149AppKey +AppKeyFormal=123 +#\u6b63\u5f0f\u73af\u5883\u6781\u5149Master Secret +MasterSecretFormal=123 +#\u6d4b\u8bd5\u73af\u5883\u6781\u5149AppKey +AppKey=6e5e9d757570859b3f274bb8 +#\u6d4b\u8bd5\u73af\u5883\u6781\u5149Master Secret +MasterSecret=4f759a0609dcd9d2edb06125 #\u672c\u5730 #link_img_head=http://192.168.61.128:81/ #\u6d4b\u8bd5\u73af\u5883 @@ -27,6 +13,4 @@ link_img_head=http://139.196.24.156:83/ #\u6b63\u5f0f\u73af\u5883 #link_img_head=https://app.ifish7.com/ #\u56fe\u7247\u683c\u5f0f\u9a8c\u8bc1 -check_style=GIF,PNG,BMP,JPG,JPEG -#\u662f\u5426\u5f00\u53d1\u6a21\u5f0f\uff0cfalse\u5219\u4ee3\u8868\u8981\u53d1\u5e03\u5230\u6d4b\u8bd5\u6216\u8005\u6b63\u5f0f\u73af\u5883\uff0c\u4f1a\u8fdb\u884c\u5168\u5c40\u5934\u90e8\u9a8c\u8bc1\uff0ctrue\u4ee3\u8868\u5728\u672c\u5730\u8fdb\u884c\u4ee3\u7801\u7f16\u5199\uff0c\u4e0d\u4f1a\u8fdb\u884c\u9a8c\u8bc1 -devModel=true \ No newline at end of file +check_style=GIF,PNG,BMP,JPG,JPEG \ No newline at end of file