Sfoglia il codice sorgente

😎1、优化短信验证码流程 2、优化信息发送 3、修复sqlsugar扩展错误 4、优化获取程序集集合 5、更新接口请求文件

zuohuaijun 1 anno fa
parent
commit
53af3913ca

+ 2 - 1
Admin.NET/Admin.NET.Core/Admin.NET.Core.csproj

@@ -21,6 +21,7 @@
     <PackageReference Include="Furion.Extras.Authentication.JwtBearer" Version="4.9.5.5" />
     <PackageReference Include="Furion.Extras.ObjectMapper.Mapster" Version="4.9.5.5" />
     <PackageReference Include="Furion.Pure" Version="4.9.5.5" />
+    <PackageReference Include="Hashids.net" Version="1.7.0" />
     <PackageReference Include="IPTools.China" Version="1.6.0" />
     <PackageReference Include="IPTools.International" Version="1.6.0" />
     <PackageReference Include="Magicodes.IE.Excel" Version="2.7.5.1" />
@@ -38,7 +39,7 @@
     <PackageReference Include="SqlSugarCore" Version="5.1.4.167" />
     <PackageReference Include="SSH.NET" Version="2024.1.0" />
     <PackageReference Include="System.Linq.Dynamic.Core" Version="1.4.5" />
-    <PackageReference Include="TencentCloudSDK.Sms" Version="3.0.1077" />
+    <PackageReference Include="TencentCloudSDK.Sms" Version="3.0.1078" />
     <PackageReference Include="UAParser" Version="3.1.47" />
     <PackageReference Include="Yitter.IdGenerator" Version="1.0.14" />
   </ItemGroup>

+ 1 - 1
Admin.NET/Admin.NET.Core/Extension/SqlSugarExtension.cs

@@ -197,7 +197,7 @@ public static class SqlSugarExtension
 
             return Expression.Constant(valueparsed, propertyType);
         }
