Exemplo n.º 1
0
        public async Task <ResultModel> Run(AcceptParam acceptParam, AppSetting appSetting, HttpContext context, long userId)
        {
            var updateUserDto = acceptParam.AnalyzeParam <UpdateUserReq>();

            if (updateUserDto == null)
            {
                return(ResultModel.GetNullErrorModel());
            }

            var msg = updateUserDto.ValidInfo();

            if (msg != string.Empty)
            {
                return(ResultModel.GetParamErrorModel(msg));
            }

            var dbConnection = appSetting.GetMysqlConn(context);

            var result = await DapperTools.Edit(dbConnection, EntityTools.GetTableName <UserInfo>(), new List <string>()
            {
                $"{nameof(BaseModel.Id)} = {userId}"
            }, null, updateUserDto);

//      var result = await dbConnection.ExecuteAsync($@"
//{SqlCharConst.UPDATE} {EntityTools.GetTableName<UserInfo>()}
//{SqlCharConst.SET} {string.Join(",", updateUserDto.GetType().GetProperties().Select(u => $"{u.Name} = @{u.Name}"))}
//{SqlCharConst.WHERE} {nameof(BaseModel.Id)} = {userId}
//",updateUserDto);

            return(ResultModel.GetSuccessModel(result));
        }
Exemplo n.º 2
0
        public async Task <ResultModel> Run(AcceptParam acceptParam, AppSetting appSetting, HttpContext context)
        {
            var dto = acceptParam.AnalyzeParam <UserLoginReq>();

            if (dto == null)
            {
                return(ResultModel.GetNullErrorModel());
            }

            var msg = dto.ValidInfo();

            if (msg != string.Empty)
            {
                return(ResultModel.GetParamErrorModel(msg));
            }

            var whereList = new List <string>()
            {
                $"{nameof(UserLoginReq.UserName)} = @{nameof(UserLoginReq.UserName)}",
                $"{nameof(UserLoginReq.LoginPwd)} = @{nameof(UserLoginReq.LoginPwd)}",
            };

            var userInfo = await DapperTools.GetItem <UserInfo>(appSetting.GetMysqlConn(context), EntityTools.GetTableName <UserInfo>(), whereList, dto);

            var cusRedisHelper = MemoryCache.GetInstance().TryGet <CusRedisHelper>(appSetting.GetRedisConn().FlagKey);

            var token = Guid.NewGuid().ToString().Replace("-", "");

//      cusRedisHelper.StringSetAsync("user_api_token")

            //使用 is4 =-= gg

            throw new NotImplementedException();
        }
Exemplo n.º 3
0
        public async Task <ResultModel> Run(AcceptParam acceptParam, AppSetting appSetting, HttpContext context)
        {
            //解析参数
            var pageModel = acceptParam.AnalyzeParam <PageModel <FilterReq> >();

            if (pageModel == null)
            {
                return(ResultModel.GetNullErrorModel(string.Empty));
            }

            //动态sql
//      StringBuilder whereBuilder = new StringBuilder();
            List <string> whereList = new List <string>();

            if (pageModel.Result.ValidFlag != null && pageModel.Result.ValidFlag >= 0)
            {
//        whereBuilder.Append($@"
//{SqlCharConst.WHERE} {EntityTools.GetField<ArticleTag>(nameof(ArticleTag.ValidFlag))} = {pageModel.Result.ValidFlag}
//");
                whereList.Add($"{EntityTools.GetField<ArticleTag>(nameof(ArticleTag.ValidFlag))} = {pageModel.Result.ValidFlag}");
            }

            //获取连接
            var mysqlConn = appSetting.GetMysqlConn();

            var dbConnection = context.GetConnection(mysqlConn.FlagKey, mysqlConn.ConnStr);

            //采用工具类分页查询
            var pageList = await DapperTools.GetPageList <ArticleTag>(pageModel.PageNo, pageModel.PageSize, dbConnection,
                                                                      whereList);

            //返回结果集
            return(ResultModel.GetSuccessModel(string.Empty, pageList));
        }
Exemplo n.º 4
0
        public async Task <ResultModel> Run(AcceptParam acceptParam, AppSetting appSetting, HttpContext context)
        {
            var keyDto = acceptParam.AnalyzeParam <KeyReq <long> >();

            if (keyDto == null || keyDto.Key <= 0)
            {
                return(ResultModel.GetParamErrorModel(string.Empty, "参数异常!"));
            }

            var idField = EntityTools.GetField <ArticleInfo>(nameof(ArticleInfo.Id));

            var whereArr = new List <string>
            {
                SqlCharConst.DefaultWhere,
                $"{idField} = {keyDto.Key}"
//        $"Id = @Id"
            };

            var conn = context.GetConnection(appSetting.GetMysqlConn().FlagKey, appSetting.GetMysqlConn().ConnStr);

//      var info = await DapperTools.GetItem<ArticleInfo>(conn, EntityTools.GetTableName<ArticleInfo>(), whereArr, new { Id = keyDto.Key});
            var info = await DapperTools.GetItem <ArticleInfo>(conn, EntityTools.GetTableName <ArticleInfo>(), whereArr);

            if (info == null)
            {
                return(ResultModel.GetParamErrorModel(string.Empty, "此文章不存在或已删除!"));
            }

            return(ResultModel.GetSuccessModel(String.Empty, info));
        }
Exemplo n.º 5
0
        static void Main(string[] args)
        {
            AcceptParam a = new AcceptParam();

            a.Qvalue = 0.71323456765f;
            Console.WriteLine(a.Qvalue);


            //IPEndPoint destination = new IPEndPoint(IPAddress.Parse(ip), int.Parse(port));
            //Socket TcpSocket = new Socket(System.Net.Sockets.AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp);
            //TcpSocket.Connect(destination);
            //byte[] message = Encoding.ASCII.GetBytes("GET /csd-3.5/ HTTP/1.1\r\nHost: colorschemedesigner.com\r\n\r\n");
            //TcpSocket.Send(message);

            //message = new byte[1024];
            //StringBuilder builder = new StringBuilder();
            //int bytes = 0;
            //Console.WriteLine("Message has been send");

            //do
            //{
            //    bytes = TcpSocket.Receive(message, message.Length, 0);
            //    builder.Append(Encoding.ASCII.GetString(message, 0, bytes));
            //}
            //while (TcpSocket.Available > 0);
            //Console.WriteLine("ответ сервера: " + builder.ToString());

            //// закрываем сокет
            //TcpSocket.Shutdown(SocketShutdown.Both);
            //TcpSocket.Close();
            Console.ReadKey();
        }
