Skip to content

Commit

Permalink
update abp to 4.2.2
Browse files Browse the repository at this point in the history
  • Loading branch information
jerrytang67 committed Mar 24, 2021
1 parent bee2941 commit 022a78d
Show file tree
Hide file tree
Showing 44 changed files with 284 additions and 220 deletions.
2 changes: 1 addition & 1 deletion backEnd/host_gateways/TT.Demo.Host/TT.Demo.Host.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<TargetFramework>netcoreapp5.0</TargetFramework>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Ocelot" Version="16.0.1" />
<PackageReference Include="Ocelot" Version="17.0.0" />
<!-- <PackageReference Include="Microsoft.AspNetCore.SpaServices.Extensions" Version="4.0.0" />-->
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Volo.Abp.AspNetCore.Mvc" Version="4.0.0" />
<PackageReference Include="Volo.Abp.AutoMapper" Version="4.0.0" />
<PackageReference Include="Volo.Abp.Caching" Version="4.0.0" />
<PackageReference Include="Volo.Abp.EntityFrameworkCore" Version="4.0.0" />
<PackageReference Include="Volo.Abp.AspNetCore.Mvc" Version="4.2.2" />
<PackageReference Include="Volo.Abp.AutoMapper" Version="4.2.2" />
<PackageReference Include="Volo.Abp.Caching" Version="4.2.2" />
<PackageReference Include="Volo.Abp.EntityFrameworkCore" Version="4.2.2" />
</ItemGroup>

</Project>
10 changes: 5 additions & 5 deletions backEnd/modules/TT.Abp.AppManagement/TT.Abp.AppManagement.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Volo.Abp.AspNetCore.Mvc" Version="4.0.0" />
<PackageReference Include="Volo.Abp.AutoMapper" Version="4.0.0" />
<PackageReference Include="Volo.Abp.Caching" Version="4.0.0" />
<PackageReference Include="Volo.Abp.EntityFrameworkCore" Version="4.0.0" />
<PackageReference Include="Volo.Abp.Localization" Version="4.0.0" />
<PackageReference Include="Volo.Abp.AspNetCore.Mvc" Version="4.2.2" />
<PackageReference Include="Volo.Abp.AutoMapper" Version="4.2.2" />
<PackageReference Include="Volo.Abp.Caching" Version="4.2.2" />
<PackageReference Include="Volo.Abp.EntityFrameworkCore" Version="4.2.2" />
<PackageReference Include="Volo.Abp.Localization" Version="4.2.2" />
</ItemGroup>

</Project>
8 changes: 4 additions & 4 deletions backEnd/modules/TT.Abp.Audit/TT.Abp.AuditManagement.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="5.0.0" />
<PackageReference Include="Volo.Abp.AspNetCore.Mvc" Version="4.0.0" />
<PackageReference Include="Volo.Abp.AutoMapper" Version="4.0.0" />
<PackageReference Include="Volo.Abp.EntityFrameworkCore" Version="4.0.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="5.0.4" />
<PackageReference Include="Volo.Abp.AspNetCore.Mvc" Version="4.2.2" />
<PackageReference Include="Volo.Abp.AutoMapper" Version="4.2.2" />
<PackageReference Include="Volo.Abp.EntityFrameworkCore" Version="4.2.2" />
</ItemGroup>

<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion backEnd/modules/TT.Abp.Cms/TT.Abp.Cms.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Volo.Abp.Http.Client" Version="4.0.0" />
<PackageReference Include="Volo.Abp.Http.Client" Version="4.2.2" />
</ItemGroup>

</Project>
1 change: 1 addition & 0 deletions backEnd/modules/TT.Abp.Cms/TT/Abp/Cms/AuditDefinitions.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
using TT.Abp.AuditManagement.Audits;
using TT.Abp.Cms.Localization;
using Volo.Abp;
using Volo.Abp.Localization;