-        if (propertyType == typeof(long))
+        if (propertyType == typeof(long) || propertyType == typeof(long?))
         {
             string? stringLong = GetStringFromJsonElement(value);
 

+ 3 - 6
Admin.NET/Admin.NET.Core/Service/Auth/SysAuthService.cs

@@ -192,14 +192,11 @@ public class SysAuthService : IDynamicApiController, ITransient
     [DisplayName("手机号登录")]
     public virtual async Task<LoginOutput> LoginPhone([Required] LoginPhoneInput input)
     {
-        var verifyCode = _sysCacheService.Get<string>($"{CacheConst.KeyPhoneVerCode}{input.Phone}");
-        if (string.IsNullOrWhiteSpace(verifyCode))
-            throw Oops.Oh("验证码不存在或已失效,请重新获取!");
-        if (verifyCode != input.Code)
-            throw Oops.Oh("验证码错误!");
+        // 校验短信验证码
+        App.GetRequiredService<SysSmsService>().VerifyCode(new SmsVerifyCodeInput { Phone = input.Phone, Code = input.Code });
 
         // 账号是否存在
-        var user = await _sysUserRep.AsQueryable().Includes(t => t.SysOrg).ClearFilter().FirstAsync(u => u.Phone.Equals(input.Phone));
+        var user = await _sysUserRep.AsQueryable().Includes(u => u.SysOrg).ClearFilter().FirstAsync(u => u.Phone.Equals(input.Phone));
         _ = user ?? throw Oops.Oh(ErrorCodeEnum.D0009);
 
         return await CreateToken(user);

+ 22 - 2
Admin.NET/Admin.NET.Core/Service/Message/Dto/MessageInput.cs

@@ -9,9 +9,14 @@ namespace Admin.NET.Core;
 public class MessageInput
 {
     /// <summary>
-    /// 用户ID
+    /// 接收者用户Id
     /// </summary>
-    public long UserId { get; set; }
+    public long ReceiveUserId { get; set; }
+
+    /// <summary>
+    /// 接收者名称
+    /// </summary>
+    public string ReceiveUserName { get; set; }
 
     /// <summary>
     /// 用户ID列表
@@ -32,4 +37,19 @@ public class MessageInput
     /// 消息内容
     /// </summary>
     public string Message { get; set; }
+
+    /// <summary>
+    /// 发送者Id
+    /// </summary>
+    public string SendUserId { get; set; }
+
+    /// <summary>
+    /// 发送者名称
+    /// </summary>
+    public string SendUserName { get; set; }
+
+    /// <summary>
+    /// 发送时间
+    /// </summary>
+    public DateTime SendTime { get; set; }
 }

+ 25 - 0
Admin.NET/Admin.NET.Core/Service/Message/Dto/SmsInput.cs

@@ -0,0 +1,25 @@
+// Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。
+//
+// 本项目主要遵循 MIT 许可证和 Apache 许可证(版本 2.0)进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。
+//
+// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!
+
+namespace Admin.NET.Core;
+
+public class SmsVerifyCodeInput
+{
+    /// <summary>
+    /// 手机号码
+    /// </summary>
+    /// <example>admin</example>
+    [Required(ErrorMessage = "手机号码不能为空")]
+    [DataValidation(ValidationTypes.PhoneNumber, ErrorMessage = "手机号码不正确")]
+    public string Phone { get; set; }
+
+    /// <summary>
+    /// 验证码
+    /// </summary>
+    /// <example>123456</example>
+    [Required(ErrorMessage = "验证码不能为空"), MinLength(4, ErrorMessage = "验证码不能少于4个字符")]
+    public string Code { get; set; }
+}

+ 9 - 57
Admin.NET/Admin.NET.Core/Service/Message/SysMessageService.cs

@@ -46,24 +46,9 @@ public class SysMessageService : IDynamicApiController, ITransient
     [DisplayName("发送消息给除了发送人的其他人")]
     public async Task SendOtherUser(MessageInput input)
     {
-        var cacheKey = CacheConst.KeyUserOnline + input.UserId;
-        // 是否开启单用户登录
-        if (await _sysConfigService.GetConfigValue<bool>(ConfigConst.SysSingleLogin))
-        {
-            var user = _sysCacheService.Get<SysOnlineUser>(cacheKey);
-            if (user == null) return;
-            await _chatHubContext.Clients.AllExcept(user.ConnectionId).ReceiveMessage(input);
-        }
-        else
-        {
-            var _cacheKeys = _sysCacheService.GetKeyList().Where(u => u.StartsWith(cacheKey)).ToArray();
-            foreach (var _cacheKey in _cacheKeys)
-            {
-                var user = _sysCacheService.Get<SysOnlineUser>(_cacheKey);
-                if (user == null) return;
-                await _chatHubContext.Clients.AllExcept(user.ConnectionId).ReceiveMessage(input);
-            }
-        }
+        var hashKey = _sysCacheService.HashGetAll<SysOnlineUser>(CacheConst.KeyUserOnline);
+        var exceptRecevieUsers = hashKey.Where(u => u.Value.UserId == input.ReceiveUserId).Select(u => u.Value).ToList();
+        await _chatHubContext.Clients.AllExcept(exceptRecevieUsers.Select(t => t.ConnectionId)).ReceiveMessage(input);
     }
 
     /// <summary>
@@ -74,24 +59,9 @@ public class SysMessageService : IDynamicApiController, ITransient
     [DisplayName("发送消息给某个人")]
     public async Task SendUser(MessageInput input)
     {
-        var cacheKey = CacheConst.KeyUserOnline + input.UserId;
-        // 是否开启单用户登录
-        if (await _sysConfigService.GetConfigValue<bool>(ConfigConst.SysSingleLogin))
-        {
-            var user = _sysCacheService.Get<SysOnlineUser>(cacheKey);
-            if (user == null) return;
-            await _chatHubContext.Clients.Client(user.ConnectionId).ReceiveMessage(input);
-        }
-        else
-        {
-            var _cacheKeys = _sysCacheService.GetKeyList().Where(u => u.StartsWith(cacheKey)).ToArray();
-            foreach (var _cacheKey in _cacheKeys)
-            {
-                var user = _sysCacheService.Get<SysOnlineUser>(_cacheKey);
-                if (user == null) return;
-                await _chatHubContext.Clients.Client(user.ConnectionId).ReceiveMessage(input);
-            }
-        }
+        var hashKey = _sysCacheService.HashGetAll<SysOnlineUser>(CacheConst.KeyUserOnline);
+        var recevieUsers = hashKey.Where(u => u.Value.UserId == input.ReceiveUserId).Select(u => u.Value).ToList();
+        await recevieUsers.ForEachAsync(u => _chatHubContext.Clients.Client(u.ConnectionId).ReceiveMessage(input));
     }
 
     /// <summary>
@@ -102,26 +72,8 @@ public class SysMessageService : IDynamicApiController, ITransient
     [DisplayName("发送消息给某些人")]
     public async Task SendUsers(MessageInput input)
     {
-        var userList = new List<string>();
-        foreach (var userId in input.UserIds)
-        {
-            var cacheKey = CacheConst.KeyUserOnline + userId;
-            // 是否开启单用户登录
-            if (await _sysConfigService.GetConfigValue<bool>(ConfigConst.SysSingleLogin))
-            {
-                var user = _sysCacheService.Get<SysOnlineUser>(cacheKey);
-                if (user != null) userList.Add(user.ConnectionId);
-            }
-            else
-            {
-                var _cacheKeys = _sysCacheService.GetKeyList().Where(u => u.StartsWith(cacheKey)).ToArray();
-                foreach (var _cacheKey in _cacheKeys)
-                {
-                    var user = _sysCacheService.Get<SysOnlineUser>(_cacheKey);
-                    if (user != null) userList.Add(user.ConnectionId);
-                }
-            }
-        }
-        await _chatHubContext.Clients.Clients(userList).ReceiveMessage(input);
+        var hashKey = _sysCacheService.HashGetAll<SysOnlineUser>(CacheConst.KeyUserOnline);
+        var recevieUsers = hashKey.Where(u => input.UserIds.Any(a => a == u.Value.UserId)).Select(u => u.Value).ToList();
+        await recevieUsers.ForEachAsync(u => _chatHubContext.Clients.Client(u.ConnectionId).ReceiveMessage(input));
     }
 }

+ 18 - 1
Admin.NET/Admin.NET.Core/Service/Message/SysSmsService.cs

@@ -43,6 +43,24 @@ public class SysSmsService : IDynamicApiController, ITransient
             await TencentSendSms(phoneNumber);
     }
 