Exemplo n.º 6
0
        public async Task <ResultModel> Run(AcceptParam acceptParam, AppSetting appSetting, HttpContext context)
        {
            var dto = acceptParam.AnalyzeParam <UserLoginReq>();

            if (dto == null)
            {
                return(ResultModel.GetNullErrorModel());
            }

            var msg = dto.ValidInfo();

            if (msg != string.Empty)
            {
                return(ResultModel.GetParamErrorModel(msg));
            }

            // discover endpoints from metadata
            //error: HTTPS required
            //      var disco = await DiscoveryClient.GetAsync(appSetting.Authorize.Url);

            //      Logger.Debug(JsonConvert.SerializeObject(disco));
//      var tokenClient = new TokenClient(disco.TokenEndpoint, "client2", "secret");

            // request token
            var tokenClient   = new TokenClient(appSetting.Authorize.Url + "/connect/token", appSetting.Authorize.Client, appSetting.Authorize.Secret);
            var tokenResponse = await tokenClient.RequestResourceOwnerPasswordAsync(dto.UserName, dto.LoginPwd);

            if (tokenResponse.IsError)
            {
                Logger.Debug(JsonConvert.SerializeObject(tokenResponse));
                return(ResultModel.GetDealErrorModel(tokenResponse.Error));
            }

            return(ResultModel.GetSuccessModel(tokenResponse.Json));
        }
        public override IEnumerable <string> GetWhereEnumerable(AcceptParam acceptParam, out PageModel <object> page,
                                                                out string msg)
        {
            var param = acceptParam.AnalyzeParam <PageModel <long> >();

            if (param == null || param.Result <= 0)
            {
                msg = "参数异常!";
            }

            msg = string.Empty;

            page = new PageModel <object>()
            {
                PageNo   = param.PageNo,
                PageSize = param.PageSize,
            };

            return(new[]
            {
                $"{EntityTools.GetField<CommentInfo>(nameof(CommentInfo.JoinKey))} = {param.Result}",
                $"{EntityTools.GetField<CommentInfo>(nameof(CommentInfo.CommentType))} = {(int)CommentTypeMenu.Article}",
//        $"{EntityTools.GetField<CommentInfo>(nameof(CommentInfo.ReplyId))} = {0}",//只查评论 不差回复评论
                $"{EntityTools.GetField<CommentInfo>(nameof(CommentInfo.ValidFlag))} = {(int)ValidFlagMenu.UseFul}",
            });
        }
        public async Task <ResultModel> Run(AcceptParam acceptParam, AppSetting appSetting, HttpContext context, long userId)
        {
            var req = acceptParam.AnalyzeParam <KeyReq <int> >();

            if (req == null || req.Key <= 0)
            {
                return(ResultModel.GetParamErrorModel());
            }

            if (userId == req.Key)
            {
                return(ResultModel.GetParamErrorModel("查询人与被关注人相同"));
            }

            var conn = appSetting.GetMysqlConn(context);

            var isExists = await DapperTools.IsExists(conn, EntityTools.GetTableName <AttentionInfo>(),
                                                      new[]
            {
                $"{EntityTools.GetField<AttentionInfo>(nameof(AttentionInfo.AttentionUser))} ={req.Key}",
                $"{EntityTools.GetField<AttentionInfo>(nameof(AttentionInfo.UserId))} ={userId}",
                $"{nameof(BaseModel.ValidFlag)}={(int) ValidFlagMenu.UseFul}"
            });

            return(ResultModel.GetSuccessModel(isExists));
        }
Exemplo n.º 9
0
        public async Task <ResultModel> Run(AcceptParam acceptParam, AppSetting appSetting, HttpContext context, long userId)
        {
            var req = acceptParam.AnalyzeParam <CreateArticleReq>();

            if (req == null)
            {
                return(ResultModel.GetNullErrorModel(string.Empty));
            }

            string msg;

            if ((msg = req.ValidInfo()) != string.Empty)
            {
                return(ResultModel.GetNullErrorModel(string.Empty, msg));
            }

            var createArticleParam = (CreateArticleParam)req;

            createArticleParam.UserId = userId;

            var mysqlConn = appSetting.GetMysqlConn();

            var dbConnection = context.GetConnection(mysqlConn.FlagKey, mysqlConn.ConnStr);

            var result =
                await DapperTools.CreateItem(dbConnection, EntityTools.GetTableName <ArticleInfo>(), createArticleParam);

            return(ResultModel.GetSuccessModel(string.Empty, result));
        }
Exemplo n.º 10
0
        public async Task <ResultModel> Run(AcceptParam acceptParam, AppSetting appSetting, HttpContext context, long userId)
        {
            var req = acceptParam.AnalyzeParam <KeyReq <int> >();

            if (req == null || req.Key <= 0)
            {
                return(ResultModel.GetParamErrorModel());
            }

            var conn = appSetting.GetMysqlConn(context);

            var result = await DapperTools.Edit(conn, EntityTools.GetTableName <AttentionInfo>(), new[]
            {
                $"{EntityTools.GetField<AttentionInfo>(nameof(AttentionInfo.AttentionUser))}={req.Key}",
                $"{EntityTools.GetField<AttentionInfo>(nameof(AttentionInfo.UserId))}={userId}",
                $"{nameof(BaseModel.ValidFlag)}={(int)ValidFlagMenu.UnUseFul}"
            },
                                                new[]
            {
                $"{nameof(BaseModel.ValidFlag)}=@{nameof(BaseModel.ValidFlag)}",
                $"{nameof(BaseModel.UpdateTime)}=@{nameof(BaseModel.UpdateTime)}",
            },
                                                new
            {
                ValidFlag  = ValidFlagMenu.UnUseFul,
                UpdateTime = DateTime.Now,
            });

            return(ResultModel.GetSuccessModel(result));
        }
