Przeglądaj źródła

修复 租户数据字典 关联错误问题
修复 NotNull、NotEmpty 引用不明确错误
修正XML注释格式,消除警告消息

夜鹰 4 miesięcy temu
rodzic
commit
f2225f6de5

+ 6 - 4
Admin.NET/Admin.NET.Core/Option/SMSOptions.cs

@@ -88,9 +88,9 @@ public sealed class CustomSMSSettings
 
     /// <summary>
     /// API 接口地址模板
-    /// 支持占位符: {mobile} - 手机号, {content} - 短信内容, {code} - 验证码
-    /// 示例: https://api.xxxx.com/sms?u=xxxx&key=59e03f49c3dbb5033&m={mobile}&c={content}
+    /// <para>支持占位符: {mobile} - 手机号, {content} - 短信内容, {code} - 验证码</para>
     /// </summary>
+    /// <remarks>示例: https://api.xxxx.com/sms?u=xxxx&amp;key=59e03f49c3dbb5033&amp;m={mobile}&amp;c={content}</remarks>
     public string ApiUrl { get; set; }
 
     /// <summary>
@@ -106,9 +106,11 @@ public sealed class CustomSMSSettings
 
     /// <summary>
     /// POST 请求的数据模板(支持占位符)
-    /// JSON 格式示例: {"mobile":"{mobile}","content":"{content}","apikey":"your_key"}
-    /// Form 格式示例: mobile={mobile}&content={content}&apikey=your_key
     /// </summary>
+    /// <remarks>
+    /// JSON 格式示例: {"mobile":"{mobile}","content":"{content}","apikey":"your_key"} <br />
+    /// Form 格式示例: mobile={mobile}&amp;content={content}&amp;apikey=your_key
+    /// </remarks>
     public string PostData { get; set; }
 
     /// <summary>

+ 4 - 0
Admin.NET/Admin.NET.Core/Service/Dict/Dto/DictTypeInput.cs

@@ -25,6 +25,10 @@ public class PageDictTypeInput : BasePageInput
 
 public class AddDictTypeInput : SysDictType
 {
+    /// <summary>
+    /// 是否是租户字典(Y-是,N-否)
+    /// </summary>
+    public override YesNoEnum IsTenant { get; set; } = YesNoEnum.Y;
     /// <summary>
     /// 是否是内置字典(Y-是,N-否)
     /// </summary>

+ 3 - 1
Admin.NET/Admin.NET.Core/Service/Dict/SysDictDataService.cs

@@ -29,7 +29,9 @@ public class SysDictDataService : IDynamicApiController, ITransient
         _sysLangTextCacheService = sysLangTextCacheService;
         VSysDictData = _sysDictDataRep.Context.UnionAll(
             _sysDictDataRep.AsQueryable(),
-            _sysDictDataRep.Change<SysDictDataTenant>().AsQueryable().WhereIF(_userManager.SuperAdmin, d => d.TenantId == _userManager.TenantId).Select<SysDictData>());
+            _sysDictDataRep.Change<SysDictDataTenant>().AsQueryable()
+            //.WhereIF(_userManager.SuperAdmin, d => d.TenantId == _userManager.TenantId)
+            .Select<SysDictData>());
     }
 
     /// <summary>

+ 2 - 0
Admin.NET/Admin.NET.Core/Service/Dict/SysDictTypeService.cs

@@ -130,6 +130,8 @@ public class SysDictTypeService : IDynamicApiController, ITransient
         var isExist = await _sysDictTypeRep.IsAnyAsync(u => u.Code == input.Code);
         if (isExist) throw Oops.Oh(ErrorCodeEnum.D3001);
 
+        if (_userManager.SuperAdmin) input.IsTenant = YesNoEnum.N;  // 超级管理员添加的字典类型默认非租户级
+
         await _sysDictTypeRep.InsertAsync(input.Adapt<SysDictType>());
     }
 

+ 1 - 1
Admin.NET/Admin.NET.Core/Utils/GiteeHelper.cs

@@ -37,7 +37,7 @@ public class GiteeHelper
     /// 构建Query参数
     /// </summary>
     /// <returns></returns>