+    /// <summary>
+    /// 校验短信验证码
+    /// </summary>
+    /// <param name="input"></param>
+    /// <returns></returns>
+    [AllowAnonymous]
+    [DisplayName("校验短信验证码")]
+    public bool VerifyCode(SmsVerifyCodeInput input)
+    {
+        var verifyCode = _sysCacheService.Get<string>($"{CacheConst.KeyPhoneVerCode}{input.Phone}");
+        if (string.IsNullOrWhiteSpace(verifyCode))
+            throw Oops.Oh("验证码不存在或已失效,请重新获取!");
+        if (verifyCode != input.Code)
+            throw Oops.Oh("验证码错误!");
+
+        return true;
+    }
+
     /// <summary>
     /// 阿里云发送短信 📨
     /// </summary>
@@ -197,7 +215,6 @@ public class SysSmsService : IDynamicApiController, ITransient
             SecretId = _smsOptions.Tencentyun.AccessKeyId,
             SecretKey = _smsOptions.Tencentyun.AccessKeySecret
         };
-
         return cred;
     }
 }

+ 21 - 30
Admin.NET/Admin.NET.Core/Service/Server/SysServerService.cs

@@ -4,21 +4,6 @@
 //
 // 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!
 
-using AlibabaCloud.SDK.Dysmsapi20170525.Models;
-using AngleSharp.Html.Parser;
-using AspNet.Security.OAuth.Gitee;
-using AspNet.Security.OAuth.Weixin;
-using AspNetCoreRateLimit;
-using Elastic.Clients.Elasticsearch;
-using IPTools.Core;
-using Lazy.Captcha.Core;
-using Magicodes.ExporterAndImporter.Pdf;
-using Magicodes.ExporterAndImporter.Word;
-using MailKit.Net.Smtp;
-using Novell.Directory.Ldap;
-using OnceMi.AspNetCore.OSS;
-using QRCoder;
-
 namespace Admin.NET.Core.Service;
 
 /// <summary>
