//多线程类,启动线程
public class ThreadOpdata
{
public static Thread t;
public ThreadOpdata(long mainDigitalId,long bindDigitalId)
{
t = new Thread(()=>{
UpdateData ud = new UpdateData();
ud.DoUpdateData(mainDigitalId,bindDigitalId);
});
t.Start();
}
}
//处理类
public class UpdateData
{
private static ILog logger = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
public void DoUpdateData(long mainDigitalId, long bindDigitalId)
{
PhoneWhiteListRepostory trepo = new PhoneWhiteListRepostory();
trepo.UpdateAboutDatas(mainDigitalId, bindDigitalId);
logger.Error("成功修改PhoneBindUser,ActiveCodeInfo表的相关Id,mainDigitalId:" + mainDigitalId + ",bindDigitalId:" + bindDigitalId);
}
}
//调用
ThreadOpdata to = new ThreadOpdata(mainDigitalId,bindDigitalId);