修复bug,更新说明,增加一个linux下面mysql数据库sql

This commit is contained in:
2018-08-22 19:47:04 +08:00
parent b228e11e38
commit ba00c9e938
17 changed files with 1801 additions and 26 deletions
+2 -2
View File
@@ -5,8 +5,8 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore" Version="2.1.2" />
<PackageReference Include="NewLife.Core" Version="7.3.6763.36550" />
<PackageReference Include="Microsoft.AspNetCore" Version="2.1.3" />
<PackageReference Include="NewLife.Core" Version="7.3.6805.17853" />
<PackageReference Include="System.Configuration.ConfigurationManager" Version="4.5.0" />
<PackageReference Include="ZKWeb.System.Drawing" Version="4.0.1" />
</ItemGroup>
+29
View File
@@ -43,5 +43,34 @@ namespace COMCMS.Common
return prestr.ToString();
}
#endregion
#region 生成签名后的地址
/// <summary>
/// 根据规则生成请求地址
/// </summary>
/// <param name="dicArray"></param>
/// <param name="host"></param>
/// <returns></returns>
public static string CreateSignURL(SortedDictionary<string, string> dicArray, string host)
{
StringBuilder prestr = new StringBuilder();
StringBuilder urlstr = new StringBuilder();
foreach (KeyValuePair<string, string> temp in dicArray)
{
if (temp.Key != "signature")
{
prestr.Append(temp.Value);
urlstr.Append(temp.Key + "=" + temp.Value + "&");
}
}
NewLife.Log.XTrace.WriteLine("加密前数据:" + prestr);
string mysign = Utils.MD5(prestr.ToString() + Utils.SIGNSALT);
urlstr.Append("signature=" + mysign);
string reUrl = host + "?" + urlstr.ToString();
return reUrl;
}
#endregion
}
}
+25
View File
@@ -703,6 +703,31 @@ namespace COMCMS.Common
TimeSpan ts = DateTime.UtcNow - new DateTime(1970, 1, 1, 0, 0, 0, 0);
return Convert.ToInt64(ts.TotalSeconds).ToString();
}
/// <summary>
/// 获取JS时间戳
/// </summary>
/// <returns></returns>
public static string GetJSTimeStamp()
{
TimeSpan ts = DateTime.UtcNow - new DateTime(1970, 1, 1, 0, 0, 0, 0);
return Convert.ToInt64(ts.TotalMilliseconds).ToString();
}
/// <summary>
/// 获取当前URL绝对地址
/// </summary>
/// <returns></returns>
public static string GetNowURL()
{
string url = GetServerUrl() + MyHttpContext.Current.Request.Path;
string querystring = MyHttpContext.Current.Request.QueryString.ToString();
if (!string.IsNullOrWhiteSpace(querystring))
url = url + querystring;
return url;
}
#endregion
#region 处理部分
+1 -1
View File
@@ -5,7 +5,7 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="NewLife.XCode" Version="9.8.6763.36551" />
<PackageReference Include="NewLife.XCode" Version="9.9.6806.38809" />
<PackageReference Include="Newtonsoft.Json" Version="11.0.2" />
</ItemGroup>
@@ -66,10 +66,10 @@
<td>
<div class="rt-editpanel">
<a href="javascript:;" class="btn btn-xs btn-primary" title="编辑" onclick="showEdit(@m.Id)"><i class="fa fa-edit"></i> 编辑</a>
<a href="javascript:;" class="btn btn-xs btn-danger" title="删除" onclick="doDel('/AdminCP/Guestbook/DelGuestbookKind',@m.Id);"><i class="fa fa-close"></i> 删除</a>
<a href="javascript:;" class="btn btn-xs btn-danger" title="删除" onclick="doDel('/AdminCP/Guestbook/DelGuestbookCategory',@m.Id);"><i class="fa fa-close"></i> 删除</a>
</div>
<div class="rt-savepanel hidden">
<a href="javascript:;" class="btn btn-xs btn-success" title="保存" onclick="doEdit('listGuestbookKindForm', '/AdminCP/Guestbook/EditGuestbookKind',@m.Id)"><i class="fa fa-save"></i> 保存</a>
<a href="javascript:;" class="btn btn-xs btn-success" title="保存" onclick="doEdit('listGuestbookKindForm', '/AdminCP/Guestbook/EditGuestbookCategory',@m.Id)"><i class="fa fa-save"></i> 保存</a>
<a href="javascript:;" class="btn btn-xs btn-default" title="取消" onclick="cancelEdit(@m.Id);"><i class="fa fa-mail-reply"></i> 取消</a>
</div>
</td>
@@ -83,7 +83,7 @@
<td class="text-center"><input type="number" name="Rank" id="Rank" class="form-control addnew" value="0" maxlength="3" placeholder="请输入类别排序,只能填写数字" /></td>
<td><input type="text" name="KindInfo" id="KindInfo" class="form-control addnew" placeholder="类别简介,非必填" maxlength="200" /></td>
<td>
<button type="button" class="btn btn-xs btn-success" title="保存" onclick="doAdd('listGuestbookKindForm', '/AdminCP/Guestbook/AddGuestbookKind');"><i class="fa fa-save"></i> 保存</button>
<button type="button" class="btn btn-xs btn-success" title="保存" onclick="doAdd('listGuestbookKindForm', '/AdminCP/Guestbook/AddGuestbookCategory');"><i class="fa fa-save"></i> 保存</button>
</td>
</tr>
</table>
+6 -6
View File
@@ -5,13 +5,13 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.App" Version="2.1.2" />
<PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="2.1.1" />
<PackageReference Include="MySql.Data" Version="8.0.11" />
<PackageReference Include="NewLife.XCode" Version="9.8.6763.36551" />
<PackageReference Include="Microsoft.AspNetCore.App" Version="2.1.3" />
<PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="2.1.3" />
<PackageReference Include="MySql.Data" Version="8.0.12" />
<PackageReference Include="NewLife.XCode" Version="9.9.6806.38809" />
<PackageReference Include="Newtonsoft.Json" Version="11.0.2" />
<PackageReference Include="Senparc.Weixin.MP" Version="15.0.11" />
<PackageReference Include="Senparc.Weixin.WxOpen" Version="2.0.11" />
<PackageReference Include="Senparc.Weixin.MP" Version="15.2.2" />
<PackageReference Include="Senparc.Weixin.WxOpen" Version="2.4.0" />
<PackageReference Include="System.Data.SqlClient" Version="4.5.1" />
<PackageReference Include="ZKWeb.System.Drawing" Version="4.0.1" />
</ItemGroup>
@@ -92,7 +92,7 @@ namespace COMCMS.Web.Controllers.api
TenPayV3Info TenPayV3Info = new TenPayV3Info(appId, appSecrect, wxmchId, wxmchKey, Utils.GetServerUrl() + "/wxpayment/notify");
TenPayV3Info TenPayV3Info = new TenPayV3Info(appId, appSecrect, wxmchId, wxmchKey, Utils.GetServerUrl() + "/wxpayment/notify", Utils.GetServerUrl() + "/wxpayment/notify");
TenPayV3Info.TenPayV3Notify = Utils.GetServerUrl() + "/wxpayment/notify";
XTrace.WriteLine("微信支付异步通知地址:" + TenPayV3Info.TenPayV3Notify);
//创建支付应答对象
@@ -41,7 +41,7 @@ namespace COMCMS.Web.Controllers
string wxmchId = cfg.MCHId;// ConfigurationManager.AppSettings["WeixinMCHId"];
string wxmchKey = cfg.MCHKey;// ConfigurationManager.AppSettings["WeixinMCHKey"];
TenPayV3Info TenPayV3Info = new TenPayV3Info(appId, appSecrect, wxmchId, wxmchKey, Utils.GetServerUrl() + "/wxpayment/notify");
TenPayV3Info TenPayV3Info = new TenPayV3Info(appId, appSecrect, wxmchId, wxmchKey, Utils.GetServerUrl() + "/wxpayment/notify", Utils.GetServerUrl() + "/wxpayment/notify");
string res = null;
+1 -1
View File
@@ -13,7 +13,7 @@
},
"connectionStrings": {
"dbconn": {
"connectionString": "Server=.;Port=3306;Database=comcms2;Uid=root;Pwd=123456;SslMode=None",
"connectionString": "Server=.;Port=3306;Database=comcms2;Uid=root;Pwd=root;SslMode=None",
"providerName": "MySql.Data.MySqlClient"
},
"mssqlconnon": {
Binary file not shown.
BIN
View File
Binary file not shown.
+1 -1
View File
@@ -5,7 +5,7 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore" Version="2.1.2" />
<PackageReference Include="Microsoft.AspNetCore" Version="2.1.3" />
</ItemGroup>
</Project>
+4 -3
View File
@@ -4,10 +4,10 @@ COMCMS NETCORE版本,一个简单的CMS后台管理系统,暂时不带前台
### 技术简要
- .net core 2.1.1
- .net core 2.1.3 (请注意升级本地SDK 或者runtime)
- 数据库:Mysql 5.7
- ORM:数据库操作使用XCode,目前支持mysql、sqlserver。详细见:https://github.com/NewLifeX/X
- 据库驱动使用:MySqlConnector
- 据库驱动使用:MySQL官方驱动,8.0.12
- 后台模板是H+
- 编辑器采用CKeditor 支持截图粘贴进去,上传图片采用webuploader
@@ -28,7 +28,8 @@ COMCMS NETCORE版本,一个简单的CMS后台管理系统,暂时不带前台
### 演示地址
```
演示地址:[http://123.207.59.192/AdminCP](http://123.207.59.192/AdminCP)
演示地址(windows + IIS):[http://123.207.59.192/AdminCP](http://123.207.59.192/AdminCP)
演示地址2(Centos + Nginx):[http://47.106.32.133/AdminCP]
账号密码都是admin
+4 -4
View File
@@ -30,8 +30,8 @@
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="NewLife.Core, Version=7.3.6763.36550, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\NewLife.Core.7.3.6763.36550\lib\net45\NewLife.Core.dll</HintPath>
<Reference Include="NewLife.Core, Version=7.3.6805.17853, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\NewLife.Core.7.3.6805.17853\lib\net45\NewLife.Core.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
@@ -41,8 +41,8 @@
<Reference Include="System.Data" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Xml" />
<Reference Include="XCode, Version=9.8.6763.36551, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\NewLife.XCode.9.8.6763.36551\lib\net45\XCode.dll</HintPath>
<Reference Include="XCode, Version=9.9.6806.38809, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\NewLife.XCode.9.9.6806.38809\lib\net45\XCode.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
+1 -1
View File
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<Tables Version="9.7.6722.39741" NameSpace="COMCMS.Core" ConnName="dbconn" Output="" BaseClass="Entity">
<Tables Version="9.8.6763.36552" NameSpace="COMCMS.Core" ConnName="dbconn" Output="" BaseClass="Entity">
<Table Name="Admin" Description="管理员" DbType="SqlServer">
<Columns>
<Column Name="Id" DataType="Int32" Identity="True" PrimaryKey="True" Description="编号" />
+2 -2
View File
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="NewLife.Core" version="7.3.6763.36550" targetFramework="net461" />
<package id="NewLife.XCode" version="9.8.6763.36551" targetFramework="net461" />
<package id="NewLife.Core" version="7.3.6805.17853" targetFramework="net461" />
<package id="NewLife.XCode" version="9.9.6806.38809" targetFramework="net461" />
</packages>
File diff suppressed because it is too large Load Diff