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