xxyy
2025-03-18 d4cae5c48af02e109b1febce8c7c21e560cd6525
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
38
 
using System.Net;
using WIDESEAWCS_Core.BaseServices;
using WIDESEAWCS_ISystemRepository;
using WIDESEAWCS_ISystemServices;
using WIDESEAWCS_Core.BaseRepository;
using WIDESEAWCS_Model.Models;
 
namespace WIDESEA_Services
{
    public class Sys_ConfigService : ServiceBase<Sys_Config, ISys_ConfigRepository>, ISys_ConfigService
    {
        private readonly IUnitOfWorkManage _unitOfWorkManage;
 
        public Sys_ConfigService(ISys_ConfigRepository repository, IUnitOfWorkManage unitOfWorkManage) : base(repository)
        {
            _unitOfWorkManage = unitOfWorkManage;
        }
 
        /// <inheritdoc/>
        public List<Sys_Config> GetAll()
        {
            return BaseDal.QueryData();
        }
 
        /// <inheritdoc/>
        public List<Sys_Config> GetConfigsByCategory(string category)
        {
            return BaseDal.QueryData(x => x.Category == category).ToList();
        }
 
        /// <inheritdoc/>
        public Sys_Config GetByConfigKey(string category, string configKey)
        {
            return BaseDal.QueryData(x => x.Category == category && x.ConfigKey == configKey).FirstOrDefault();
        }
    }
}