src/Services/Sys_dictServices.cs

(开头部分) 2KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

using IRepository;
using IServices;
using SqlSugar;
using System;
using YL.Core.Dto;
using YL.Core.Entity;
using YL.Utils.Extensions;
using YL.Utils.Json;
using YL.Utils.Table;

namespace Services
{
    public class Sys_dictServices : BaseServices<Sys_dict>, ISys_dictServices
    {
        private readonly ISys_dictRepository _repository;
        private readonly SqlSugarClient _client;

        public Sys_dictServices(
            SqlSugarClient client,
            ISys_dictRepository repository) : base(repository)
        {
            _repository = repository;
            _client = client;
        }

        public string PageList(PubParams.DictBootstrapParams bootstrap)
        {
            int totalNumber = 0;
            if (bootstrap.offset != 0)
            {
                bootstrap.offset = bootstrap.offset / bootstrap.limit + 1;
            }
            var query = _client.Queryable<Sys_dict, Sys_user, Sys_user>
                ((s, c, u) => new object[] {
                   JoinType.Left,s.CreateBy==c.UserId,
                   JoinType.Left,s.ModifiedBy==u.UserId
                 })
                 .Select((s, c, u) => new
                 {
                     DictId = s.DictId.ToString(),
                     s.DictNo,
                     s.DictName,
                     s.DictType,
                     s.IsDel,
                     s.Remark,
                     CName = c.UserNickname,
                     s.CreateDate,
                     UName = u.UserNickname,
                     s.ModifiedDate
                 }).MergeTable().Where((s) => s.IsDel == 1);
            if (!bootstrap.search.IsEmpty())
            {
                query.Where((s) => s.DictName.Contains(bootstrap.search));
            }
            if (!bootstrap.DictType.IsEmpty())
            {
                query.Where((s) => s.DictType == bootstrap.DictType);
            }
            if (!bootstrap.datemin.IsEmpty() && !bootstrap.datemax.IsEmpty())
            {
后面还有 15 行代码,解锁后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明

AI 解读 AI

登录后可用,每次 10 算力,解读结果公开显示在下面。

还没有人解读过这个文件。