|
|
@@ -205,6 +205,32 @@ namespace MySystem.Areas.Api.Controllers.v1.Main2
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
+ #region 进件管理-银联重新获取签约码
|
|
|
+ [Authorize]
|
|
|
+ public JsonResult UnionPayUpateSignUrl(string value)
|
|
|
+ {
|
|
|
+ value = PublicFunction.DesDecrypt(value); ;
|
|
|
+ JsonData data = JsonMapper.ToObject(value);
|
|
|
+ AppResultJson result = UnionPayUpateSignUrlDo(value);
|
|
|
+ return Json(new AppResultJson() { Status = result.Status, Info = result.Info, Data = result.Data });
|
|
|
+ }
|
|
|
+ private AppResultJson UnionPayUpateSignUrlDo(string value)
|
|
|
+ {
|
|
|
+ JsonData data = JsonMapper.ToObject(value);
|
|
|
+ string MerchantId = data["MerchantId"].ToString(); //商户Id
|
|
|
+ string Kind = data["Kind"].ToString(); //类型(1 支付宝 2 微信 )
|
|
|
+ Dictionary<string, object> Obj = new Dictionary<string, object>();
|
|
|
+ MerchantAddInfo query = new MerchantAddInfo();
|
|
|
+ Dictionary<string, object> fields = new Dictionary<string, object>();
|
|
|
+ fields.Add("create_date", DateTime.Now); //创建时间
|
|
|
+ fields.Add("update_date", DateTime.Now); //修改时间
|
|
|
+ AppResultJson resultJson = MerchantAddInfoService.Add(fields, false);
|
|
|
+
|
|
|
+ return new AppResultJson() { Status = "1", Info = "", Data = Obj };
|
|
|
+ }
|
|
|
+ #endregion
|
|
|
+
|
|
|
+
|
|
|
|
|
|
#region 商户管理-银联查询商户交易信息
|
|
|
[Authorize]
|
|
|
@@ -324,10 +350,16 @@ namespace MySystem.Areas.Api.Controllers.v1.Main2
|
|
|
{
|
|
|
JsonData data = JsonMapper.ToObject(value);
|
|
|
int id = int.Parse(function.CheckInt(data["id"].ToString()));
|
|
|
- Dictionary<string, object> Obj = new Dictionary<string, object>();
|
|
|
+ Dictionary<string, object> Obj = new Dictionary<string, object>();
|
|
|
var merAddInfo = main2db.MerchantAddInfo.FirstOrDefault(m => m.Id == id) ?? new MerchantAddInfo();
|
|
|
+ if (merAddInfo.HdStatus != 3)
|
|
|
+ {
|
|
|
+ return new AppResultJson() { Status = "-1", Info = "商户未添加分账接收方账户", Data = Obj };
|
|
|
+ }
|
|
|
var merInfo = main2db.MerchantInfo.FirstOrDefault(m => m.Id == id) ?? new MerchantInfo();
|
|
|
merAddInfo.Status = 0;
|
|
|
+ merAddInfo.ApplymentId = null;
|
|
|
+ merAddInfo.WeChatSignUrl = null;
|
|
|
merInfo.Status = 0;
|
|
|
RedisDbconn.Instance.AddList("WeChatForHaoDaQueue", id.ToString());
|
|
|
return new AppResultJson() { Status = "1", Info = "", Data = Obj };
|
|
|
@@ -347,11 +379,17 @@ namespace MySystem.Areas.Api.Controllers.v1.Main2
|
|
|
{
|
|
|
JsonData data = JsonMapper.ToObject(value);
|
|
|
int id = int.Parse(function.CheckInt(data["id"].ToString()));
|
|
|
- Dictionary<string, object> Obj = new Dictionary<string, object>();
|
|
|
+ Dictionary<string, object> Obj = new Dictionary<string, object>();
|
|
|
var merAddInfo = main2db.MerchantAddInfo.FirstOrDefault(m => m.Id == id) ?? new MerchantAddInfo();
|
|
|
+ if (merAddInfo.HdStatus != 3)
|
|
|
+ {
|
|
|
+ return new AppResultJson() { Status = "-1", Info = "商户未添加分账接收方账户", Data = Obj };
|
|
|
+ }
|
|
|
var merInfo = main2db.MerchantInfo.FirstOrDefault(m => m.Id == id) ?? new MerchantInfo();
|
|
|
merAddInfo.QueryCount = 0;
|
|
|
- merInfo.QueryCount = 0;
|
|
|
+ merAddInfo.SeoTitle = null;
|
|
|
+ merAddInfo.AlipaySignUrl = null;
|
|
|
+ merInfo.QueryCount = 0;
|
|
|
RedisDbconn.Instance.AddList("AlipayForHaoDaQueue", id.ToString());
|
|
|
return new AppResultJson() { Status = "1", Info = "", Data = Obj };
|
|
|
}
|
|
|
@@ -370,7 +408,7 @@ namespace MySystem.Areas.Api.Controllers.v1.Main2
|
|
|
{
|
|
|
JsonData data = JsonMapper.ToObject(value);
|
|
|
int id = int.Parse(function.CheckInt(data["id"].ToString()));
|
|
|
- Dictionary<string, object> Obj = new Dictionary<string, object>();
|
|
|
+ Dictionary<string, object> Obj = new Dictionary<string, object>();
|
|
|
var merAddInfo = main2db.MerchantAddInfo.FirstOrDefault(m => m.Id == id) ?? new MerchantAddInfo();
|
|
|
var merInfo = main2db.MerchantInfo.FirstOrDefault(m => m.Id == id) ?? new MerchantInfo();
|
|
|
merAddInfo.Status = 0;
|
|
|
@@ -378,7 +416,7 @@ namespace MySystem.Areas.Api.Controllers.v1.Main2
|
|
|
merInfo.Status = 0;
|
|
|
merInfo.QueryCount = 0;
|
|
|
RedisDbconn.Instance.AddList("MerchantConfirmHdQueue", "{\"MerchantId\":\"" + id + "\"}");
|
|
|
- main2db.SaveChanges();
|
|
|
+ main2db.SaveChanges();
|
|
|
return new AppResultJson() { Status = "1", Info = "", Data = Obj };
|
|
|
}
|
|
|
#endregion
|
|
|
@@ -398,7 +436,7 @@ namespace MySystem.Areas.Api.Controllers.v1.Main2
|
|
|
int id = int.Parse(function.CheckInt(data["id"].ToString()));
|
|
|
var merAddInfo = main2db.MerchantAddInfo.FirstOrDefault(m => m.Id == id) ?? new MerchantAddInfo();
|
|
|
merAddInfo.HdBindWeChat = 0;
|
|
|
- main2db.SaveChanges();
|
|
|
+ main2db.SaveChanges();
|
|
|
return new AppResultJson() { Status = "1", Info = "" };
|
|
|
}
|
|
|
#endregion
|
|
|
@@ -458,12 +496,12 @@ namespace MySystem.Areas.Api.Controllers.v1.Main2
|
|
|
int HdStatus = 0;
|
|
|
int WeChatStatus = 0;
|
|
|
int AlipayStatus = 0;
|
|
|
- if(query.HdStatus == 0 && query.Status == -1)
|
|
|
+ if (query.HdStatus == 0 && query.Status == -1)
|
|
|
{
|
|
|
HdStatus = -1;
|
|
|
HdRemark = query.WeChatRemark;
|
|
|
}
|
|
|
- if(query.HdStatus == 3)
|
|
|
+ if (query.HdStatus == 3)
|
|
|
{
|
|
|
WeChatStatus = query.Status;
|
|
|
AlipayStatus = query.QueryCount;
|