修改程序逻辑,准备批量打包
This commit is contained in:
1 parent
aab73b978f
commit
55528e5109
30 files changed
+297
-150
No files matched your search
@@ -29,6 +29,9 @@ namespace KJD_Web.BLL
|
||||
var UpdateExeChk = System.Configuration.ConfigurationManager.ConnectionStrings["UpdateExeChk"].ConnectionString;
|
||||
var LowVersion = System.Configuration.ConfigurationManager.ConnectionStrings["LowVersion"].ConnectionString;
|
||||
|
||||
serverVersion = "1115";
|
||||
UpdateFiles = "http://weidian.e57.cn/kjd_update/Update1115.zip";
|
||||
|
||||
if (version > LowVersion.ParseToInt())
|
||||
{
|
||||
return "{\"code\":200,\"msg\":\"success\",\"next_version\":" + serverVersion + ",\"exe_check\":\"" + UpdateExeChk +
|
||||
@@ -45,5 +48,42 @@ namespace KJD_Web.BLL
|
||||
}
|
||||
return "{\"code\":19999,\"msg\":\"未知错误\"}";
|
||||
}
|
||||
|
||||
public string GetUpdateNew(string inputData)
|
||||
{
|
||||
//string time1 = Encryption(time);
|
||||
//return "time=" + time + "&code=" + time1 + "&NbCodeVersion=1" + "&version=" + BaseClass.VersionCount
|
||||
|
||||
if (!string.IsNullOrEmpty(inputData))
|
||||
{
|
||||
var time = 0;
|
||||
int.TryParse(RegexUtils.GetStringQuery(ref inputData, "time"), out time);
|
||||
string time1 = RegexUtils.GetStringQuery(ref inputData, "code");
|
||||
if (time1 != EncrypUtil.Encryption(time))
|
||||
return "{\"code\":50000,\"msg\":\"校验失败\"}";
|
||||
|
||||
var version = RegexUtils.GetStringQuery(ref inputData, "version").ParseToInt();
|
||||
var serverVersion = System.Configuration.ConfigurationManager.ConnectionStrings["UpdateVersion"].ConnectionString;
|
||||
var UpdateNewUrl = System.Configuration.ConfigurationManager.ConnectionStrings["UpdateNewUrl"].ConnectionString;
|
||||
var UpdateExe = System.Configuration.ConfigurationManager.ConnectionStrings["UpdateExe"].ConnectionString;
|
||||
var UpdateExeChk = System.Configuration.ConfigurationManager.ConnectionStrings["UpdateExeChk"].ConnectionString;
|
||||
var LowVersion = System.Configuration.ConfigurationManager.ConnectionStrings["LowVersion"].ConnectionString;
|
||||
|
||||
if (version > LowVersion.ParseToInt())
|
||||
{
|
||||
return "{\"code\":200,\"msg\":\"success\",\"next_version\":" + serverVersion + ",\"exe_check\":\"" + UpdateExeChk +
|
||||
"\",\"exe_address\":\"" + UpdateExe + "\",\"file_address\":\"" + UpdateNewUrl + "\"}";
|
||||
}
|
||||
else if (version > 0)
|
||||
{
|
||||
return "{\"code\":501,\"msg\":\"版本过低已无法直接升级,请联系管理员获取最新安装包\"}";
|
||||
}
|
||||
else
|
||||
{
|
||||
return "{\"code\":502,\"msg\":\"get update version failed\"}";
|
||||
}
|
||||
}
|
||||
return "{\"code\":19999,\"msg\":\"未知错误\"}";
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -54,7 +54,7 @@ namespace KJD_Web
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
[WebMethod]
|
||||
public void get_update()
|
||||
{
|
||||
@@ -66,5 +66,17 @@ namespace KJD_Web
|
||||
Context.Response.Write(result);
|
||||
Context.Response.End();
|
||||
}
|
||||
|
||||
[WebMethod]
|
||||
public void get_update_new()
|
||||
{
|
||||
var jsontext = GetRequestJsonString();
|
||||
|
||||
var result = jsontext;
|
||||
result = new UpadteManage().GetUpdateNew(jsontext);
|
||||
|
||||
Context.Response.Write(result);
|
||||
Context.Response.End();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -11,8 +11,8 @@
|
||||
<add name="LowVersion" connectionString="523"/>
|
||||
<add name="LimitVersion" connectionString="823"/>
|
||||
<add name="UpdateExe" connectionString="http://1.13.195.131:9000/Download/Update.exe"/>
|
||||
<add name="UpdateFiles" connectionString="http://1.13.195.131:9000/Download/Update525.zip"/>
|
||||
<add name="UpdateExeChk" connectionString="324527ACE5020DCA77D65A5037718B65"/>
|
||||
<add name="UpdateNewUrl" connectionString="http://weidian.e57.cn/kjd_update/"/>
|
||||
<add name="UpdateExeChk" connectionString="CE4A009B7AA330314F03EEA0C3AB23F9"/>
|
||||
<add name="GetReturnPackage" connectionString="true"/>
|
||||
<add name="GetWXRecommendHotProd" connectionString="true"/>
|
||||
<add name="GetWXRecommendHotProdOncePerDay" connectionString="false"/>
|
||||
|
||||
Reference in new issue
Block a user