51 lines
1.6 KiB
C#
51 lines
1.6 KiB
C#
using CRM.Core.DTO.AliYunSub;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using WX.CRM.BLL.Base;
|
|
using WX.CRM.BLL.Soft;
|
|
using WX.CRM.Common;
|
|
using WX.CRM.DataSynFactory.Templates;
|
|
using UserInfo = CRM.Core.DTO.AliYunSub.UserInfo;
|
|
|
|
namespace WX.CRM.DataSynFactory.Cmd
|
|
{
|
|
public class Client_AliyunSub_IMP : Interfaces.IDataImportSvr<Client_AliyunSub>
|
|
{
|
|
|
|
public bool GenerateBusinessOne(Client_AliyunSub t)
|
|
{
|
|
try
|
|
{
|
|
var bl = new SOFT_USERINFO_SUB_BL();
|
|
AliYunSubInfo info = new AliYunSubInfo();
|
|
info.type = t.type;
|
|
info.data = new List<UserInfo>();
|
|
foreach (var item in t.data)
|
|
{
|
|
info.data.Add(new UserInfo()
|
|
{
|
|
appid = item.appid,
|
|
type = item.type,
|
|
appuserid = item.appuserid,
|
|
ch = item.ch,
|
|
cid = item.cid,
|
|
mobile = item.mobile,
|
|
resid = item.resid,
|
|
uid = item.uid,
|
|
unionid = item.unionid
|
|
|
|
});
|
|
}
|
|
bl.UserInfoSubLog(new Model.Entity.SOFT_USERINFO_SUBLOG() { ID = new SEQUENCES_BL().Seq_base_get(), CTIME = DateTime.Now, TYPE = t.type, DATA = t.data.ToJson() });
|
|
return bl.UserInfoSubInDb(info);
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
LogHelper.Error(ex.ToString());
|
|
return false;
|
|
}
|
|
}
|
|
}
|
|
|
|
}
|