using Dapper; using System; using WX.CRM.Common; using WX.CRM.DataSynFactory.Dao; using static WX.CRM.DataSynFactory.Templates.web_OrderDto; namespace WX.CRM.DataSynFactory.Cmd { public class web_RefundOrder_IMP : Interfaces.IDataImportSvr { public bool GenerateBusinessOne(web_RefundOrder t) { try { using (var db = WebStore.GetConnection()) { var count = db.ExecuteScalar("select count(*) from OrderLog where SzzyOrderId = @SzzyOrderId", new { SzzyOrderId = t.OrderId }); if (count <= 0) { return false; } var sql = "update OrderLog set orderstatus = @orderstatus where SzzyOrderId = @SzzyOrderId"; db.Execute(sql, new { orderstatus = t.OrderStatus, SzzyOrderId = t.OrderId }); } return true; } catch (Exception ex) { LogHelper.Error(ex.ToString()); return false; } } } }