Exemplo n.º 11
0
        public async Task <ResultModel> Run(AcceptParam acceptParam, AppSetting appSetting, HttpContext context, long userId)
        {
            var req = acceptParam.AnalyzeParam <KeyReq <long> >();

            if (req == null || req.Key <= 0)
            {
                return(ResultModel.GetParamErrorModel());
            }

            var dbConnection = appSetting.GetMysqlConn(context);

            var result = await DapperTools.Edit(dbConnection, EntityTools.GetTableName <ArticleInfo>(), new[]
            {
                $"{EntityTools.GetField<BaseModel>(nameof(BaseModel.Id))} = {req.Key} ",
                $"{EntityTools.GetField<ArticleInfo>(nameof(ArticleInfo.UserId))} = {userId}",
            }, new[]
            {
                $"{nameof(BaseModel.ValidFlag)} = {((int) ValidFlagMenu.UnUseFul)}",
                $"{nameof(BaseModel.UpdateTime)} = @{nameof(BaseModel.UpdateTime)}"
            }, new
            {
                UpdateTime = DateTime.Now
            });

//      var result = await dbConnection.ExecuteAsync($@"
//{SqlCharConst.UPDATE} {EntityTools.GetTableName<ArticleInfo>()}
//{SqlCharConst.SET} {EntityTools.GetField<BaseModel>(nameof(BaseModel.ValidFlag))} = {((int) ValidFlagMenu.UseFul)}
//{SqlCharConst.WHERE} {EntityTools.GetField<BaseModel>(nameof(BaseModel.Id))} = {req.Key}
//{SqlCharConst.AND} {EntityTools.GetField<ArticleInfo>(nameof(ArticleInfo.UserId))} = {userId}
//");

            return(ResultModel.GetSuccessModel(result));
        }
Exemplo n.º 12
0
 public Task <ResultModel> Run(AcceptParam acceptParam, AppSetting appSetting, HttpContext context)
 {
     return(Task.Run((() =>
     {
         return ResultModel.GetSuccessModel("测试Api");
     })));
 }
Exemplo n.º 13
0
        public async Task <ResultModel> Run(AcceptParam acceptParam, AppSetting appSetting,
                                            DealAttribute dealAttribute)
        {
            var instance = Activator.CreateInstance(dealAttribute.DealService) as IDeal;

            Logger.Info($"调用:{dealAttribute.DealService.Name}");

            return(await instance.Run(acceptParam, appSetting, HttpContext));
        }
Exemplo n.º 14
0
        public async Task <ResultModel> Run(AcceptParam acceptParam, AppSetting appSetting, HttpContext context, long userId)
        {
            var item = await DapperTools.GetItem <UserInfo>(appSetting.GetMysqlConn(context), EntityTools.GetTableName <UserInfo>(),
                                                            new List <string>()
            {
                $"id = {userId}"
            });

            return(ResultModel.GetSuccessModel(item));
        }
Exemplo n.º 15
0
        public async Task <object> AuthIndex([FromBody] AcceptParam acceptParam)
        {
            var acceptUserId = User.Claims.FirstOrDefault(u => u.Type == JwtClaimTypes.Id)?.Value;//获取用户id

            if (acceptUserId == null)
            {
                return(ResultModel.GetParamErrorModel("account not found"));
            }

            var userId = Convert.ToInt64(acceptUserId);

            try
            {
                if (Enum.TryParse(acceptParam.OperationFlag, true, out AuthOperationMenu operationMenu)) //通过操作符找到处理对象
                {
                    var dealAttribute = operationMenu.GetAttribute <AuthDealAttribute>();                //获取相关特性信息

                    //处理对象验证
                    if (dealAttribute == null)
                    {
                        return(operationMenu.ToString());
                    }

                    //验签处理
                    if (dealAttribute.NeedValidSign)
                    {
                        if (acceptParam.Param != null || !ValidSign(acceptParam))
                        {
                            return("验签失败!");
                        }
                    }

                    //执行操作
                    var resultModel = await Run(acceptParam, AppSetting, dealAttribute, userId);

                    //结果集标识
                    resultModel.Title = dealAttribute.Description;

                    return(resultModel);
                }
                else
                {
                }

                return(acceptParam);
            }
            catch (Exception e)
            {
                return(e);
            }
        }
