| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647 |
-
- 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)
- {
- }
- /// <summary>
- /// 获取所有系统模块
- /// </summary>
- /// <param name="_SetData"></param>
- /// <returns></returns>
- 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;
- }
- }
- }
|