namespace TT.Abp.Cms
Expand Down
20 changes: 10 additions & 10 deletions backEnd/modules/TT.Abp.Core/TT.Abp.Core.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,16 @@
<PackageReference Include="AutoMapper" Version="10.1.1" />
<PackageReference Include="MediatR" Version="9.0.0" />
<PackageReference Include="MediatR.Extensions.Microsoft.DependencyInjection" Version="9.0.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="5.0.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Relational" Version="5.0.0" />
<PackageReference Include="Volo.Abp.AspNetCore.Mvc" Version="4.0.0" />
<PackageReference Include="Volo.Abp.AuditLogging.Domain" Version="4.0.0" />
<PackageReference Include="Volo.Abp.AuditLogging.EntityFrameworkCore" Version="4.0.0" />
<PackageReference Include="Volo.Abp.AutoMapper" Version="4.0.0" />
<PackageReference Include="Volo.Abp.Core" Version="4.0.0" />
<PackageReference Include="Volo.Abp.Ddd.Application" Version="4.0.0" />
<PackageReference Include="Volo.Abp.Guids" Version="4.0.0" />
<PackageReference Include="Volo.Abp.Users.Domain" Version="4.0.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="5.0.4" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Relational" Version="5.0.4" />
<PackageReference Include="Volo.Abp.AspNetCore.Mvc" Version="4.2.2" />
<PackageReference Include="Volo.Abp.AuditLogging.Domain" Version="4.2.2" />
<PackageReference Include="Volo.Abp.AuditLogging.EntityFrameworkCore" Version="4.2.2" />
<PackageReference Include="Volo.Abp.AutoMapper" Version="4.2.2" />
<PackageReference Include="Volo.Abp.Core" Version="4.2.2" />
<PackageReference Include="Volo.Abp.Ddd.Application" Version="4.2.2" />
<PackageReference Include="Volo.Abp.Guids" Version="4.2.2" />
<PackageReference Include="Volo.Abp.Users.Domain" Version="4.2.2" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\TT.Extensions\TT.Extensions.csproj" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Volo.Abp.AspNetCore.Mvc" Version="4.0.0" />
<PackageReference Include="Volo.Abp.AutoMapper" Version="4.0.0" />
<PackageReference Include="Volo.Abp.Http.Client" Version="4.0.0" />
<PackageReference Include="Volo.Abp.AspNetCore.Mvc" Version="4.2.2" />
<PackageReference Include="Volo.Abp.AutoMapper" Version="4.2.2" />
<PackageReference Include="Volo.Abp.Http.Client" Version="4.2.2" />
</ItemGroup>

<ItemGroup>
Expand Down
10 changes: 5 additions & 5 deletions backEnd/modules/TT.Abp.Mall/TT.Abp.Mall.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Volo.Abp.AspNetCore.Mvc" Version="4.0.0" />
<PackageReference Include="Volo.Abp.AutoMapper" Version="4.0.0" />
<PackageReference Include="Volo.Abp.EntityFrameworkCore" Version="4.0.0" />
<PackageReference Include="Volo.Abp.Http.Client" Version="4.0.0" />
<PackageReference Include="Volo.Abp.Users.EntityFrameworkCore" Version="4.0.0" />
<PackageReference Include="Volo.Abp.AspNetCore.Mvc" Version="4.2.2" />
<PackageReference Include="Volo.Abp.AutoMapper" Version="4.2.2" />
<PackageReference Include="Volo.Abp.EntityFrameworkCore" Version="4.2.2" />
<PackageReference Include="Volo.Abp.Http.Client" Version="4.2.2" />
<PackageReference Include="Volo.Abp.Users.EntityFrameworkCore" Version="4.2.2" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Volo.Abp.AutoMapper" Version="4.0.0" />
<PackageReference Include="Volo.Abp.Core" Version="4.0.0" />
<PackageReference Include="Volo.Abp.AutoMapper" Version="4.2.2" />
<PackageReference Include="Volo.Abp.Core" Version="4.2.2" />
</ItemGroup>