@@ -102,25 +87,28 @@ public class SysServerService : IDynamicApiController, ITransient
         var redisAssembly = typeof(Redis).Assembly.GetName();
         var jsonAssembly = typeof(NewtonsoftJsonMvcCoreBuilderExtensions).Assembly.GetName();
         var excelAssembly = typeof(IExcelImporter).Assembly.GetName();
-        var pdfAssembly = typeof(IPdfExporter).Assembly.GetName();
-        var wordAssembly = typeof(IWordExporter).Assembly.GetName();
-        var captchaAssembly = typeof(ICaptcha).Assembly.GetName();
+        var pdfAssembly = typeof(Magicodes.ExporterAndImporter.Pdf.IPdfExporter).Assembly.GetName();
+        var wordAssembly = typeof(Magicodes.ExporterAndImporter.Word.IWordExporter).Assembly.GetName();
+        var captchaAssembly = typeof(Lazy.Captcha.Core.ICaptcha).Assembly.GetName();
         var wechatApiAssembly = typeof(WechatApiClient).Assembly.GetName();
         var wechatTenpayAssembly = typeof(WechatTenpayClient).Assembly.GetName();
-        var ossAssembly = typeof(IOSSServiceFactory).Assembly.GetName();
+        var ossAssembly = typeof(OnceMi.AspNetCore.OSS.IOSSServiceFactory).Assembly.GetName();
         var parserAssembly = typeof(Parser).Assembly.GetName();
-        var elasticsearchClientAssembly = typeof(ElasticsearchClient).Assembly.GetName();
-        var limitAssembly = typeof(IpRateLimitMiddleware).Assembly.GetName();
-        var htmlParserAssembly = typeof(HtmlParser).Assembly.GetName();
-        var fluentEmailAssembly = typeof(SmtpClient).Assembly.GetName();
-        var qRCodeGeneratorAssembly = typeof(QRCodeGenerator).Assembly.GetName();
-        var sendSmsRequestAssembly = typeof(SendSmsRequest).Assembly.GetName();
+        var elasticsearchClientAssembly = typeof(Elastic.Clients.Elasticsearch.ElasticsearchClient).Assembly.GetName();
+        var limitAssembly = typeof(AspNetCoreRateLimit.IpRateLimitMiddleware).Assembly.GetName();
+        var htmlParserAssembly = typeof(AngleSharp.Html.Parser.HtmlParser).Assembly.GetName();
+        var fluentEmailAssembly = typeof(MailKit.Net.Smtp.SmtpClient).Assembly.GetName();
+        var qRCodeGeneratorAssembly = typeof(QRCoder.QRCodeGenerator).Assembly.GetName();
+        var alibabaSendSmsRequestAssembly = typeof(AlibabaCloud.SDK.Dysmsapi20170525.Models.SendSmsRequest).Assembly.GetName();
+        var tencentSendSmsRequestAssembly = typeof(TencentCloud.Sms.V20190711.Models.SendSmsRequest).Assembly.GetName();
         var imageAssembly = typeof(Image).Assembly.GetName();
         var rabbitMQAssembly = typeof(RabbitMQEventSourceStore).Assembly.GetName();
