123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475 |
-
- using OASystem.Domain;
- using OASystem.Domain.Dtos.UserDto;
- using OASystem.Domain.Entities.System;
- using OASystem.Domain.ViewModels.System;
- namespace OASystem.Infrastructure.Repositories.System
- {
- public class SetDataRepository : BaseRepository<Sys_SetData, SetDataView>
- {
- public SetDataRepository(SqlSugarClient sqlSugar) : base(sqlSugar)
- {
- }
-
-
-
-
-
- public async Task<Result> GetSySDefultModule(SetDataRepository _SetData)
- {
- Result result = new Result();
- string sql = "select * from Sys_SetData where STid = 5 and isdel = 0";
- var DBdata = await _SetData.GetListBySqlWithNolockAsync(sql);
- if (DBdata == null || DBdata.Count == 0)
- {
- return result;
- }
- result.Data = DBdata.Select(x=> new SetDataView
- {
- Name = x.Name,
- STid = x.STid,
- Id = x.Id,
- });
- result.Code = 0;
- result.Msg = "成功!";
- return result;
- }
-
-
-
-
-
- public async Task<Result> GetSetDataBySTId(SetDataRepository _SetData,int stId)
- {
- Result result = new Result();
- string sql = string.Format(@"select * from Sys_SetData where STid = {0} and isdel = 0",stId);
- var DBdata = await _SetData.GetListBySqlWithNolockAsync(sql);
- if (DBdata == null || DBdata.Count == 0)
- {
- return result;
- }
- result.Data = DBdata.Select(x => new SetDataInfoView
- {
- Name = x.Name,
- Id = x.Id,
- });
- result.Code = 0;
- result.Msg = "成功!";
- return result;
- }
- }
- }
|