|
@@ -189,7 +189,7 @@ namespace MySystem.Areas.Admin.Controllers
|
|
|
/// </summary>
|
|
|
/// <returns></returns>
|
|
|
[HttpPost]
|
|
|
- public string Edit(MerchantInfo data, string AlipayAuthToken)
|
|
|
+ public string Edit(MerchantInfo data, string AlipayAuthToken, string SubMchid)
|
|
|
{
|
|
|
Dictionary<string, object> Fields = new Dictionary<string, object>();
|
|
|
|
|
@@ -207,8 +207,21 @@ namespace MySystem.Areas.Admin.Controllers
|
|
|
Fields.Add("SeoKeyword", data.SeoKeyword);
|
|
|
Fields.Add("SeoDescription", data.SeoDescription);
|
|
|
new AdminContent(_accessor.HttpContext, PublicFunction.MainTables).Edit("MerchantInfo", Fields, data.Id);
|
|
|
+
|
|
|
+ MerchantForMobile merchantFor = db.MerchantForMobile.FirstOrDefault(m => m.Mobile == data.Mobile);
|
|
|
+ if(merchantFor == null)
|
|
|
+ {
|
|
|
+ merchantFor = db.MerchantForMobile.Add(new MerchantForMobile()
|
|
|
+ {
|
|
|
+ Mobile = data.Mobile
|
|
|
+ }).Entity;
|
|
|
+ db.SaveChanges();
|
|
|
+ }
|
|
|
+ merchantFor.MerchantId = data.Id;
|
|
|
+ db.SaveChanges();
|
|
|
|
|
|
Dictionary<string, object> addFields = new Dictionary<string, object>();
|
|
|
+ addFields.Add("SubMchid", SubMchid);
|
|
|
addFields.Add("AlipayAuthToken", AlipayAuthToken);
|
|
|
addFields.Add("QueryCount", data.QueryCount);
|
|
|
addFields.Add("Status", data.Status);
|