-        var ldapConnectionAssembly = typeof(LdapConnection).Assembly.GetName();
-        var ipToolAssembly = typeof(IpTool).Assembly.GetName();
-        var weixinAuthenticationOptionsAssembly = typeof(WeixinAuthenticationOptions).Assembly.GetName();
-        var giteeAuthenticationOptionsAssembly = typeof(GiteeAuthenticationOptions).Assembly.GetName();
+        var ldapConnectionAssembly = typeof(Novell.Directory.Ldap.LdapConnection).Assembly.GetName();
+        var ipToolAssembly = typeof(IPTools.Core.IpTool).Assembly.GetName();
+        var weixinAuthenticationOptionsAssembly = typeof(AspNet.Security.OAuth.Weixin.WeixinAuthenticationOptions).Assembly.GetName();
+        var giteeAuthenticationOptionsAssembly = typeof(AspNet.Security.OAuth.Gitee.GiteeAuthenticationOptions).Assembly.GetName();
+        var hashidsAssembly = typeof(HashidsNet.Hashids).Assembly.GetName();
+        var sftpClientAssembly = typeof(Renci.SshNet.SftpClient).Assembly.GetName();
 
         return new[]
         {
@@ -142,13 +130,16 @@ public class SysServerService : IDynamicApiController, ITransient
             new { htmlParserAssembly.Name, htmlParserAssembly.Version },
             new { fluentEmailAssembly.Name, fluentEmailAssembly.Version },
             new { qRCodeGeneratorAssembly.Name, qRCodeGeneratorAssembly.Version },
-            new { sendSmsRequestAssembly.Name, sendSmsRequestAssembly.Version },
+            new { alibabaSendSmsRequestAssembly.Name, alibabaSendSmsRequestAssembly.Version },
+            new { tencentSendSmsRequestAssembly.Name, tencentSendSmsRequestAssembly.Version },
             new { imageAssembly.Name, imageAssembly.Version },
             new { rabbitMQAssembly.Name, rabbitMQAssembly.Version },
             new { ldapConnectionAssembly.Name, ldapConnectionAssembly.Version },
             new { ipToolAssembly.Name, ipToolAssembly.Version },
             new { weixinAuthenticationOptionsAssembly.Name, weixinAuthenticationOptionsAssembly.Version },
             new { giteeAuthenticationOptionsAssembly.Name, giteeAuthenticationOptionsAssembly.Version },
+            new { hashidsAssembly.Name, hashidsAssembly.Version },
+            new { sftpClientAssembly.Name, sftpClientAssembly.Version },
         };
     }
 }

+ 85 - 0
Web/src/api-services/apis/sys-sms-api.ts

@@ -17,6 +17,8 @@ import { Configuration } from '../configuration';
 // Some imports not used depending on template conditions
 // @ts-ignore
 import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from '../base';
+import { AdminResultBoolean } from '../models';
+import { SmsVerifyCodeInput } from '../models';
 /**
  * SysSmsApi - axios parameter creator
  * @export
@@ -223,6 +225,54 @@ export const SysSmsApiAxiosParamCreator = function (configuration?: Configuratio
             let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
             localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
 
+            return {
+                url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
+                options: localVarRequestOptions,
+            };
+        },
+        /**
+         * 
+         * @summary 校验短信验证码
+         * @param {SmsVerifyCodeInput} [body] 
+         * @param {*} [options] Override http request option.
+         * @throws {RequiredError}
+         */
+        apiSysSmsVerifyCodePost: async (body?: SmsVerifyCodeInput, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
+            const localVarPath = `/api/sysSms/verifyCode`;
+            // use dummy base URL string because the URL constructor only accepts absolute URLs.
+            const localVarUrlObj = new URL(localVarPath, 'https://example.com');
+            let baseOptions;
+            if (configuration) {
+                baseOptions = configuration.baseOptions;
+            }
+            const localVarRequestOptions :AxiosRequestConfig = { method: 'POST', ...baseOptions, ...options};
+            const localVarHeaderParameter = {} as any;
+            const localVarQueryParameter = {} as any;
+
+            // authentication Bearer required
+            // http bearer authentication required
+            if (configuration && configuration.accessToken) {
+                const accessToken = typeof configuration.accessToken === 'function'
+                    ? await configuration.accessToken()
+                    : await configuration.accessToken;
+                localVarHeaderParameter["Authorization"] = "Bearer " + accessToken;
+            }
+
+            localVarHeaderParameter['Content-Type'] = 'application/json-patch+json';
+
+            const query = new URLSearchParams(localVarUrlObj.search);
+            for (const key in localVarQueryParameter) {
+                query.set(key, localVarQueryParameter[key]);
+            }
+            for (const key in options.params) {
+                query.set(key, options.params[key]);
+            }
+            localVarUrlObj.search = (new URLSearchParams(query)).toString();
+            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
+            localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
+            const needsSerialization = (typeof body !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json';
+            localVarRequestOptions.data =  needsSerialization ? JSON.stringify(body !== undefined ? body : {}) : (body || "");
+
             return {
                 url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
                 options: localVarRequestOptions,
@@ -294,6 +344,20 @@ export const SysSmsApiFp = function(configuration?: Configuration) {
                 return axios.request(axiosRequestArgs);
             };
         },
+        /**
+         * 
+         * @summary 校验短信验证码
+         * @param {SmsVerifyCodeInput} [body] 
+         * @param {*} [options] Override http request option.
+         * @throws {RequiredError}
+         */
+        async apiSysSmsVerifyCodePost(body?: SmsVerifyCodeInput, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<AdminResultBoolean>>> {
+            const localVarAxiosArgs = await SysSmsApiAxiosParamCreator(configuration).apiSysSmsVerifyCodePost(body, options);
+            return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
+                const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
+                return axios.request(axiosRequestArgs);
+            };
+        },
     }
 };
 
