服务端的TigerApi 框架,基于.NET6 2024 版本
Rodney Chen
2024-12-06 9719a7f0ccbb70e4e51a93cbe1733d1424c16f6d
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
using Tiger.Model;
using SqlSugar;
using System;
using System.Collections.Generic;
using Tiger.IBusiness;
using System.Threading.Tasks;
using Rhea.Common;
using System.Net;
using System.Linq;
using Newtonsoft.Json;
 
namespace Tiger.Business
{
    public partial class Biz
    {
        /// <summary>
        /// 获取参数
        /// </summary>
        /// <param name="group"></param>
        /// <param name="code"></param>
        /// <returns></returns>
        public async Task<ApiAction<List<SYS_PARAM>>> getSysParam( string group, string code)
        {
            var action = new ApiAction<List<SYS_PARAM>>();
            try
            {
                action.Data = code.IsNullOrEmpty()? Cache.SysParam.Params.Where(x=>x.PRMG_CODE == group).ToList(): new List<SYS_PARAM>() { Cache.SysParam[code, group] } ;
                action.Message = $"获取参数成功。";
            }
            catch (Exception ex)
            {
                action.CatchExceptionWithLog(ex, $"获取参数异常");
            }
            return action;
        }
    }
}