Commit 906985ab authored by liudong1993's avatar liudong1993
parents 011e77de 64c6431e
...@@ -75,12 +75,14 @@ namespace Mall.Module.User ...@@ -75,12 +75,14 @@ namespace Mall.Module.User
return list; return list;
} }
/// <summary>
/// 添加修改供应商
/// </summary>
/// <param name="model"></param>
/// <returns></returns>
public bool AddOrUpdateSupplier(RB_Supplier_Extend model) public bool AddOrUpdateSupplier(RB_Supplier_Extend model)
{ {
bool flag = false; bool flag = false;
// var trans = supplierRepository.DbTransaction;
try try
{ {
...@@ -91,30 +93,21 @@ namespace Mall.Module.User ...@@ -91,30 +93,21 @@ namespace Mall.Module.User
model.Status = (int)Common.Enum.DateStateEnum.Normal; model.Status = (int)Common.Enum.DateStateEnum.Normal;
var id = clientBankAccountRepository.Insert(model.ClientBankAccount); var id = clientBankAccountRepository.Insert(model.ClientBankAccount);
model.BankAccountId = id; model.BankAccountId = id;
//IDictionary<string, object> fileds = new Dictionary<string, object>()
//{
// { nameof(RB_ClientBankAccount.SupplierId),model.ID}
//};
//IList<WhereHelper> whereHelpers = new List<WhereHelper>()
//{
// new WhereHelper (){ FiledName=nameof(RB_ClientBankAccount.ID),FiledValue=id,OperatorEnum=OperatorEnum.Equal}
//};
//flag = clientBankAccountRepository.Update(fileds, whereHelpers);
flag = id > 0; flag = id > 0;
} }
else else
{ {
IDictionary<string, object> fileds = new Dictionary<string, object>() IDictionary<string, object> fileds = new Dictionary<string, object>()
{ {
{ nameof(RB_ClientBankAccount.Type),(int)model.ClientBankAccount.Type}, { nameof(RB_ClientBankAccount.Type),(int)model.ClientBankAccount.Type},
{ nameof(RB_ClientBankAccount.ObjID),model.ClientBankAccount.ObjID}, { nameof(RB_ClientBankAccount.ObjID),model.ClientBankAccount.ObjID},
{ nameof(RB_ClientBankAccount.BankId),model.ClientBankAccount.BankId}, { nameof(RB_ClientBankAccount.BankId),model.ClientBankAccount.BankId},
{ nameof(RB_ClientBankAccount.OpenBankName),model.ClientBankAccount.OpenBankName}, { nameof(RB_ClientBankAccount.OpenBankName),model.ClientBankAccount.OpenBankName},
{ nameof(RB_ClientBankAccount.AccountHolder),model.ClientBankAccount.AccountHolder}, { nameof(RB_ClientBankAccount.AccountHolder),model.ClientBankAccount.AccountHolder},
{ nameof(RB_ClientBankAccount.CardNum),model.ClientBankAccount.CardNum}, { nameof(RB_ClientBankAccount.CardNum),model.ClientBankAccount.CardNum},
{ nameof(RB_ClientBankAccount.AccountAlias),model.ClientBankAccount.AccountAlias}, { nameof(RB_ClientBankAccount.AccountAlias),model.ClientBankAccount.AccountAlias},
{ nameof(RB_ClientBankAccount.Status),model.ClientBankAccount.Status}, { nameof(RB_ClientBankAccount.Status),model.ClientBankAccount.Status},
{ nameof(RB_ClientBankAccount.AccountClassify),model.ClientBankAccount.AccountClassify} { nameof(RB_ClientBankAccount.AccountClassify),model.ClientBankAccount.AccountClassify}
}; };
IList<WhereHelper> whereHelpers = new List<WhereHelper>() IList<WhereHelper> whereHelpers = new List<WhereHelper>()
{ {
...@@ -188,7 +181,6 @@ namespace Mall.Module.User ...@@ -188,7 +181,6 @@ namespace Mall.Module.User
{ {
model.Status = (int)Common.Enum.DateStateEnum.Normal; model.Status = (int)Common.Enum.DateStateEnum.Normal;
var id = clientBankAccountRepository.Insert(model.ClientBankAccount); var id = clientBankAccountRepository.Insert(model.ClientBankAccount);
if (id > 0) if (id > 0)
{ {
model.BankAccountId = id; model.BankAccountId = id;
...@@ -203,26 +195,13 @@ namespace Mall.Module.User ...@@ -203,26 +195,13 @@ namespace Mall.Module.User
model.SupplierCommissionList.ForEach(x => x.Status = 0); model.SupplierCommissionList.ForEach(x => x.Status = 0);
supplierCommissionRepository.InsertBatch(model.SupplierCommissionList); supplierCommissionRepository.InsertBatch(model.SupplierCommissionList);
} }
flag = supplierId > 0; flag = supplierId > 0;
//IDictionary<string, object> fileds = new Dictionary<string, object>()
//{
// { nameof(RB_ClientBankAccount.SupplierId),supplierId}
//};
//IList<WhereHelper> whereHelpers = new List<WhereHelper>()
//{
// new WhereHelper (){ FiledName=nameof(RB_ClientBankAccount.ID),FiledValue=id,OperatorEnum=OperatorEnum.Equal}
//};
//flag = clientBankAccountRepository.Update(fileds, whereHelpers);
} }
} }
// supplierRepository.DBSession.Commit();
} }
catch (Exception ex) catch (Exception ex)
{ {
LogHelper.Write(ex, "AddOrUpdateSupplier"); LogHelper.Write(ex, "AddOrUpdateSupplier");
// supplierRepository.DBSession.Rollback("AddOrUpdateSupplier");
return false; return false;
} }
return flag; return flag;
......
...@@ -68,7 +68,7 @@ namespace Mall.WebApi.App_Code ...@@ -68,7 +68,7 @@ namespace Mall.WebApi.App_Code
var reqXml = req.ParseXml(); var reqXml = req.ParseXml();
LogHelper.Write(null, "订单号【" + sOrderNo + "】请求参数:" + reqXml); LogHelper.WriteInfo("订单号【" + sOrderNo + "】请求参数:" + reqXml);
var result = Common.Pay.WeChatPat.HttpHelper.Post(new HttpParam() var result = Common.Pay.WeChatPat.HttpHelper.Post(new HttpParam()
{ {
Url = Mall.Common.Pay.WeChatPat.Model.ApiList.UnifiedOrderUrl, Url = Mall.Common.Pay.WeChatPat.Model.ApiList.UnifiedOrderUrl,
......
...@@ -74,7 +74,7 @@ namespace Mall.WebApi.Controllers.User ...@@ -74,7 +74,7 @@ namespace Mall.WebApi.Controllers.User
/// <summary> /// <summary>
/// 添加修改 /// 添加修改供应商
/// </summary> /// </summary>
/// <param name="request"></param> /// <param name="request"></param>
/// <returns></returns> /// <returns></returns>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment