|
@@ -55,7 +55,7 @@ namespace MySystem.Areas.Api.Controllers.v1.Main1
|
|
|
}
|
|
}
|
|
|
if (!string.IsNullOrEmpty(data["CertMerchantName"].ToString()))
|
|
if (!string.IsNullOrEmpty(data["CertMerchantName"].ToString()))
|
|
|
{
|
|
{
|
|
|
- condition += " and CertMerchantName='" + CertMerchantName + "'";
|
|
|
|
|
|
|
+ condition += " and CertMerchantName like '%" + CertMerchantName + "%'";
|
|
|
}
|
|
}
|
|
|
if (!string.IsNullOrEmpty(data["ServicePhone"].ToString()))
|
|
if (!string.IsNullOrEmpty(data["ServicePhone"].ToString()))
|
|
|
{
|
|
{
|
|
@@ -211,7 +211,7 @@ namespace MySystem.Areas.Api.Controllers.v1.Main1
|
|
|
condition = " and Id in (" + merIds + ")";
|
|
condition = " and Id in (" + merIds + ")";
|
|
|
if (!string.IsNullOrEmpty(MerchantName))
|
|
if (!string.IsNullOrEmpty(MerchantName))
|
|
|
{
|
|
{
|
|
|
- condition += " and CertMerchantName='" + MerchantName + "'";
|
|
|
|
|
|
|
+ condition += " and CertMerchantName like '%" + MerchantName + "%'";
|
|
|
}
|
|
}
|
|
|
if (!string.IsNullOrEmpty(Mobile))
|
|
if (!string.IsNullOrEmpty(Mobile))
|
|
|
{
|
|
{
|
|
@@ -288,7 +288,9 @@ namespace MySystem.Areas.Api.Controllers.v1.Main1
|
|
|
string AliPayToken = data["AliPayToken"].ToString(); //支付宝token
|
|
string AliPayToken = data["AliPayToken"].ToString(); //支付宝token
|
|
|
string WeChatNo = data["WeChatNo"].ToString(); //微信商户号
|
|
string WeChatNo = data["WeChatNo"].ToString(); //微信商户号
|
|
|
Dictionary<string, object> Obj = new Dictionary<string, object>();
|
|
Dictionary<string, object> Obj = new Dictionary<string, object>();
|
|
|
- var query = MerchantAddInfoService.Query(int.Parse(MerchantId));
|
|
|
|
|
|
|
+ // var query = MerchantAddInfoService.Query(int.Parse(MerchantId));
|
|
|
|
|
+ var Id = int.Parse(MerchantId);
|
|
|
|
|
+ var query = main1db.MerchantAddInfo.FirstOrDefault(m => m.Id == Id) ?? new MerchantAddInfo();
|
|
|
Dictionary<string, object> fields = new Dictionary<string, object>();
|
|
Dictionary<string, object> fields = new Dictionary<string, object>();
|
|
|
if (query.Id > 0)
|
|
if (query.Id > 0)
|
|
|
{
|
|
{
|
|
@@ -308,8 +310,8 @@ namespace MySystem.Areas.Api.Controllers.v1.Main1
|
|
|
query.SubMchid = WeChatNo;
|
|
query.SubMchid = WeChatNo;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
+ main1db.SaveChanges();
|
|
|
// AppResultJson resultJson = MerchantAddInfoService.Edit(fields, int.Parse(MerchantId), false);
|
|
// AppResultJson resultJson = MerchantAddInfoService.Edit(fields, int.Parse(MerchantId), false);
|
|
|
-
|
|
|
|
|
return new AppResultJson() { Status = "1", Info = "添加成功", Data = Obj };
|
|
return new AppResultJson() { Status = "1", Info = "添加成功", Data = Obj };
|
|
|
}
|
|
}
|
|
|
#endregion
|
|
#endregion
|