44 lines
1.1 KiB
C#
Raw Normal View History

2025-04-24 18:31:27 +08:00
using MyCode.Project.Infrastructure.Exceptions;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace MyCode.Project.Domain.Message.Response.EnterpriseWechat
{
public class BaseEnterpriseResp
{
/// <summary>
/// 错误码为0才正确其它都错误
/// </summary>
public int Errcode { get; set; }
/// <summary>
/// 错误信息
/// </summary>
public string ErrMsg { get; set; }
/// <summary>
/// 结果验证 84061=没有添加任何外部联系人
/// </summary>
public void CheckResult()
{
if (Errcode != 0 && Errcode != 84061) { throw new BaseException($"{Errcode},{ErrMsg}"); }
}
}
public class BaseEnterpriseNoCheckResp
{
/// <summary>
/// 错误码为0才正确其它都错误
/// </summary>
public int Errcode { get; set; }
/// <summary>
/// 错误信息
/// </summary>
public string ErrMsg { get; set; }
}
}