短信通用版本修改中:修改文件路径存储错误的bug

streaming
liuguijing 4 months ago
parent 30e4562f1d
commit 874f7db0cd

@ -23,7 +23,6 @@ import java.util.List;
import java.util.Map; import java.util.Map;
public class UpdateSysConfigUtil { public class UpdateSysConfigUtil {
public static final String PACKAGE_NAME_MPAPP = "com.xypower.mpapp";
public static final String APP_ACTION_UPDATE_CONFIGS = "com.xypower.mpapp.ACT_UPD_CFG"; public static final String APP_ACTION_UPDATE_CONFIGS = "com.xypower.mpapp.ACT_UPD_CFG";
private static final String MASTER_ACTION_UPDATE_CONFIGS = "com.xypower.mpmaster.ACT_UPD_CFG"; private static final String MASTER_ACTION_UPDATE_CONFIGS = "com.xypower.mpmaster.ACT_UPD_CFG";
@ -63,7 +62,7 @@ public class UpdateSysConfigUtil {
//获取配置文件地址 //获取配置文件地址
public static String getChannelDir(int channel) { public static String getChannelDir(int channel) {
String appPath = buildAppDir(PACKAGE_NAME_MPAPP); String appPath = buildAppDir(MicroPhotoContext.PACKAGE_NAME_MPAPP);
String path = appPath + "data/channels/" + channel + ".json"; String path = appPath + "data/channels/" + channel + ".json";
return path; return path;
} }
@ -71,7 +70,7 @@ public class UpdateSysConfigUtil {
//获取配置文件地址 //获取配置文件地址
public static String getMpAppDir() { public static String getMpAppDir() {
String appPath = buildAppDir(PACKAGE_NAME_MPAPP); String appPath = buildAppDir(MicroPhotoContext.PACKAGE_NAME_MPAPP);
String content = FilesUtils.readTextFile(appPath + "data/Master.json"); String content = FilesUtils.readTextFile(appPath + "data/Master.json");
return content; return content;
} }
@ -89,7 +88,7 @@ public class UpdateSysConfigUtil {
//获取配置文件地址 //获取配置文件地址
public static String getScheduleDir(int channel) { public static String getScheduleDir(int channel) {
String appPath = buildAppDir(PACKAGE_NAME_MPAPP); String appPath = buildAppDir(MicroPhotoContext.PACKAGE_NAME_MPAPP);
String path = appPath + "data/schedules/" + channel; String path = appPath + "data/schedules/" + channel;
return path; return path;
} }

@ -39,11 +39,11 @@ public class ValueTypeUtil {
String fileName = null; String fileName = null;
switch (fileType) { switch (fileType) {
case 1: case 1:
filePath = MicroPhotoContext.buildMpAppDir(context) + "/data/"; filePath =MicroPhotoContext.PACKAGE_NAME_MPAPP + "/data/";
fileName = "App.json"; fileName = "App.json";
break; break;
case 2: case 2:
filePath = MicroPhotoContext.buildMasterAppDir(context) + "/data/"; filePath =MicroPhotoContext.PACKAGE_NAME_MPMASTER + "/data/";
fileName = "Master.json"; fileName = "Master.json";
break; break;
case 91: case 91:
@ -55,7 +55,7 @@ public class ValueTypeUtil {
case 97: case 97:
case 98: case 98:
case 99: case 99:
filePath = MicroPhotoContext.buildMpAppDir(context) + "/data/channels/"; filePath =MicroPhotoContext.PACKAGE_NAME_MPAPP + "/data/channels/";
fileName = Integer.toString(fileType - 90) + ".json"; fileName = Integer.toString(fileType - 90) + ".json";
break; break;
default: default:

Loading…
Cancel
Save