generated from root/miduo_server
返利代码添加
parent
030f77d817
commit
1897e92afb
|
|
@ -46,7 +46,7 @@ public class GmController {
|
||||||
|
|
||||||
String cmd = request.getParameter("content");
|
String cmd = request.getParameter("content");
|
||||||
if(cmd.equals("recharge")){
|
if(cmd.equals("recharge")){
|
||||||
// recharge();
|
recharge();
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
String serverId = request.getParameter("serverId");
|
String serverId = request.getParameter("serverId");
|
||||||
|
|
@ -226,28 +226,28 @@ public class GmController {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// public void recharge() throws IOException {
|
public void recharge() throws IOException {
|
||||||
// String osName = System.getProperty("os.name");
|
String osName = System.getProperty("os.name");
|
||||||
// String filePath = "";
|
String filePath = "";
|
||||||
// Gson gson = new Gson();
|
Gson gson = new Gson();
|
||||||
// if (osName.matches("^(?i)Windows.*$")) {// Window 系统
|
if (osName.matches("^(?i)Windows.*$")) {// Window 系统
|
||||||
// filePath = "conf/";
|
filePath = "conf/";
|
||||||
// } else {// Linux 系统
|
} else {// Linux 系统
|
||||||
// filePath = "../config/";
|
filePath = "../config/";
|
||||||
// }
|
}
|
||||||
// BufferedReader in = new BufferedReader(new FileReader(filePath+"rechargeImport.txt"));
|
BufferedReader in = new BufferedReader(new FileReader(filePath+"rechargeImport.txt"));
|
||||||
// BufferedWriter out = new BufferedWriter(new FileWriter(filePath+"recharge.json"));
|
BufferedWriter out = new BufferedWriter(new FileWriter(filePath+"recharge.json"));
|
||||||
// String str;
|
String str;
|
||||||
// while ((str = in.readLine()) != null) {
|
while ((str = in.readLine()) != null) {
|
||||||
// String[] s = str.split("\t");
|
String[] s = str.split("\t");
|
||||||
// RechargeInfo rechargeInfo = new RechargeInfo(s[0], Double.valueOf(s[1]), 0);
|
RechargeInfo rechargeInfo = new RechargeInfo(s[0], Double.valueOf(s[1]), 0);
|
||||||
// String json = gson.toJson(rechargeInfo);
|
String json = gson.toJson(rechargeInfo);
|
||||||
// System.out.println(s[0]+"||"+s[1]);
|
System.out.println(s[0]+"||"+s[1]);
|
||||||
// out.write(json+"\n");
|
out.write(json+"\n");
|
||||||
// }
|
}
|
||||||
// in.close();
|
in.close();
|
||||||
// out.close();
|
out.close();
|
||||||
// }
|
}
|
||||||
public static void main(String[] args) throws IOException {
|
public static void main(String[] args) throws IOException {
|
||||||
String osName = System.getProperty("os.name");
|
String osName = System.getProperty("os.name");
|
||||||
String filePath = "";
|
String filePath = "";
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue