From af44faaac622c97f92486a7230c02a8871b90bd8 Mon Sep 17 00:00:00 2001 From: JeffreySu Date: Mon, 21 Oct 2024 00:13:39 +0800 Subject: [PATCH] =?UTF-8?q?WxOpen=20v3.21.2=20=E4=BF=AE=E6=AD=A3=20first?= =?UTF-8?q?=5Fsave=5Fflag=20=E7=B1=BB=E5=9E=8B=E9=94=99=E8=AF=AF=EF=BC=8C?= =?UTF-8?q?=E5=BA=94=E4=B8=BA=20int;=20=E5=90=8C=E6=97=B6=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0=20FirstSaveFlag=20=E5=B1=9E=E6=80=A7,=20=E7=94=A8?= =?UTF-8?q?=E4=BA=8E=20bool=20=E7=B1=BB=E5=9E=8B=E5=88=A4=E6=96=AD?= =?UTF-8?q?=E6=98=AF=E5=90=A6=E9=A6=96=E6=AC=A1=E5=85=85=E5=80=BC=20#2986?= =?UTF-8?q?=20=E6=84=9F=E8=B0=A2=20@WanderingGrass?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../XPayJson/QueryUserBalanceJsonResult.cs | 58 +++++++++++++++---- .../Senparc.Weixin.WxOpen.net8.csproj | 5 +- 2 files changed, 49 insertions(+), 14 deletions(-) diff --git a/src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen/Senparc.Weixin.WxOpen/AdvancedAPIs/XPay/XPayJson/QueryUserBalanceJsonResult.cs b/src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen/Senparc.Weixin.WxOpen/AdvancedAPIs/XPay/XPayJson/QueryUserBalanceJsonResult.cs index 0bea9003ac..e02698705e 100644 --- a/src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen/Senparc.Weixin.WxOpen/AdvancedAPIs/XPay/XPayJson/QueryUserBalanceJsonResult.cs +++ b/src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen/Senparc.Weixin.WxOpen/AdvancedAPIs/XPay/XPayJson/QueryUserBalanceJsonResult.cs @@ -1,9 +1,38 @@ -using Senparc.Weixin.Entities; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; +#region Apache License Version 2.0 +/*---------------------------------------------------------------- + +Copyright 2024 Jeffrey Su & Suzhou Senparc Network Technology Co.,Ltd. + +Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file +except in compliance with the License. You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software distributed under the +License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, +either express or implied. See the License for the specific language governing permissions +and limitations under the License. + +Detail: https://github.com/JeffreySu/WeiXinMPSDK/blob/master/license.md + +----------------------------------------------------------------*/ +#endregion Apache License Version 2.0 + +/*---------------------------------------------------------------- + Copyright (C) 2024 Senparc + + 文件名:QueryUserBalanceJsonResult.cs + 文件功能描述:查询用户代币余额 返回结果 + + 创建标识:Senparc - 20231201 + + 修改标识:Senparc - 20241020 + 修改描述:v3.21.2 修正 first_save_flag 类型错误,应为 int; 同时增加 FirstSaveFlag 属性, 用于 bool 类型判断是否首次充值 + +----------------------------------------------------------------*/ + + +using Senparc.Weixin.Entities; namespace Senparc.Weixin.WxOpen.AdvancedAPIs.XPay { @@ -18,33 +47,38 @@ public class QueryUserBalanceJsonResult : WxJsonResult public int balance { get; set; } /// - /// 代币总余额,包括有价和赠送部分 + /// 赠送账户的代币余额 /// public int present_balance { get; set; } /// - /// 代币总余额,包括有价和赠送部分 + /// 累计有价货币充值数量 /// public int sum_save { get; set; } /// - /// 代币总余额,包括有价和赠送部分 + /// 累计赠送无价货币数量 /// public int sum_present { get; set; } /// - /// 代币总余额,包括有价和赠送部分 + /// 历史总增加的代币金额 /// public int sum_balance { get; set; } /// - /// 代币总余额,包括有价和赠送部分 + /// 历史总消耗代币金额 /// public int sum_cost { get; set; } /// /// 代币总余额,包括有价和赠送部分 /// - public bool first_save_flag { get; set; } + public int first_save_flag { get; set; } + + /// + /// 代币总余额,包括有价和赠送部分 + /// + public bool FirstSaveFlag => first_save_flag == 1; } } diff --git a/src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen/Senparc.Weixin.WxOpen/Senparc.Weixin.WxOpen.net8.csproj b/src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen/Senparc.Weixin.WxOpen/Senparc.Weixin.WxOpen.net8.csproj index 6b7c059555..4cb8b7f33d 100644 --- a/src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen/Senparc.Weixin.WxOpen/Senparc.Weixin.WxOpen.net8.csproj +++ b/src/Senparc.Weixin.WxOpen/src/Senparc.Weixin.WxOpen/Senparc.Weixin.WxOpen/Senparc.Weixin.WxOpen.net8.csproj @@ -1,7 +1,7 @@ net462;netstandard2.0;netstandard2.1 - 3.21.1 + 3.21.2 9.0 Senparc.Weixin.WxOpen Senparc.Weixin.WxOpen @@ -184,7 +184,8 @@ [2024-08-06] v3.19.2 更新基础库,包括 Senparc.CO2NET 相关库、Senparc.AI [2024-09-02] v3.20.2 WxOpen 支持小程序付费能力的用量告警事件 [2024-10-08] v3.21.0 WxOpen 添加“查询购买资源包的用量情况”接口 #3078 - + [2024-10-20] v3.21.2 修正 first_save_flag 类型错误,应为 int; 同时增加 FirstSaveFlag 属性, 用于 bool 类型判断是否首次充值 #2986 感谢 @WanderingGrass + https://github.com/JeffreySu/WeiXinMPSDK