<ItemGroup>
Expand Down
14 changes: 7 additions & 7 deletions backEnd/modules/TT.Abp.Shops/TT.Abp.Shops.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@
<StartupObject />
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="5.0.0" />
<PackageReference Include="Volo.Abp.AspNetCore.Mvc" Version="4.0.0" />
<PackageReference Include="Volo.Abp.AutoMapper" Version="4.0.0" />
<PackageReference Include="Volo.Abp.Ddd.Application" Version="4.0.0" />
<PackageReference Include="Volo.Abp.Ddd.Application.Contracts" Version="4.0.0" />
<PackageReference Include="Volo.Abp.Ddd.Domain" Version="4.0.0" />
<PackageReference Include="Volo.Abp.EntityFrameworkCore" Version="4.0.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="5.0.4" />
<PackageReference Include="Volo.Abp.AspNetCore.Mvc" Version="4.2.2" />
<PackageReference Include="Volo.Abp.AutoMapper" Version="4.2.2" />
<PackageReference Include="Volo.Abp.Ddd.Application" Version="4.2.2" />
<PackageReference Include="Volo.Abp.Ddd.Application.Contracts" Version="4.2.2" />
<PackageReference Include="Volo.Abp.Ddd.Domain" Version="4.2.2" />
<PackageReference Include="Volo.Abp.EntityFrameworkCore" Version="4.2.2" />
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="5.0.0" />
<PackageReference Include="Volo.Abp.AspNetCore.Mvc" Version="4.0.0" />
<PackageReference Include="Volo.Abp.AuditLogging.EntityFrameworkCore" Version="4.0.0" />
<PackageReference Include="Volo.Abp.AutoMapper" Version="4.0.0" />
<PackageReference Include="Volo.Abp.Core" Version="4.0.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="5.0.4" />
<PackageReference Include="Volo.Abp.AspNetCore.Mvc" Version="4.2.2" />
<PackageReference Include="Volo.Abp.AuditLogging.EntityFrameworkCore" Version="4.2.2" />
<PackageReference Include="Volo.Abp.AutoMapper" Version="4.2.2" />
<PackageReference Include="Volo.Abp.Core" Version="4.2.2" />
</ItemGroup>

<ItemGroup>
Expand Down
22 changes: 11 additions & 11 deletions backEnd/modules/TT.Abp.Weixin/TT.Abp.Weixin.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,18 @@
<RootNamespace />
</PropertyGroup>
<ItemGroup>
<PackageReference Include="DotNetCore.CAP" Version="3.1.2" />
<PackageReference Include="DotNetCore.CAP.RabbitMQ" Version="3.1.2" />
<PackageReference Include="DotNetCore.CAP.SqlServer" Version="3.1.2" />
<PackageReference Include="DotNetCore.CAP" Version="5.0.0" />
<PackageReference Include="DotNetCore.CAP.RabbitMQ" Version="5.0.0" />
<PackageReference Include="DotNetCore.CAP.SqlServer" Version="5.0.0" />
<PackageReference Include="IdentityServer4" Version="4.1.1" />
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="5.0.0" />
<PackageReference Include="Serilog.AspNetCore" Version="3.4.0" />
<PackageReference Include="Volo.Abp.AspNetCore.Mvc" Version="4.0.0" />
<PackageReference Include="Volo.Abp.AuditLogging.EntityFrameworkCore" Version="4.0.0" />
<PackageReference Include="Volo.Abp.AutoMapper" Version="4.0.0" />
<PackageReference Include="Volo.Abp.Caching" Version="4.0.0" />
<PackageReference Include="Volo.Abp.Core" Version="4.0.0" />
<PackageReference Include="Volo.Abp.Identity.Domain" Version="4.0.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="5.0.4" />
<PackageReference Include="Serilog.AspNetCore" Version="4.0.0" />
<PackageReference Include="Volo.Abp.AspNetCore.Mvc" Version="4.2.2" />
<PackageReference Include="Volo.Abp.AuditLogging.EntityFrameworkCore" Version="4.2.2" />
<PackageReference Include="Volo.Abp.AutoMapper" Version="4.2.2" />
<PackageReference Include="Volo.Abp.Caching" Version="4.2.2" />
<PackageReference Include="Volo.Abp.Core" Version="4.2.2" />
<PackageReference Include="Volo.Abp.Identity.Domain" Version="4.2.2" />
<PackageReference Include="StackExchange.Redis" Version="2.2.4" />
</ItemGroup>
<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion backEnd/modules/TT.Extensions/TT.Extensions.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Options" Version="5.0.0" />
<PackageReference Include="Newtonsoft.Json" Version="12.0.3" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
<PackageReference Include="StackExchange.Redis" Version="2.2.4" />
</ItemGroup>
</Project>
Expand Down
2 changes: 2 additions & 0 deletions backEnd/modules/TT.HttpClient.Weixin/IWeixinApi.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,7 @@ public interface IWeixinApi
Task<OAuth2Result> GetToken(string appid, string appsec, string code);

