Discuz.Web.Services/Manyou/Actions/Site.cs

(开头部分) 4KB

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

using System;
using System.Text;
using System.Data;

using Discuz.Common;
using Discuz.Config;
using Discuz.Entity;
using Discuz.Forum;
using Newtonsoft.Json;
using System.Collections.Generic;

namespace Discuz.Web.Services.Manyou.Actions
{
    public class Site : ActionBase
    {
        public string GetAllUsers()
        {
            GetAllUsersParams actionParams = JavaScriptConvert.DeserializeObject<GetAllUsersParams>(JsonParams);

            int pageSize = actionParams.ReadCount;
            int pageIndex = (actionParams.From / pageSize) + 1;

            DataTable dt = Forum.Users.GetUserListOnService(pageSize, pageIndex, "", "");
            List<FullUserInfo> fullUserList = new List<FullUserInfo>();

            foreach (DataRow dataRow in dt.Rows)
            {
                FullUserInfo fullUserInfo = new FullUserInfo();
                fullUserInfo.Uid = TypeConverter.ObjectToInt(dataRow["uid"]);
                fullUserInfo.UserName = dataRow["username"].ToString().Trim();
                fullUserInfo.FriendsArray = GetUserFriendList(fullUserInfo.Uid, pageSize);
                fullUserList.Add(fullUserInfo);
            }

            GetAllUsersResponse gauResponse = new GetAllUsersResponse();
            gauResponse.FullUserList.AddRange(fullUserList);
            gauResponse.TotalNum = Forum.Users.GetUserCount("");

            return GetResult(gauResponse);
        }

        public string GetUpdatedUsers()
        {
            GetUpdatedUsers actionParams = JavaScriptConvert.DeserializeObject<GetUpdatedUsers>(JsonParams);

            List<UserLogInfo> userLogList = ManyouApplications.GetUserLog(actionParams.Count);

            List<UserInfoWithAction> userInfoWithActionList = new List<UserInfoWithAction>();

            foreach (UserLogInfo userLogInfo in userLogList)
            {
                UserInfoWithAction userInfoWithAction = new UserInfoWithAction();
                userInfoWithAction.Action = userLogInfo.Action.ToString();
                if (userLogInfo.Action != UserLogActionEnum.Delete)
                {
                    Discuz.Entity.UserInfo userInfo = Forum.Users.GetUserInfo(userLogInfo.UId);
                    userInfoWithAction.UserName = userInfo.Username;
                }
                userInfoWithAction.Action = userLogInfo.Action.ToString().ToLower();
                userInfoWithAction.Uid = userLogInfo.UId;
后面还有 51 行代码,解锁后查看完整代码

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

AI 解读 AI

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

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