using System;
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using PCRobot.Entitys.Enterprise;
using PCRobot.Utils;
namespace PCRobot.PCWechat
{
public enum WechatType
{
///
/// 普通微信
///
Xiaoxie = 1,
///
/// 企业微信
///
Xiaoxie_QY = 2,
}
public class WechatUser
{
public WechatUser() { }
///
/// 是否在检测僵尸粉
///
internal bool IsZombizRun = false;
///
/// 是否在获取信息操作中集合
///
public Dictionary IsGetDic { get; set; } = new Dictionary();
///
/// 是否在获取群成员信息/好友信息/搜索信息/企业Cdn下载/通过好友
///
public Dictionary IsGetContactDic { get; internal set; } = new Dictionary();
///
/// 是否在获取朋友圈数据/上传朋友圈图片
///
internal Dictionary IsOperCirCleInfoDic { get; set; } = new Dictionary();
///
/// 类型
///
public WechatType Type { get; set; }
///
/// 句柄ID
///
public int Pid { get; set; }
///
/// 客户端ID
///
public uint DwClientId { get; set; }
///
/// 微信ID
///
public string Wxid { get; set; }
///
/// 昵称
///
public string Nickname { get; set; }
///
/// 头像地址
///
public string HeaderUrl { get; set; }
///
/// 用户数据库地址
///
public string DBFile { get; set; }
public string Phone { get; set; }
///
/// 生命周期
///
public DateTime HeartBreakTime { get; set; } = DateTime.Now;
///
/// 微信Uin
///
public string Uin { get; internal set; }
///
/// 个人微信用户数据
///
public Dictionary Friends = new Dictionary();
///
/// 个人群组数据
///
public Dictionary Groups = new Dictionary();
///
/// 企业微信用户数据
///
public Dictionary WorkFriends { get; internal set; } = new Dictionary();
///
/// 企业微信群组数据
///
public Dictionary WorkGroups { get; internal set; } = new Dictionary();
///
/// 企业搜索用户数据
///
public Dictionary FriendHandlerDic { get; internal set; } = new Dictionary();
///
/// 企业Cdn文件数据
///
public Dictionary FileC2cCdnInfoDic { get; internal set; } = new Dictionary();
///
/// 自动登录授权小程序
///
public Dictionary AutoAuthLoginMiNiApps = new Dictionary();
///
/// 朋友圈上传图片,返回网络地址
///
public Dictionary UpLoadImages = new Dictionary();
///
/// 发送朋友圈后返回的id
///
public string SendCircleId;
///
/// 朋友圈数据保存,key为用户账号(0为非指定用户数据)
///
internal Dictionary CirCleInfoOriDic { get; set; } = new Dictionary();
}
///
/// 获取普通微信运行类型
///
public enum RobotIsRunType
{
获取收藏 = 0,
获取群列表 = 1,
获取好友列表 = 2,//如果是企业获取的是外部好友列表
获取公众号列表 = 3,
上传朋友圈图片 = 4,
获取未读消息数量 = 5,
发送朋友圈 = 6,
创建群 = 7,
//企业特有
获取内部好友列表 = 50,
获取自己的二维码 = 51,
创建空外部群 = 52,
}
public class FriendBase
{
///
/// 昵称
///
public string nickname { get; set; }
///
/// 备注
///
public string remark { get; set; }
///
/// 群主ID
///
public string manager_wxid { get; set; } = string.Empty;
///
/// 是否为管理员
///
public int is_manager { get; set; } = 0;
///
/// 群成员
///
public string member_list { get; set; } = string.Empty;
}
///
/// 个人微信信息
///
public class FriendInfo : FriendBase
{
///
/// wxid
///
public string wxid { get; set; }
///
/// 微信号
///
public string account { get; set; }
///
/// 头像地址
///
public string avatar { get; set; }
///
/// 性别 0未知,1男,2女
///
public int sex { get; set; }
///
/// 祖国
///
public string country { get; set; }
///
/// 省份
///
public string province { get; set; }
///
/// 城市
///
public string city { get; set; }
///
/// 是否是僵尸粉
///
public int is_zombie { get; set; } = -1;
}
///
/// 个人微信群信息
///
public class GroupInfo : GroupBase
{
public string wxid { get; set; }
///
/// 昵称
///
public string nickname { get; set; }
///
/// 群头像
///
public string avatar { get; set; }
/////
///// 群主ID
/////
//public string manager_wxid { get; set; }
/////
///// 是否为管理员
/////
//public int is_manager { get; set; }
///
/// 群人数
///
public int total_member { get; set; }
///
/// 群成员
///
public List friends { get; set; }
}
///
/// 群基类
///
public class GroupBase
{
}
///
/// 企业用户信息
///
public class WorkFriendInfo : FriendBase
{
///
/// 账号
///
public string acctid { get; set; }
///
/// 手机号
///
public string mobile { get; set; }
///
/// 头像
///
public string avatar { get; set; }
///
/// 会话id
///
public string conversation_id { get; set; }
///
/// 公司ID
///
public string corp_id { get; set; }
///
/// 用户描述
///
public string desc { get; set; }
///
/// 对外职位名称
///
public string external_job { get; set; }
///
/// 公司内部职位
///
public string position { get; set; }
///
/// 真实姓名
///
public string realname { get; set; }
///
/// 性别
///
public int sex { get; set; }
///
/// 用户ID
///
public string user_id { get; set; }
///
/// 用户名称
///
public string username { get; set; }
}
///
/// 企业群数据
///
public class WorkGroupInfo : GroupBase
{
//{"conversation_id":"R:1970325073072411","create_user_id":"1688853956450720","is_manager":0,"nickname":"网络科技有限公司","total":5}
///
/// 会话ID
///
public string conversation_id { get; set; }
/////
///// 群主
/////
//public string create_user_id { get; set; }
/////
///// 是否是管理员
/////
//public int is_manager { get; set; }
///
/// 群昵称
///
public string GroupNick { get; set; }
///
/// 群人数
///
public int total { get; set; }
///
/// 群成员
///
public List friends { get; set; }
}
}