79 lines
2.5 KiB
C#
79 lines
2.5 KiB
C#
using Newtonsoft.Json;
|
|
using System;
|
|
using WX.CRM.Common;
|
|
|
|
namespace WX.CRM.Model.DTO.wework
|
|
{
|
|
public class Rcontact
|
|
{
|
|
public string avatorUrl { get; set; }
|
|
public long corpid { get; set; }
|
|
public Extra extras { get; set; }
|
|
public string mobile { get; set; }
|
|
public string name { get; set; }
|
|
public string job { get; set; }
|
|
public long remoteId { get; set; }//好友ID
|
|
public long vid { get; set; }//工作微信ID
|
|
public string unionid { get; set; }
|
|
public Object userDeptInfoList { get; set; }
|
|
public string GetUserDeptInfoJson()
|
|
{
|
|
return JsonConvert.SerializeObject(userDeptInfoList);
|
|
}
|
|
|
|
public class Extra
|
|
{
|
|
public int[] companyRemark { get; set; }//企业微信信息
|
|
public long customerAddTime { get; set; }
|
|
public RemarkPhone[] remarkPhone { get; set; }//号码备注
|
|
public string remarks { get; set; }//描述
|
|
|
|
public string GetCompanyRemark()
|
|
{
|
|
return Utility.JavaByteToString(companyRemark);
|
|
}
|
|
public string GetRemarkPhone()
|
|
{
|
|
if (remarkPhone == null || remarkPhone.Length == 0)
|
|
{
|
|
return "";
|
|
}
|
|
string phones = string.Empty;
|
|
int i = 0;
|
|
foreach (var item in remarkPhone)
|
|
{
|
|
if (i == 0)
|
|
phones += item.GetPhone();
|
|
else
|
|
phones += "," + item.GetPhone();
|
|
i++;
|
|
}
|
|
return phones;
|
|
}
|
|
public class RemarkPhone
|
|
{
|
|
public int[] phone { get; set; }
|
|
public string GetPhone()
|
|
{
|
|
//return System.Text.Encoding.UTF8.GetString(Utility.JavaByteChnageNETByte(phone));
|
|
return Utility.JavaByteToString(phone);
|
|
|
|
}
|
|
}
|
|
|
|
public int[] realRemark { get; set; }//名称备注
|
|
public string GetRealRemark()//名称备注
|
|
{
|
|
return Utility.JavaByteToString(realRemark);
|
|
//return System.Text.Encoding.UTF8.GetString(Utility.JavaByteChnageNETByte(realRemark));
|
|
}
|
|
}
|
|
|
|
public string GetRconactMD5()
|
|
{
|
|
string str = JsonConvert.SerializeObject(this);
|
|
return Utility.EncryptMD5(str);
|
|
}
|
|
}
|
|
}
|