TG.WXCRM.V4/WX.CRM.DataSynFactory/Cmd/Server_WxUserResid_IMP.cs

34 lines
896 B
C#
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

using Dapper;
using System;
using WX.CRM.Common;
using WX.CRM.DataSynFactory.Dao;
using WX.CRM.DataSynFactory.Templates;
namespace WX.CRM.DataSynFactory.Cmd
{
public class Server_WxUserResid_IMP : Interfaces.IDataImportSvr<Server_WxUserResid>
{
public bool GenerateBusinessOne(Server_WxUserResid t)
{
try
{
using (var db = ZxdStore.GetConnection())
{
var sql = @"
INSERT INTO wx_username_resid(resid,username,deptcode)
values(@resid,@username,@deptcode)
on duplicate key update putnum = putnum+1; ";
db.Execute(sql, t);
}
return true;
}
catch (Exception ex)
{
LogHelper.Error("Server_WwextUserResid_IMP" + ex.ToString());
return false;
}
}
}
}