-    private static string BuilderQueryString([NotNull] object obj)
+    private static string BuilderQueryString([System.Diagnostics.CodeAnalysis.NotNull] object obj)
     {
         if (obj == null) return string.Empty;
         var query = HttpUtility.ParseQueryString(string.Empty);

+ 1 - 0
Admin.NET/Plugins/Admin.NET.Plugin.DingTalk/Service/DingTalkService.cs

@@ -86,6 +86,7 @@ public class DingTalkService : IDynamicApiController, IScoped
     /// <param name="input"></param>
     /// <returns></returns>
     [DisplayName("给指定用户发送钉钉互动卡片")]
+    [Obsolete]
     public async Task<DingTalkSendInteractiveCardsOutput> DingTalkSendInteractiveCards(
         string token,
         DingTalkSendInteractiveCardsInput input

+ 1 - 1
Admin.NET/Plugins/Admin.NET.Plugin.WorkWeixin/Proxy/AppChat/Dto/AppChatHttpInput.cs

@@ -32,7 +32,7 @@ public class CreatAppChatInput
     /// </summary>
     [JsonProperty("userlist")]
     [JsonPropertyName("userlist")]
-    [NotEmpty(ErrorMessage = "群成员列表不能为空")]
+    [Core.NotEmpty(ErrorMessage = "群成员列表不能为空")]
     public List<string> UserList { get; set; }
 
     /// <summary>

+ 4 - 4
Admin.NET/Plugins/Admin.NET.Plugin.WorkWeixin/Proxy/AppChat/IWorkWeixinAppChatHttp.cs

@@ -17,7 +17,7 @@ public interface IWorkWeixinAppChatHttp : IHttpDeclarative
     /// <param name="accessToken"></param>
     /// <param name="body"></param>
     /// <returns></returns>
-    /// <inheritdoc cref="https://developer.work.weixin.qq.com/document/path/90245"/>
+    /// <see href="https://developer.work.weixin.qq.com/document/path/90245"/>
     [Post("https://qyapi.weixin.qq.com/cgi-bin/appchat/create")]
     Task<CreatAppChatOutput> Create([Query("access_token")] string accessToken, [Body] CreatAppChatInput body);
 
@@ -27,7 +27,7 @@ public interface IWorkWeixinAppChatHttp : IHttpDeclarative
     /// <param name="accessToken"></param>
     /// <param name="body"></param>
     /// <returns></returns>
-    /// <inheritdoc cref="https://developer.work.weixin.qq.com/document/path/98913"/>
+    /// <see href="https://developer.work.weixin.qq.com/document/path/98913"/>
     [Post("https://qyapi.weixin.qq.com/cgi-bin/appchat/update")]
     Task<CreatAppChatOutput> Update([Query("access_token")] string accessToken, [Body] UpdateAppChatInput body);
 
@@ -37,7 +37,7 @@ public interface IWorkWeixinAppChatHttp : IHttpDeclarative
     /// <param name="accessToken"></param>
     /// <param name="chatId"></param>
     /// <returns></returns>
-    /// <inheritdoc cref="https://developer.work.weixin.qq.com/document/path/98914"/>
+    /// <see href="https://developer.work.weixin.qq.com/document/path/98914"/>
     [Get("https://qyapi.weixin.qq.com/cgi-bin/appchat/get")]
     Task<CreatAppChatOutput> Get([Query("access_token")] string accessToken, [Query("chatid")] string chatId);
 
@@ -47,7 +47,7 @@ public interface IWorkWeixinAppChatHttp : IHttpDeclarative
     /// <param name="accessToken"></param>
     /// <param name="body"></param>
     /// <returns></returns>
-    /// <inheritdoc cref="https://developer.work.weixin.qq.com/document/path/90248"/>
+    /// <see href="https://developer.work.weixin.qq.com/document/path/90248"/>
     [Post("https://qyapi.weixin.qq.com/cgi-bin/appchat/send")]
     Task<BaseWorkOutput> Send([Query("access_token")] string accessToken, [Body] SendBaseAppChatInput body);
 }

+ 1 - 1
Admin.NET/Plugins/Admin.NET.Plugin.WorkWeixin/Proxy/Auth/IWorkWeixinAuthHttp.cs

@@ -17,7 +17,7 @@ public interface IWorkWeixinAuthHttp : IHttpDeclarative
     /// <param name="corpId">企业ID</param>
     /// <param name="corpSecret">应用的凭证密钥</param>
     /// <returns></returns>
-    /// <inheritdoc cref="https://developer.work.weixin.qq.com/document/path/91039"/>
+    /// <see href="https://developer.work.weixin.qq.com/document/path/91039"/>
     [Post("https://qyapi.weixin.qq.com/cgi-bin/gettoken")]
     Task<AuthAccessTokenHttpOutput> GetToken([Query("corpid")] string corpId, [Query("corpsecret")] string corpSecret);
 }