@@ -344,6 +408,16 @@ export const SysSmsApiFactory = function (configuration?: Configuration, basePat
         async apiSysSmsTencentSendSmsPhoneNumberPost(phoneNumber: string, options?: AxiosRequestConfig): Promise<AxiosResponse<void>> {
             return SysSmsApiFp(configuration).apiSysSmsTencentSendSmsPhoneNumberPost(phoneNumber, options).then((request) => request(axios, basePath));
         },
+        /**
+         * 
+         * @summary 校验短信验证码
+         * @param {SmsVerifyCodeInput} [body] 
+         * @param {*} [options] Override http request option.
+         * @throws {RequiredError}
+         */
+        async apiSysSmsVerifyCodePost(body?: SmsVerifyCodeInput, options?: AxiosRequestConfig): Promise<AxiosResponse<AdminResultBoolean>> {
+            return SysSmsApiFp(configuration).apiSysSmsVerifyCodePost(body, options).then((request) => request(axios, basePath));
+        },
     };
 };
 
@@ -399,4 +473,15 @@ export class SysSmsApi extends BaseAPI {
     public async apiSysSmsTencentSendSmsPhoneNumberPost(phoneNumber: string, options?: AxiosRequestConfig) : Promise<AxiosResponse<void>> {
         return SysSmsApiFp(this.configuration).apiSysSmsTencentSendSmsPhoneNumberPost(phoneNumber, options).then((request) => request(this.axios, this.basePath));
     }
+    /**
+     * 
+     * @summary 校验短信验证码
+     * @param {SmsVerifyCodeInput} [body] 
+     * @param {*} [options] Override http request option.
+     * @throws {RequiredError}
+     * @memberof SysSmsApi
+     */
+    public async apiSysSmsVerifyCodePost(body?: SmsVerifyCodeInput, options?: AxiosRequestConfig) : Promise<AxiosResponse<AdminResultBoolean>> {
+        return SysSmsApiFp(this.configuration).apiSysSmsVerifyCodePost(body, options).then((request) => request(this.axios, this.basePath));
+    }
 }

+ 1 - 0
Web/src/api-services/models/index.ts

@@ -283,6 +283,7 @@ export * from './send-subscribe-message-input';
 export * from './serialization-format';
 export * from './signature-input';
 export * from './sm-key-pair-output';
+export * from './sms-verify-code-input';
 export * from './sort-version';
 export * from './sql-sugar-paged-list-job-detail-output';
 export * from './sql-sugar-paged-list-open-access-output';

+ 34 - 2
Web/src/api-services/models/message-input.ts

@@ -22,12 +22,20 @@ import { MessageTypeEnum } from './message-type-enum';
 export interface MessageInput {
 
     /**
-     * 用户ID
+     * 接收者用户Id
      *
      * @type {number}
      * @memberof MessageInput
      */
-    userId?: number;
+    receiveUserId?: number;
+
+    /**
+     * 接收者名称
+     *
+     * @type {string}
+     * @memberof MessageInput
+     */
+    receiveUserName?: string | null;
 
     /**
      * 用户ID列表
@@ -58,4 +66,28 @@ export interface MessageInput {
      * @memberof MessageInput
      */
     message?: string | null;
+
+    /**
+     * 发送者Id
+     *
+     * @type {string}
+     * @memberof MessageInput
+     */
+    sendUserId?: string | null;
+
+    /**
+     * 发送者名称
+     *
+     * @type {string}
+     * @memberof MessageInput
+     */
+    sendUserName?: string | null;
+
+    /**
+     * 发送时间
+     *
+     * @type {Date}
+     * @memberof MessageInput
+     */
+    sendTime?: Date;
 }