Task<WeixinUserInfoResult> SnsUserInfo(string access_token, string openid);

Task<BaseWeChatReulst> CustomSend(string accessToken, string openid, string msgtype, object body);
}
}
26 changes: 17 additions & 9 deletions backEnd/modules/TT.HttpClient.Weixin/PayApi.cs
Original file line number Diff line number Diff line change
Expand Up @@ -66,15 +66,16 @@ Task<bool> RefundAsync(string appId, string mchId, string mchKey, string subAppI
string notifyUrl = "");

Task<bool> Transfers(string mch_appid, string mchid, string mchKey, string partner_trade_no,
string openid, string re_user_name, int amount, string desc);
string openid, string re_user_name, int amount, string desc, bool check_name = true);
}

public class PayApi : IPayApi
{
private readonly System.Net.Http.HttpClient _client;
private readonly ISignatureGenerator _signatureGenerator;

public PayApi(System.Net.Http.HttpClient client,
public PayApi
(System.Net.Http.HttpClient client,
ISignatureGenerator signatureGenerator
)
{
Expand Down Expand Up @@ -376,7 +377,8 @@ protected virtual async Task<XDocument> RequestAndGetReturnValueAsync(string tar
{
var result = await RequestAsync(targetUrl, requestParameters.ToXmlStr());

if (result.Element("xml").Element("return_code").Value != "SUCCESS"){
if (result.Element("xml").Element("return_code").Value != "SUCCESS")
{
var errMsg =
"微信支付接口调用失败,具体失败原因:" +
result.Element("xml").Element("return_msg").Value
Expand All @@ -392,8 +394,8 @@ protected virtual async Task<XDocument> RequestAndGetReturnValueAsync(string tar
Log.Information(result.ToString(), "TenPay_XmlResult");
return result;
}


protected virtual async Task<XDocument> RequestAndGetReturnValueAsync2(string targetUrl,
PayParameters requestParameters)
{
Expand Down Expand Up @@ -433,15 +435,17 @@ protected virtual async Task<XDocument> RequestAndGetReturnValueAsync2(string ta
/// <param name="desc"></param>
/// <returns></returns>
public async Task<bool> Transfers(string mch_appid, string mchid, string mchKey, string partner_trade_no,
string openid, string re_user_name, int amount, string desc)
string openid, string re_user_name, int amount, string desc, bool check_name = true)
{
var request = new PayParameters();
request.AddParameter("mch_appid", mch_appid);
request.AddParameter("mchid", mchid);
request.AddParameter("nonce_str", RandomExt.GetRandom());
request.AddParameter("partner_trade_no", partner_trade_no);
request.AddParameter("openid", openid);
request.AddParameter("check_name", "FORCE_CHECK");

request.AddParameter("check_name", check_name ? "FORCE_CHECK" : "NO_CHECK");

request.AddParameter("re_user_name", re_user_name);
request.AddParameter("amount", amount);
request.AddParameter("desc", desc);
Expand All @@ -453,9 +457,13 @@ public async Task<bool> Transfers(string mch_appid, string mchid, string mchKey,
var returnCode = GetXmlNodeString(xmlResult, "return_code");
var resultode = GetXmlNodeString(xmlResult, "result_code");

if (returnCode == "SUCCESS" && resultode == "SUCCESS") return await Task.FromResult(true);
if (returnCode == "SUCCESS" && resultode == "SUCCESS")
return true;

throw new Exception(GetXmlNodeString(xmlResult, "err_code"));
var s = GetXmlNodeString(xmlResult, "err_code");
throw new Exception(xmlResult.ToString()
// GetXmlNodeString(xmlResult, "err_code")
);
}

#endregion
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<ItemGroup>
<PackageReference Include="AutoMapper" Version="10.1.1" />
<PackageReference Include="Microsoft.Extensions.Options" Version="5.0.0" />
<PackageReference Include="Newtonsoft.Json" Version="12.0.3" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
<PackageReference Include="Serilog" Version="2.10.0" />
</ItemGroup>

Expand Down
16 changes: 16 additions & 0 deletions backEnd/modules/TT.HttpClient.Weixin/WeixinApi.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
using System.Text;
using System.Threading.Tasks;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using Serilog;
using TT.Extensions;
using TT.HttpClient.Weixin.WeixiinResult;
Expand Down Expand Up @@ -159,8 +160,23 @@ public async Task<WeixinUserInfoResult> SnsUserInfo(string access_token, string
var jsonReuslt = strResponse.TryConvert<WeixinUserInfoResult>();
return await Task.FromResult(jsonReuslt);
}

public async Task<BaseWeChatReulst> CustomSend(string accessToken, string openid, string msgtype, object body)
{
var postData = new JObject {{"touser", openid}, {"msgtype", msgtype}, {msgtype, JObject.FromObject(body)}};

HttpContent hc = new StreamContent(new MemoryStream(Encoding.UTF8.GetBytes(postData.ToString())));

var strResponse =
await _client.PostAsync($"cgi-bin/message/custom/send?access_token={accessToken}", hc);

var result = await strResponse.Content.ReadAsStringAsync();

return result.TryConvert<BaseWeChatReulst>();
}
}


public class OAuth2Result
{
public string access_token { get; set; }
Expand Down
4 changes: 2 additions & 2 deletions backEnd/modules/TT.RabbitMq/TT.RabbitMq.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="5.0.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="5.0.4" />
<PackageReference Include="Microsoft.Extensions.Hosting.Abstractions" Version="5.0.0" />
<PackageReference Include="Newtonsoft.Json" Version="12.0.3" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
<PackageReference Include="RabbitMQ.Client" Version="6.2.1" />
</ItemGroup>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Volo.Abp.Account.Application.Contracts" Version="4.0.0" />
<PackageReference Include="Volo.Abp.Identity.Application.Contracts" Version="4.0.0" />
<PackageReference Include="Volo.Abp.PermissionManagement.Application.Contracts" Version="4.0.0" />
<PackageReference Include="Volo.Abp.TenantManagement.Application.Contracts" Version="4.0.0" />
<PackageReference Include="Volo.Abp.FeatureManagement.Application.Contracts" Version="4.0.0" />
<PackageReference Include="Volo.Abp.Account.Application.Contracts" Version="4.2.2" />
<PackageReference Include="Volo.Abp.Identity.Application.Contracts" Version="4.2.2" />
<PackageReference Include="Volo.Abp.PermissionManagement.Application.Contracts" Version="4.2.2" />
<PackageReference Include="Volo.Abp.TenantManagement.Application.Contracts" Version="4.2.2" />
<PackageReference Include="Volo.Abp.FeatureManagement.Application.Contracts" Version="4.2.2" />
</ItemGroup>

</Project>
12 changes: 6 additions & 6 deletions backEnd/src/TT.SoMall.Application/TT.SoMall.Application.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Volo.Abp.Account.Application" Version="4.0.0" />
<PackageReference Include="Volo.Abp.AspNetCore.Mvc" Version="4.0.0" />
<PackageReference Include="Volo.Abp.Identity.Application" Version="4.0.0" />
<PackageReference Include="Volo.Abp.PermissionManagement.Application" Version="4.0.0" />
<PackageReference Include="Volo.Abp.TenantManagement.Application" Version="4.0.0" />
<PackageReference Include="Volo.Abp.FeatureManagement.Application" Version="4.0.0" />
<PackageReference Include="Volo.Abp.Account.Application" Version="4.2.2" />
<PackageReference Include="Volo.Abp.AspNetCore.Mvc" Version="4.2.2" />
<PackageReference Include="Volo.Abp.Identity.Application" Version="4.2.2" />
<PackageReference Include="Volo.Abp.PermissionManagement.Application" Version="4.2.2" />
<PackageReference Include="Volo.Abp.TenantManagement.Application" Version="4.2.2" />
<PackageReference Include="Volo.Abp.FeatureManagement.Application" Version="4.2.2" />
</ItemGroup>

</Project>
Loading

0 comments on commit 022a78d

Please sign in to comment.