Exemplo n.º 16
0
        public async Task <ResultModel> Run(AcceptParam acceptParam, AppSetting appSetting, HttpContext context)
        {
            var mysqlConn = appSetting.GetMysqlConn();

            var dbConnection = context.GetConnection(mysqlConn.FlagKey, mysqlConn.ConnStr);

            IEnumerable <ArticleInfo> articleInfos = await dbConnection.QueryAsync <ArticleInfo>($@"
{SqlCharConst.SELECT} {string.Join(",", EntityTools.GetFields<ArticleInfo>())}
{SqlCharConst.FROM} {EntityTools.GetTableName<ArticleInfo>()}
{SqlCharConst.WHERE} {SqlCharConst.DefaultWhere}
");

            return(ResultModel.GetSuccessModel(string.Empty, articleInfos.ToList()));
        }
Exemplo n.º 17
0
        public async Task <ResultModel> Run(AcceptParam acceptParam, AppSetting appSetting, HttpContext context)
        {
            var whereEnumerable = GetWhereEnumerable(acceptParam, out var page, out var msg);

            if (msg != string.Empty)
            {
                return(ResultModel.GetParamErrorModel(msg));
            }

            var conn = appSetting.GetMysqlConn(context);

            var tableMapper = typeof(CommentInfo).GetCustomAttribute <TableMapperAttribute>();

            var fieldList = GetFieldEnumerable(tableMapper).ToList();

            var orderEnumerable = GetOrderEnumerable(tableMapper);

            #region 查询用户信息

            fieldList.Add($@"
(
  {SqlCharConst.SELECT} {EntityTools.GetField<UserInfo>(nameof(UserInfo.DisplayName))}
  {SqlCharConst.FROM} {EntityTools.GetTableName<UserInfo>()}
  {SqlCharConst.WHERE} {nameof(BaseModel.Id)} = {tableMapper.Alias}.{EntityTools.GetField<CommentInfo>(nameof(CommentInfo.ActionUser))}
)
 {SqlCharConst.AS} {EntityTools.GetField<CommentDto>(nameof(CommentDto.NickName))}
"); //查询用户名

            fieldList.Add($@"
(
  {SqlCharConst.SELECT} {EntityTools.GetField<UserInfo>(nameof(UserInfo.FaceImg))}
  {SqlCharConst.FROM} {EntityTools.GetTableName<UserInfo>()}
  {SqlCharConst.WHERE} {nameof(BaseModel.Id)} = {tableMapper.Alias}.{EntityTools.GetField<CommentInfo>(nameof(CommentInfo.ActionUser))}
)
 {SqlCharConst.AS} {EntityTools.GetField<CommentDto>(nameof(CommentDto.FaceImg))}
"); //查询用户头像

            #endregion

            var pageList = await DapperTools.GetPageList <CommentDto>(page.PageNo, page.PageSize, conn, tableMapper.TableName,
                                                                      whereEnumerable, fieldList, orderEnumerable, tableMapper.Alias, page.Result);

            return(ResultModel.GetSuccessModel(pageList));
        }
Exemplo n.º 18
0
        public async Task <ResultModel> Run(AcceptParam acceptParam, AppSetting appSetting, HttpContext context)
        {
            var req = acceptParam.AnalyzeParam <KeyReq <long> >();

            if (req == null || req.Key <= 0)
            {
                return(ResultModel.GetNullErrorModel());
            }

            var conn = appSetting.GetMysqlConn(context);

            var item = await DapperTools.GetItem <ArticleSingleDto>(conn, EntityTools.GetTableName <ArticleInfo>(), new []
            {
                $"{nameof(BaseModel.Id)} = {req.Key}",
                $"{nameof(BaseModel.ValidFlag)} = {(int)ValidFlagMenu.UseFul}",
            });

            return(ResultModel.GetSuccessModel(item));
        }
Exemplo n.º 19
0
        public async Task <ResultModel> Run(AcceptParam acceptParam, AppSetting appSetting, HttpContext context)
        {
            var createUserInfoDto = acceptParam.AnalyzeParam <CreateUserInfoReq>();

            string msg;

            if (createUserInfoDto == null)
            {
                return(ResultModel.GetNullErrorModel(string.Empty));
            }

            //设置默认显示名为登录名
            createUserInfoDto.DisplayName = createUserInfoDto.UserName;

            if ((msg = createUserInfoDto.ValidInfo()) != string.Empty)
            {
                return(ResultModel.GetParamErrorModel(string.Empty, msg));
            }

            var conn = appSetting.GetMysqlConn(context);

            var userNameField = EntityTools.GetField <UserInfo>(nameof(UserInfo.UserName));

            //查看用户名是否已存在
            var isExists = await DapperTools.IsExists(conn, EntityTools.GetTableName <UserInfo>(), new List <string>()
            {
                $"{userNameField} = @{userNameField}"
            }, new { createUserInfoDto.UserName });

            if (isExists)
            {
                return(ResultModel.GetParamErrorModel(string.Empty, "用户名已存在!"));
            }

//      Predicates.Field<UserInfo>(u => u.Id > 0, Operator.Eq, true);
//      Predicates.Exists<>()

            var result = await DapperTools.CreateItem(conn, EntityTools.GetTableName <UserInfo>(), createUserInfoDto);

            return(ResultModel.GetSuccessModel(string.Empty, result));
        }
Exemplo n.º 20
0
        public async Task <ResultModel> Run(AcceptParam acceptParam, AppSetting appSetting, HttpContext context, long userId)
        {
            var req = acceptParam.AnalyzeParam <EditArticleReq>();

            if (req == null || req.Id <= 0)
            {
                return(ResultModel.GetNullErrorModel(string.Empty));
            }

            string msg;

            if ((msg = req.ValidInfo()) != string.Empty)
            {
                return(ResultModel.GetParamErrorModel(string.Empty, msg));
            }

            var conn = appSetting.GetMysqlConn(context);

            var result = await DapperTools.SelectiveEdit(conn, new[]
            {
                $"{nameof(BaseModel.Id)} = {req.Id}",
                $"{nameof(BaseModel.ValidFlag)} = {(int) ValidFlagMenu.UseFul}",
                $"{EntityTools.GetField<ArticleInfo>(nameof(ArticleInfo.UserId))}={userId}"
            }, new ArticleInfo()
            {
                Id          = req.Id,
                ArticleType = req.ArticleType,
                Author      = req.Author,
                Category    = string.Join(",", req.Category),
                Content     = req.Content,
                PublishTime = req.PublishTime,
                UpdateTime  = new DateTime(),
                Title       = req.Title,
                Description = req.Description,
                FaceImg     = req.FaceImg,
                Status      = req.Status
            });

            return(ResultModel.GetSuccessModel(result));
        }
Exemplo n.º 21
0
        public async Task <ResultModel> Run(AcceptParam acceptParam, AppSetting appSetting, HttpContext context)
        {
            var req = acceptParam.AnalyzeParam <KeyReq <long> >();

            if (req == null || req.Key <= 0)
            {
                return(ResultModel.GetParamErrorModel());
            }

            var conn = appSetting.GetMysqlConn(context);

            var pageViewField = EntityTools.GetField <ArticleInfo>(nameof(ArticleInfo.PageView));

            var result = await DapperTools.Edit(conn, EntityTools.GetTableName <ArticleInfo>(), new[]
            {
                $"{nameof(BaseModel.Id)} = {req.Key}"
            }, new []
            {
                $"{pageViewField} = {pageViewField} + 1"
            }, null);

            return(ResultModel.GetSuccessModel(result));
        }
Exemplo n.º 22
0
        public async Task <ResultModel> Run(AcceptParam acceptParam, AppSetting appSetting, HttpContext context, long userId)
        {
            var req = acceptParam.AnalyzeParam <SingleActionArticleReq>();

            if (req == null)
            {
                return(ResultModel.GetNullErrorModel());
            }

            string msg;

            if ((msg = req.ValidInfo()) != string.Empty)
            {
                return(ResultModel.GetParamErrorModel(msg));
            }
            if (Enum.TryParse(req.ActionKey, true, out ArticleOptMenu opt))
            {
                var conn = appSetting.GetMysqlConn(context);

                var count = await DapperTools.SelectSingle <int?>(conn, EntityTools.GetTableName <ArticleOptInfo>(),
                                                                  new List <string>()
                {
                    $"{EntityTools.GetField<ArticleOptInfo>(nameof(ArticleOptInfo.OptionType))} = {(int) opt}",
                    $"{EntityTools.GetField<ArticleOptInfo>(nameof(ArticleOptInfo.RelationKey))} = {req.ArticleId}",
                    $"{EntityTools.GetField<ArticleOptInfo>(nameof(ArticleOptInfo.ActionUser))} = {userId}",
                    $"{nameof(BaseModel.ValidFlag)}={(int)ValidFlagMenu.UseFul}"
                }, EntityTools.GetField <ArticleOptInfo>(nameof(ArticleOptInfo.Count)));

                count = count ?? 0;

                return(ResultModel.GetSuccessModel(count));
            }
            else
            {
                return(ResultModel.GetDealErrorModel($"操作<{req.ActionKey}>不存在!"));
            }
        }
Exemplo n.º 23
0
        public async Task <ResultModel> Run(AcceptParam acceptParam, AppSetting appSetting, HttpContext context, long userId)
        {
            var req = acceptParam.AnalyzeParam <CreateArticleCommentReq>();

            if (req == null)
            {
                return(ResultModel.GetNullErrorModel());
            }

            var msg = req.ValidInfo();

            if (msg != string.Empty)
            {
                return(ResultModel.GetParamErrorModel(msg));
            }

            var param = (CreateCommentParam)req;

            param.ActionUser = userId;

            var conn = appSetting.GetMysqlConn(context);

            var result = await DapperTools.CreateItem(conn, EntityTools.GetTableName <CommentInfo>(), param);

            if (result > 0)
            {
//        var task = new BaseSendMsgDeal().Run(new SendMsgReq()
//        {
//          Content = "收到一条评论信息,请赶快查看吧~",
//          MsgType = MsgTypeMenu.Comment,
//          Receiver = req.JoinKey,
//          Sender = userId
//        }, appSetting, context);
            }

            return(ResultModel.GetSuccessModel(result));
        }
Exemplo n.º 24
0
        public async Task <object> Index([FromBody] AcceptParam acceptParam)
        {
            try
            {
                if (Enum.TryParse(acceptParam.OperationFlag, true, out OperationMenu operationMenu))
                {
                    var dealAttribute = operationMenu.GetAttribute <DealAttribute>();

                    if (dealAttribute == null)
                    {
                        return(operationMenu.ToString());
                    }

                    if (dealAttribute.NeedValidSign)
                    {
                        if (acceptParam.Param != null || !ValidSign(acceptParam))
                        {
                            return("验签失败!");
                        }
                    }

                    var resultModel = await Run(acceptParam, AppSetting, dealAttribute);

                    resultModel.Title = dealAttribute.Description;

                    return(resultModel);
                }

                HttpContext.Response.StatusCode = (int)HttpStatusCode.NotFound;
                return(null);
            }
            catch (Exception e)
            {
                return(e);
            }
        }
Exemplo n.º 25
0
    protected void Page_Load(object sender, EventArgs e)
    {
        AcceptParam AP     = new AcceptParam();
        bool        result = false;

        try
        {
            if (!IsPostBack)
            {
                NameValueCollection NC = HttpContext.Current.Request.Form;
                AP.sbLog.Append("\r\n\r\n同步数据参数:\r\n");
                bool   IsValid = false;
                string Val     = "";
                foreach (string key in NC.Keys)
                {
                    Val = HttpUtility.UrlDecode(NC[key]);
                    AP.sbLog.Append(key + "=" + Val + "\r\n");
                    switch (key)
                    {
                    case "Pnr":
                    {
                        AP.m_Pnr = Val;
                        if (string.IsNullOrEmpty(AP.m_Pnr.Trim()))
                        {
                            AP.sbLog.Append("PNR不能为空!");
                            IsValid = true;
                        }
                        break;
                    }

                    case "Office":
                    {
                        AP.m_Office = Val;
                        break;
                    }

                    case "OrderId":
                    {
                        AP.m_OrderId = Val;
                        if (string.IsNullOrEmpty(AP.m_OrderId.Trim()))
                        {
                            AP.sbLog.Append("订单号不能为空!");
                            IsValid = true;
                        }
                        break;
                    }

                    case "LoginName":
                    {
                        AP.m_LoginName = Val;
                        if (string.IsNullOrEmpty(AP.m_LoginName.Trim()))
                        {
                            AP.sbLog.Append("登录账号不能为空!");
                            IsValid = true;
                        }
                        break;
                    }

                    case "CompanyName":
                    {
                        AP.m_CompanyName = Val;
                        if (string.IsNullOrEmpty(AP.m_CompanyName.Trim()))
                        {
                            AP.sbLog.Append("公司名称不能为空!");
                            IsValid = true;
                        }
                        break;
                    }

                    case "Price":
                    {
                        decimal.TryParse(Val, out AP.m_Price);
                        if (AP.m_Price <= 0 || AP.m_Price > 2000000)
                        {
                            AP.sbLog.Append("输入金额超出范围!");
                            IsValid = true;
                        }
                        break;
                    }

                    case "PassengerList":
                    {
                        AP.m_PassengerList = Val;
                        if (string.IsNullOrEmpty(AP.m_PassengerList.Trim()))
                        {
                            AP.sbLog.Append("乘客姓名不能为空!");
                            IsValid = true;
                        }
                        break;
                    }

                    default:
                        break;
                    }
                    if (IsValid)
                    {
                        break;
                    }
                }
                if (IsValid)
                {
                    AP.sbLog.Append("结束==========");
                    PbProject.WebCommon.Log.Log.RecordLog(Page.ToString(), AP.sbLog.ToString(), false, HttpContext.Current.Request);
                }
                else
                {
                    Bill bill = new Bill();
                    //调用同步方法
                    result = bill.TongBuData(AP);
                }
            }
        }
        catch (Exception ex)
        {
            AP.sbLog.Append("页面Pay_ReturnPage_AddPayMoney异常:" + ex.Message);
            PbProject.WebCommon.Log.Log.RecordLog(Page.ToString(), AP.sbLog.ToString(), false, HttpContext.Current.Request);
        }
        finally
        {
            string strResult = "FAIL";
            if (result)
            {
                strResult = "SUCESS";
            }
            else
            {
                strResult = "FAIL";
            }
            HttpContext.Current.Response.Write(strResult);
        }
    }
Exemplo n.º 26
0
        public async Task <ResultModel> Run(AcceptParam acceptParam, AppSetting appSetting, HttpContext context, long userId)
        {
            var req = acceptParam.AnalyzeParam <AttentionUserReq>();

            if (req == null)
            {
                return(ResultModel.GetNullErrorModel());
            }

            var msg = req.ValidInfo();

            if (msg != string.Empty)
            {
                return(ResultModel.GetParamErrorModel(msg));
            }

            if (req.AttentionUser == userId)
            {
                return(ResultModel.GetParamErrorModel());
            }

            var conn = appSetting.GetMysqlConn(context);

            AttentionInfo oldInfo = await DapperTools.GetItem <AttentionInfo>(conn, EntityTools.GetTableName <AttentionInfo>(),
                                                                              new[]
            {
                $"{EntityTools.GetField<AttentionInfo>(nameof(AttentionInfo.AttentionUser))} ={req.AttentionUser}",
                $"{EntityTools.GetField<AttentionInfo>(nameof(AttentionInfo.UserId))} ={userId}",
            },
                                                                              new[]
            {
                nameof(BaseModel.Id),
            });

//      var isExists = await DapperTools.IsExists(conn, EntityTools.GetTableName<AttentionInfo>(),
//        new[]
//        {
//          $"{EntityTools.GetField<AttentionInfo>(nameof(AttentionInfo.AttentionUser))} ={req.AttentionUser}",
//          $"{EntityTools.GetField<AttentionInfo>(nameof(AttentionInfo.UserId))} ={userId}",
//        });

            if (oldInfo == null)
            {
                var param = (CreateAttentionParam)req;

                param.UserId = userId;

                var result = await DapperTools.CreateItem(conn, EntityTools.GetTableName <AttentionInfo>(), param);

                return(ResultModel.GetSuccessModel(result));
            }
            else
            {
                var editParam = new
                {
                    UpdateTime = DateTime.Now,
                    ValidFlag  = (int)ValidFlagMenu.UseFul,
                    req.Description,
                    req.GroupKey,
                };

                var setFieldList = new List <string>();

                setFieldList.Add(nameof(BaseModel.UpdateTime));
                setFieldList.Add(nameof(BaseModel.ValidFlag));

                var result = await DapperTools.Edit(conn, EntityTools.GetTableName <AttentionInfo>(), new[]
                {
                    $"{nameof(BaseModel.Id)}={oldInfo.Id}"
                }, null, editParam);

                return(ResultModel.GetSuccessModel(result));
            }
        }
Exemplo n.º 27
0
        public async Task <ResultModel> Run(AcceptParam acceptParam, AppSetting appSetting, HttpContext context, long userId)
        {
            var req = acceptParam.AnalyzeParam <SingleActionArticleReq>();

            if (req == null)
            {
                return(ResultModel.GetNullErrorModel());
            }

            string msg;

            if ((msg = req.ValidInfo()) != string.Empty)
            {
                return(ResultModel.GetParamErrorModel(msg));
            }

            if (Enum.TryParse(req.ActionKey, true, out ArticleOptMenu opt))
            {
                var conn = appSetting.GetMysqlConn(context);

                var info = await DapperTools.GetItem <ArticleOptInfo>(conn, EntityTools.GetTableName <ArticleOptInfo>(),
                                                                      new List <string>()
                {
                    $"{EntityTools.GetField<ArticleOptInfo>(nameof(ArticleOptInfo.OptionType))} = {(int) opt}",
                    $"{EntityTools.GetField<ArticleOptInfo>(nameof(ArticleOptInfo.RelationKey))} = {req.ArticleId}",
                    $"{EntityTools.GetField<ArticleOptInfo>(nameof(ArticleOptInfo.ActionUser))} = {userId}",
                }, new[]
                {
                    nameof(BaseModel.Id),
                    nameof(BaseModel.ValidFlag)
                }, null);

                //        var validFlag = await DapperTools.SelectSingle<int?>(conn, EntityTools.GetTableName<ArticleOptInfo>(),
                //          new List<string>()
                //          {
                //            $"{nameof(BaseModel.Id)} = {req.ArticleId}",
                //            $"{EntityTools.GetField<ArticleOptInfo>(nameof(ArticleOptInfo.OptionType))} = {(int) opt}",
                //            $"{EntityTools.GetField<ArticleOptInfo>(nameof(ArticleOptInfo.RelationKey))} = {req.ArticleId}",
                //          }, nameof(BaseModel.ValidFlag));

                if (info != null)
                {
                    EditValidFlagParam param = new EditValidFlagParam()
                    {
                        Id         = info.Id,
                        UpdateTime = DateTime.Now
                    };
                    if (info.ValidFlag == (int)ValidFlagMenu.UnUseFul)
                    {
                        param.ValidFlag = ValidFlagMenu.UseFul;
                    }
                    else
                    {
                        param.ValidFlag = ValidFlagMenu.UnUseFul;
                    }

                    var result = await DapperTools.Edit(conn, EntityTools.GetTableName <ArticleOptInfo>(), new[]
                    {
                        $"{nameof(BaseModel.Id)} = {info.Id}",
                        $"{EntityTools.GetField<ArticleOptInfo>(nameof(ArticleOptInfo.ActionUser))} = {userId}",
                    }, null, param);


                    return(ResultModel.GetSuccessModel(null, $"修改成功-{result}"));
                }
                else
                {
                    var param = new CreateArticleOptInfoParam()
                    {
                        ActionKey   = opt.ToString(),
                        Count       = 1,
                        OptionType  = (int)opt,
                        RelationKey = req.ArticleId,
                        ActionUser  = userId
                    };

                    var result = await DapperTools.CreateItem(conn, EntityTools.GetTableName <ArticleOptInfo>(), param);

                    return(ResultModel.GetSuccessModel(null, $"添加成功-{result}"));
                }

//        return ResultModel.GetSuccessModel(validFlag);

//        if (await DapperTools.IsExists(conn, EntityTools.GetTableName<ArticleOptInfo>(), new List<string>()
//        {
//          $"{nameof(BaseModel.Id)} = {req.ArticleId}",
//          $"{EntityTools.GetField<ArticleOptInfo>(nameof(ArticleOptInfo.OptionType))} = {(int)opt}",
//          $"{EntityTools.GetField<ArticleOptInfo>(nameof(ArticleOptInfo.RelationKey))} = {req.ArticleId}",
//        }))
//        {
//          return ResultModel.GetDealErrorModel("请勿重复操作!");
//        }
//        else
//        {
//
//          var param = new CreateArticleOptInfoParam()
//          {
//            ActionKey = opt.ToString(),
//            Count = 1,
//            OptionType = (int) opt,
//            RelationKey = req.ArticleId
//          };
//
//          var result = await DapperTools.CreateItem(conn, EntityTools.GetTableName<ArticleOptInfo>(), param);
//
//          return ResultModel.GetSuccessModel(result);
//
//        }
            }
            else
            {
                return(ResultModel.GetDealErrorModel($"操作<{req.ActionKey}>不存在!"));
            }
        }
Exemplo n.º 28
0
        public async Task <ResultModel> Run(AcceptParam acceptParam, AppSetting appSetting, HttpContext context)
        {
            //解析参数
            var pageModel = acceptParam.AnalyzeParam <PageModel <ArticlePageFilterReq> >();

            if (pageModel == null)
            {
                return(ResultModel.GetNullErrorModel(string.Empty));
            }

            var publishTimeFieldName = EntityTools.GetField <ArticleInfo>(nameof(ArticleInfo.PublishTime));

            //动态sql
            var whereArr = new List <string>()
            {
                $"{publishTimeFieldName} <= @{publishTimeFieldName}"
            };//只返回已发布的文章

            if (pageModel.Result.ValidFlag != null && pageModel.Result.ValidFlag >= 0)
            {
                whereArr.Add($@"
{EntityTools.GetField<ArticleInfo>(nameof(ArticleInfo.ValidFlag))} = {pageModel.Result.ValidFlag}
");
            }

            if (pageModel.Result.ArticleType != null && pageModel.Result.ArticleType > 0)
            {
                whereArr.Add($@"
{EntityTools.GetField<ArticleInfo>(nameof(ArticleInfo.ArticleType))} = {pageModel.Result.ArticleType}
");
            }

//      if (pageModel.Result.FilterType == 1)
//      {
//        whereArr.Add($@"
//{EntityTools.GetField<ArticleInfo>(nameof(ArticleInfo.UserId))} = {acceptParam.GetUserId()}
//");
//      }

            //获取连接
            var mysqlConn = appSetting.GetMysqlConn();

            var dbConnection = context.GetConnection(mysqlConn.FlagKey, mysqlConn.ConnStr);

            var param = new ArticleInfo()
            {
                PublishTime = DateTime.Now
            };

            //采用工具类分页查询
            var pageList = await DapperTools.GetPageList <ArticleInfo>(pageModel.PageNo, pageModel.PageSize, dbConnection,
                                                                       whereArr, param);

            //返回结果集
            return(ResultModel.GetSuccessModel(string.Empty, pageList));

//      var count = await dbConnection.QueryFirstAsync<int>($@"
//{SqlCharConst.SELECT} {SqlCharConst.COUNT}(1)
//{SqlCharConst.FROM} {EntityTools.GetTableName<ArticleInfo>()}
//{whereBuilder}
//");
//
//      PageModel<IEnumerable<ArticleInfo>> resultPage = new PageModel<IEnumerable<ArticleInfo>>()
//      {
//        Count = count,
//        PageNo = pageModel.PageNo,
//        PageSize = pageModel.PageSize
//      };
//
//      if ((pageModel.PageNo - 1) * pageModel.PageSize <= count)
//      {
//        IEnumerable<ArticleInfo> articleInfos = await dbConnection.QueryAsync<ArticleInfo>($@"
//{SqlCharConst.SELECT} {string.Join(",", EntityTools.GetFields<ArticleInfo>())}
//{SqlCharConst.FROM} {EntityTools.GetTableName<ArticleInfo>()}
//{whereBuilder}
//
//{SqlCharConst.ORDERBY} {EntityTools.GetField<ArticleInfo>(nameof(ArticleInfo.Id))} {SqlCharConst.DESC}
//
//{SqlCharConst.LIMIT} {(pageModel.PageNo - 1) * pageModel.PageSize},{pageModel.PageSize}
//
//");
//
//        resultPage.Result = articleInfos.ToList();
//      }
//
//      return ResultModel.GetSuccessModel(string.Empty, resultPage);
        }
Exemplo n.º 29
0
        public async Task <ResultModel> Run(AcceptParam acceptParam, AppSetting appSetting, HttpContext context, long userId)
        {
            var req = acceptParam.AnalyzeParam <PageModel <AttentionPageFilterReq> >();

            if (req == null || req.PageNo == 0 || req.Result == null)
            {
                return(ResultModel.GetParamErrorModel());
            }

            var conn            = appSetting.GetMysqlConn(context);
            var attentionMapper = typeof(AttentionInfo).GetCustomAttribute <TableMapperAttribute>();
            var userMapper      = typeof(UserInfo).GetCustomAttribute <TableMapperAttribute>();

            var joinRelation = string.Empty;

            var whereList = new List <string>()
            {
                $"{attentionMapper.Alias}.{nameof(BaseModel.ValidFlag)}={(int) ValidFlagMenu.UseFul}"
            };

            if (req.Result.FilterType == 1)
            {
                whereList.Add(
                    $"{attentionMapper.Alias}.{EntityTools.GetField<AttentionInfo>(nameof(AttentionInfo.AttentionUser))}={userId}");
                joinRelation = $"{attentionMapper.Alias}.userId = {userMapper.Alias}.id";
            }
            else
            {
                whereList.Add(
                    $"{attentionMapper.Alias}.{EntityTools.GetField<AttentionInfo>(nameof(AttentionInfo.UserId))}={userId}");
                joinRelation = $"{attentionMapper.Alias}.attentionUser = {userMapper.Alias}.id";
            }

            var whereSql = DapperTools.GetWhereSql(whereList);

            var selectCountSql = $@"
{SqlCharConst.SELECT} {SqlCharConst.COUNT}(1) 
{SqlCharConst.FROM} {attentionMapper.TableName} {SqlCharConst.AS} {attentionMapper.Alias}
{whereSql}
";

            Logger.Debug(selectCountSql);

            var count = await conn.QueryFirstAsync <int>(selectCountSql);

            var resultPage = new PageModel <IEnumerable <AttentionInfoDto> >()
            {
                Count    = count,
                PageNo   = req.PageNo,
                PageSize = req.PageSize
            };

            if ((req.PageNo - 1) * req.PageSize <= count)
            {
                var fieldList = new List <string>();
                fieldList.AddRange(EntityTools.GetFields <AttentionInfoDto>($"{attentionMapper.Alias}."
                                                                            , null
                                                                            , (propertyInfo => propertyInfo.Name != nameof(AttentionInfoDto.UserInfo))));
                fieldList.AddRange(EntityTools.GetFields <UserInfoDto>($"{userMapper.Alias}."));

                var pageSql = $@"
{SqlCharConst.SELECT} 
	{string.Join(',', fieldList)}

{SqlCharConst.FROM} 
  {attentionMapper.TableName} {SqlCharConst.AS} {attentionMapper.Alias}
	{SqlCharConst.INNER} {SqlCharConst.JOIN} 
    {userMapper.TableName} {SqlCharConst.AS} {userMapper.Alias}
      {SqlCharConst.ON} {joinRelation}

{DapperTools.GetWhereSql(whereList)}

{SqlCharConst.ORDERBY}

  {attentionMapper.Alias}.{nameof(BaseModel.UpdateTime)} {SqlCharConst.DESC},
  {attentionMapper.Alias}.{nameof(BaseModel.CreateTime)} {SqlCharConst.DESC}

{SqlCharConst.LIMIT} {(req.PageNo - 1) * req.PageSize},{req.PageSize}
";

                Logger.Debug(pageSql);

                var info = await conn.QueryAsync <AttentionInfoDto, UserInfoDto, AttentionInfoDto>(pageSql,
                                                                                                   (attention, user) =>
                {
                    attention.UserInfo = user;
                    return(attention);
                }
                                                                                                   //The field we should split and read the second object from (default: "Id")
                                                                                                   //当select中的列出现 不同表的重复列名 需要使用在此配置
                                                                                                   //,splitOn: "Name,BookID"
                                                                                                   );

                resultPage.Result = info.ToList();

//        return ResultModel.GetSuccessModel(info);
            }
            //      var result = await DapperTools.GetPageList<AttentionInfo>(req.PageNo, req.PageSize, conn, whereList);

            //      return ResultModel.GetSuccessModel(result);

            return(ResultModel.GetSuccessModel(resultPage));
        }
Exemplo n.º 30
0
        public async Task <ResultModel> Run(AcceptParam acceptParam, AppSetting appSetting, HttpContext context, long userId)
        {
            //解析参数
            var pageModel = acceptParam.AnalyzeParam <PageModel <ArticlePageFilterAuthReq> >();

            if (pageModel == null)
            {
                return(ResultModel.GetNullErrorModel(string.Empty));
            }

            //动态sql
            var whereArr = new List <string>()
            {
                $"{EntityTools.GetField<ArticleInfo>(nameof(ArticleInfo.ValidFlag))} = {(int) ValidFlagMenu.UseFul}",
                $"{EntityTools.GetField<ArticleInfo>(nameof(ArticleInfo.UserId))} = {userId}"
            };

            var tableMapper = typeof(ArticleInfo).GetCustomAttribute <TableMapperAttribute>();

            var fields = EntityTools.GetFields <ArticleInfo>().ToList();

            fields.Add($@"
(
  {SqlCharConst.SELECT} {SqlCharConst.COUNT}(0)
	{SqlCharConst.FROM} {EntityTools.GetTableName<CommentInfo>()}
	{SqlCharConst.WHERE} {EntityTools.GetField<CommentInfo>(nameof(CommentInfo.CommentType))} = {(int) CommentTypeMenu.Article}
	{SqlCharConst.AND} {EntityTools.GetField<CommentInfo>(nameof(CommentInfo.JoinKey))} = {tableMapper.Alias}.{nameof(BaseModel.Id)}
  {SqlCharConst.AND} {nameof(BaseModel.ValidFlag)} = {(int) ValidFlagMenu.UseFul}
) {SqlCharConst.AS} {EntityTools.GetField<ArticleInfoDto>(nameof(ArticleInfoDto.CommentCount))}
"); //评论数量

            fields.Add($@"
(
  {SqlCharConst.SELECT} {SqlCharConst.COUNT}(0)
	{SqlCharConst.FROM} {EntityTools.GetTableName<ArticleOptInfo>()}
	{SqlCharConst.WHERE} {EntityTools.GetField<ArticleOptInfo>(nameof(ArticleOptInfo.OptionType))} = {(int) ArticleOptMenu.Like}
	{SqlCharConst.AND} {EntityTools.GetField<ArticleOptInfo>(nameof(ArticleOptInfo.RelationKey))} = {tableMapper.Alias}.{nameof(BaseModel.Id)}
  {SqlCharConst.AND} {nameof(BaseModel.ValidFlag)} = {(int) ValidFlagMenu.UseFul}
) {SqlCharConst.AS} {EntityTools.GetField<ArticleInfoDto>(nameof(ArticleInfoDto.LikeCount))}
"); //点赞数量

            if (pageModel.Result != null && pageModel.Result.ArticleType > 0)
            {
                if (pageModel.Result.ArticleType > 0)
                {
                    whereArr.Add($@"
{EntityTools.GetField<ArticleInfo>(nameof(ArticleInfo.ArticleType))} = {pageModel.Result.ArticleType}
");
                }

                if (pageModel.Result.FilterType == 1)
                {
                    whereArr.Add($@"
{SqlCharConst.EXISTS} (

	{SqlCharConst.SELECT} * {SqlCharConst.FROM} {EntityTools.GetTableName<ArticleOptInfo>()}
	{SqlCharConst.WHERE} {EntityTools.GetField<ArticleOptInfo>(nameof(ArticleOptInfo.OptionType))} = {(int) ArticleOptMenu.Collect}
	{SqlCharConst.AND} {nameof(BaseModel.ValidFlag)} = {(int) ValidFlagMenu.UseFul}
	{SqlCharConst.AND} {EntityTools.GetField<ArticleOptInfo>(nameof(ArticleOptInfo.ActionUser))} = {userId}
	{SqlCharConst.AND} {EntityTools.GetField<ArticleOptInfo>(nameof(ArticleOptInfo.RelationKey))} = {tableMapper.Alias}.{nameof(BaseModel.Id)}
	
)
");
                }
                else if (pageModel.Result.FilterType == 2)
                {
                    whereArr.Add($"{EntityTools.GetField<ArticleInfo>(nameof(ArticleInfo.UserId))} = {userId}");
                }
            }


            //获取连接
            var mysqlConn = appSetting.GetMysqlConn();

            var dbConnection = context.GetConnection(mysqlConn.FlagKey, mysqlConn.ConnStr);

            //采用工具类分页查询
            var pageList = await DapperTools.GetPageList <ArticleInfoDto>(pageModel.PageNo, pageModel.PageSize, dbConnection,
                                                                          tableMapper.TableName,
                                                                          whereArr, fields, new[]
            {
                SqlCharConst.DefaultOrder
            }, tableMapper.Alias, pageModel.Result);

            //返回结果集
            return(ResultModel.GetSuccessModel(string.Empty, pageList));
        }