浏览代码

调整,传参数为null时bug修复

DuGuYang 1 年之前
父节点
当前提交
04d9b50b00

+ 4 - 0
Areas/Api/Controllers/Business/BusinessController.cs

@@ -28,6 +28,7 @@ namespace MySystem.Areas.Api.Controllers.v1
         public JsonResult BussinessRecordForMonth(string value)
         {
             value = DesDecrypt(value);
+            value = value.Replace("null", "\"\"");
             JsonData data = JsonMapper.ToObject(value);
             List<Dictionary<string, object>> dataList = BussinessRecordForMonthDo(value);
             return Json(new AppResultJson() { Status = "1", Info = "", Data = dataList });
@@ -52,6 +53,7 @@ namespace MySystem.Areas.Api.Controllers.v1
         public JsonResult BussinessRecordForHalfYear(string value)
         {
             value = DesDecrypt(value);
+            value = value.Replace("null", "\"\"");
             JsonData data = JsonMapper.ToObject(value);
             List<Dictionary<string, object>> dataList = BussinessRecordForHalfYearDo(value);
             return Json(new AppResultJson() { Status = "1", Info = "", Data = dataList });
@@ -75,6 +77,7 @@ namespace MySystem.Areas.Api.Controllers.v1
         public JsonResult DayDetailList(string value)
         {
             value = DesDecrypt(value);
+            value = value.Replace("null", "\"\"");
             JsonData data = JsonMapper.ToObject(value);
             List<Dictionary<string, object>> dataList = DayDetailListDo(value);
             return Json(new AppResultJson() { Status = "1", Info = "", Data = dataList });
@@ -110,6 +113,7 @@ namespace MySystem.Areas.Api.Controllers.v1
         public JsonResult OrderDetail(string value)
         {
             value = DesDecrypt(value);
+            value = value.Replace("null", "\"\"");
             JsonData data = JsonMapper.ToObject(value);
             Dictionary<string, object> dataList = OrderDetailDo(value);
             return Json(new AppResultJson() { Status = "1", Info = "", Data = dataList });

+ 11 - 9
Areas/Api/Controllers/Main/ActiveRewardController.cs

@@ -28,6 +28,7 @@ namespace MySystem.Areas.Api.Controllers.v1.pos
         public JsonResult StatList(string value)
         {
             value = DesDecrypt(value);
+            value = value.Replace("null", "\"\"");
             JsonData data = JsonMapper.ToObject(value);
             List<Dictionary<string, object>> dataList = StatListDo(value);
             return Json(new AppResultJson() { Status = "1", Info = "", Data = dataList });
@@ -35,11 +36,11 @@ namespace MySystem.Areas.Api.Controllers.v1.pos
         public List<Dictionary<string, object>> StatListDo(string value)
         {
             JsonData data = JsonMapper.ToObject(value);
-            int UserId = int.Parse(function.CheckInt(data["UserId"].ToString())); //创客
-            string TradeMonth = data["TradeMonth"].ToString();
-            int PageSize = int.Parse(function.CheckInt(data["PageSize"].ToString()));
-            int PageNum = int.Parse(function.CheckInt(data["PageNum"].ToString()));
-            int Kind = int.Parse(function.CheckInt(data["Kind"].ToString()));
+            int UserId = int.Parse(function.CheckInt(data.getItem("UserId").ToString())); //创客
+            string TradeMonth = data.getItem("TradeMonth").ToString();
+            int PageSize = int.Parse(function.CheckInt(data.getItem("PageSize").ToString()));
+            int PageNum = int.Parse(function.CheckInt(data.getItem("PageNum").ToString()));
+            int Kind = int.Parse(function.CheckInt(data.getItem("Kind").ToString()));
             string Date = Kind == 1 ? "%Y%m%d" : "%Y%m";
             string TradeMonthCondi = "";
             if (Kind == 2)
@@ -83,6 +84,7 @@ namespace MySystem.Areas.Api.Controllers.v1.pos
         public JsonResult StatDetail(string value)
         {
             value = DesDecrypt(value);
+            value = value.Replace("null", "\"\"");
             JsonData data = JsonMapper.ToObject(value);
             List<Dictionary<string, object>> dataList = StatDetailDo(value);
             return Json(new AppResultJson() { Status = "1", Info = "", Data = dataList });
@@ -90,10 +92,10 @@ namespace MySystem.Areas.Api.Controllers.v1.pos
         public List<Dictionary<string, object>> StatDetailDo(string value)
         {
             JsonData data = JsonMapper.ToObject(value);
-            int UserId = int.Parse(function.CheckInt(data["UserId"].ToString())); //创客
-            string ActDate = data["ActDate"].ToString(); //激活时间
-            int PageSize = int.Parse(function.CheckInt(data["PageSize"].ToString()));
-            int PageNum = int.Parse(function.CheckInt(data["PageNum"].ToString()));
+            int UserId = int.Parse(function.CheckInt(data.getItem("UserId").ToString())); //创客
+            string ActDate = data.getItem("ActDate").ToString(); //激活时间
+            int PageSize = int.Parse(function.CheckInt(data.getItem("PageSize").ToString()));
+            int PageNum = int.Parse(function.CheckInt(data.getItem("PageNum").ToString()));
             List<Dictionary<string, object>> dataList = new List<Dictionary<string, object>>();
             DateTime start = DateTime.Parse(ActDate + " 00:00:00");
             DateTime end = DateTime.Parse(ActDate + " 23:59:59");

+ 7 - 6
Areas/Api/Controllers/Main/ConsumerOrdersController.cs

@@ -33,13 +33,14 @@ namespace MySystem.Areas.Api.Controllers.v1
                 value = sr.ReadToEnd();
                 value = value.Split('=')[1];
             }
-            // value = DesDecrypt(value);
+            value = DesDecrypt(value);
+            value = value.Replace("null", "\"\"");
             JsonData data = JsonMapper.ToObject(value);
-            string SnNo = data["Sn"].ToString(); //商户
-            string Machine = data["Machine"].ToString();
-            int PayMode = int.Parse(function.CheckInt(data["PayMode"].ToString())); //支付方式(1 支付宝 2 微信)
-            decimal PayMoney = decimal.Parse(function.CheckNum(data["PayMoney"].ToString())); //支付金额
-            string Code = data["Code"].ToString();
+            string SnNo = data.getItem("Sn").ToString(); //商户
+            string Machine = data.getItem("Machine").ToString();
+            int PayMode = int.Parse(function.CheckInt(data.getItem("PayMode").ToString())); //支付方式(1 支付宝 2 微信)
+            decimal PayMoney = decimal.Parse(function.CheckNum(data.getItem("PayMoney").ToString())); //支付金额
+            string Code = data.getItem("Code").ToString();
             if (string.IsNullOrEmpty(data["PayMode"].ToString()))
             {
                 return Json(new AppResultJson() { Status = "-1", Info = "请填写支付方式" });

+ 5 - 3
Areas/Api/Controllers/Main/KqProductsController.cs

@@ -29,6 +29,7 @@ namespace MySystem.Areas.Api.Controllers.v1
         public JsonResult List(string value)
         {
             value = DesDecrypt(value);
+            value = value.Replace("null", "\"\"");
             JsonData data = JsonMapper.ToObject(value);
             List<Dictionary<string, object>> dataList = ListDo(value);
             return Json(new AppResultJson() { Status = "1", Info = "", Data = dataList });
@@ -36,8 +37,8 @@ namespace MySystem.Areas.Api.Controllers.v1
         public List<Dictionary<string, object>> ListDo(string value)
         {
             JsonData data = JsonMapper.ToObject(value);
-            int PageSize = int.Parse(function.CheckInt(data["PageSize"].ToString()));
-            int PageNum = int.Parse(function.CheckInt(data["PageNum"].ToString()));
+            int PageSize = int.Parse(function.CheckInt(data.getItem("PageSize").ToString()));
+            int PageNum = int.Parse(function.CheckInt(data.getItem("PageNum").ToString()));
             List<Dictionary<string, object>> dataList = new List<Dictionary<string, object>>();
             Dictionary<string, object> curData = new Dictionary<string, object>();
             curData.Add("Name", "微信"); //名称
@@ -58,6 +59,7 @@ namespace MySystem.Areas.Api.Controllers.v1
         public JsonResult MainStatData(string value)
         {
             value = DesDecrypt(value);
+            value = value.Replace("null", "\"\"");
             JsonData data = JsonMapper.ToObject(value);
             List<Dictionary<string, object>> Obj = MainStatDataDo(value);
             return Json(new AppResultJson() { Status = "1", Info = "", Data = Obj });
@@ -65,7 +67,7 @@ namespace MySystem.Areas.Api.Controllers.v1
         public List<Dictionary<string, object>> MainStatDataDo(string value)
         {
             JsonData data = JsonMapper.ToObject(value);
-            string UserId = data["UserId"].ToString(); //创客Id
+            string UserId = data.getItem("UserId").ToString(); //创客Id
             
             List<Dictionary<string, object>> list = new List<Dictionary<string, object>>();
             Dictionary<string, object> Obj = new Dictionary<string, object>();

+ 1 - 0
Areas/Api/Controllers/Main/MerchantAddInfoController.cs

@@ -30,6 +30,7 @@ namespace MySystem.Areas.Api.Controllers.v1
         public JsonResult Add(string value)
         {
             value = DesDecrypt(value);
+            value = value.Replace("null", "\"\"");
             JsonData data = JsonMapper.ToObject(value);
             AppResultJson result = AddDo(value);
             return Json(new AppResultJson() { Status = result.Status, Info = result.Info, Data = result.Data });

+ 59 - 40
Areas/Api/Controllers/Main/MerchantInfoController.cs

@@ -29,6 +29,7 @@ namespace MySystem.Areas.Api.Controllers.v1
         public JsonResult MerchantByStatus(string value)
         {
             value = DesDecrypt(value);
+            value = value.Replace("null", "\"\"");
             JsonData data = JsonMapper.ToObject(value);
             List<Dictionary<string, object>> dataList = MerchantByStatusDo(value);
             return Json(new AppResultJson() { Status = "1", Info = "", Data = dataList });
@@ -36,11 +37,11 @@ namespace MySystem.Areas.Api.Controllers.v1
         public List<Dictionary<string, object>> MerchantByStatusDo(string value)
         {
             JsonData data = JsonMapper.ToObject(value);
-            string SearchKey = data["SearchKey"].ToString();
-            int Status = int.Parse(function.CheckInt(data["Status"].ToString()));
-            int UserId = int.Parse(function.CheckInt(data["UserId"].ToString())); //所属创客
-            int PageSize = int.Parse(function.CheckInt(data["PageSize"].ToString()));
-            int PageNum = int.Parse(function.CheckInt(data["PageNum"].ToString()));
+            string SearchKey = data.getItem("SearchKey").ToString();
+            int Status = int.Parse(function.CheckInt(data.getItem("Status").ToString()));
+            int UserId = int.Parse(function.CheckInt(data.getItem("UserId").ToString())); //所属创客
+            int PageSize = int.Parse(function.CheckInt(data.getItem("PageSize").ToString()));
+            int PageNum = int.Parse(function.CheckInt(data.getItem("PageNum").ToString()));
             StringBuilder condition = new StringBuilder();
             condition.Condition("UserId", UserId);
             condition.Condition("Sort", 1);
@@ -80,6 +81,7 @@ namespace MySystem.Areas.Api.Controllers.v1
         public JsonResult MerchantDetailByStatus(string value)
         {
             value = DesDecrypt(value);
+            value = value.Replace("null", "\"\"");
             JsonData data = JsonMapper.ToObject(value);
             Dictionary<string, object> Obj = MerchantDetailByStatusDo(value);
             return Json(new AppResultJson() { Status = "1", Info = "", Data = Obj });
@@ -88,7 +90,7 @@ namespace MySystem.Areas.Api.Controllers.v1
         {
             JsonData data = JsonMapper.ToObject(value);
             Dictionary<string, object> Obj = new Dictionary<string, object>();
-            int Id = int.Parse(function.CheckInt(data["Id"].ToString()));
+            int Id = int.Parse(function.CheckInt(data.getItem("Id").ToString()));
             MerchantInfo query = MerchantInfoService.Query(Id);
             MerchantAddInfo addInfo = MerchantAddInfoService.Query(Id);
             // Obj.Add("Name", query.Name); //名称
@@ -137,6 +139,7 @@ namespace MySystem.Areas.Api.Controllers.v1
         public JsonResult TeamPerformanceMerchants(string value)
         {
             value = DesDecrypt(value);
+            value = value.Replace("null", "\"\"");
             JsonData data = JsonMapper.ToObject(value);
             List<Dictionary<string, object>> dataList = TeamPerformanceMerchantsDo(value);
             return Json(new AppResultJson() { Status = "1", Info = "", Data = dataList });
@@ -144,9 +147,9 @@ namespace MySystem.Areas.Api.Controllers.v1
         public List<Dictionary<string, object>> TeamPerformanceMerchantsDo(string value)
         {
             JsonData data = JsonMapper.ToObject(value);
-            int UserId = int.Parse(function.CheckInt(data["UserId"].ToString())); //创客
-            int PageSize = int.Parse(function.CheckInt(data["PageSize"].ToString()));
-            int PageNum = int.Parse(function.CheckInt(data["PageNum"].ToString()));
+            int UserId = int.Parse(function.CheckInt(data.getItem("UserId").ToString())); //创客
+            int PageSize = int.Parse(function.CheckInt(data.getItem("PageSize").ToString()));
+            int PageNum = int.Parse(function.CheckInt(data.getItem("PageNum").ToString()));
             List<Dictionary<string, object>> dataList = new List<Dictionary<string, object>>();
             List<int> query = MerchantInfoDbconn.Instance.GetList(UserId, PageNum, PageSize);
             foreach (int id in query)
@@ -169,6 +172,7 @@ namespace MySystem.Areas.Api.Controllers.v1
         public JsonResult ContractList(string value)
         {
             value = DesDecrypt(value);
+            value = value.Replace("null", "\"\"");
             JsonData data = JsonMapper.ToObject(value);
             List<Dictionary<string, object>> dataList = ContractListDo(value);
             return Json(new AppResultJson() { Status = "1", Info = "", Data = dataList });
@@ -176,10 +180,10 @@ namespace MySystem.Areas.Api.Controllers.v1
         public List<Dictionary<string, object>> ContractListDo(string value)
         {
             JsonData data = JsonMapper.ToObject(value);
-            int UserId = int.Parse(function.CheckInt(data["UserId"].ToString())); //所属创客
-            string Status = data["Status"].ToString(); //签约状态
-            int PageSize = int.Parse(function.CheckInt(data["PageSize"].ToString()));
-            int PageNum = int.Parse(function.CheckInt(data["PageNum"].ToString()));
+            int UserId = int.Parse(function.CheckInt(data.getItem("UserId").ToString())); //所属创客
+            string Status = data.getItem("Status").ToString(); //签约状态
+            int PageSize = int.Parse(function.CheckInt(data.getItem("PageSize").ToString()));
+            int PageNum = int.Parse(function.CheckInt(data.getItem("PageNum").ToString()));
             List<Dictionary<string, object>> dataList = new List<Dictionary<string, object>>();
             List<int> query = MerchantInfoDbconn.Instance.GetList(UserId, PageNum, PageSize);
             foreach (var id in query)
@@ -204,6 +208,7 @@ namespace MySystem.Areas.Api.Controllers.v1
         public JsonResult ContractDetail(string value)
         {
             value = DesDecrypt(value);
+            value = value.Replace("null", "\"\"");
             JsonData data = JsonMapper.ToObject(value);
             Dictionary<string, object> Obj = ContractDetailDo(value);
             return Json(new AppResultJson() { Status = "1", Info = "", Data = Obj });
@@ -213,7 +218,7 @@ namespace MySystem.Areas.Api.Controllers.v1
             JsonData data = JsonMapper.ToObject(value);
             Dictionary<string, object> Obj = new Dictionary<string, object>();
             MerchantInfo query = new MerchantInfo();
-            int Id = int.Parse(function.CheckInt(data["Id"].ToString()));
+            int Id = int.Parse(function.CheckInt(data.getItem("Id").ToString()));
             query = MerchantInfoDbconn.Instance.Get(Id) ?? new MerchantInfo();
             Obj.Add("Name", query.Name); //名称
             Obj.Add("Status", ""); //签约状态
@@ -230,6 +235,7 @@ namespace MySystem.Areas.Api.Controllers.v1
         public JsonResult MyMerchant(string value)
         {
             value = DesDecrypt(value);
+            value = value.Replace("null", "\"\"");
             JsonData data = JsonMapper.ToObject(value);
             Dictionary<string, object> Other = new Dictionary<string, object>();
             List<Dictionary<string, object>> dataList = MyMerchantDo(value, out Other);
@@ -238,14 +244,14 @@ namespace MySystem.Areas.Api.Controllers.v1
         public List<Dictionary<string, object>> MyMerchantDo(string value, out Dictionary<string, object> Other)
         {
             JsonData data = JsonMapper.ToObject(value);
-            string SearchKey = data["SearchKey"].ToString(); //搜索关键词
-            int UserId = int.Parse(function.CheckInt(data["UserId"].ToString())); //创客
-            int ActiveStatus = int.Parse(function.CheckInt(data["ActiveStatus"].ToString())); //商户激活状态
-            int Kind = int.Parse(function.CheckInt(data["Kind"].ToString()));
-            string TradeSort = data["TradeSort"].ToString(); //排序
-            string DateSort = data["DateSort"].ToString(); //排序
-            int PageSize = int.Parse(function.CheckInt(data["PageSize"].ToString()));
-            int PageNum = int.Parse(function.CheckInt(data["PageNum"].ToString()));
+            string SearchKey = data.getItem("SearchKey").ToString(); //搜索关键词
+            int UserId = int.Parse(function.CheckInt(data.getItem("UserId").ToString())); //创客
+            int ActiveStatus = int.Parse(function.CheckInt(data.getItem("ActiveStatus").ToString())); //商户激活状态
+            int Kind = int.Parse(function.CheckInt(data.getItem("Kind").ToString()));
+            string TradeSort = data.getItem("TradeSort").ToString(); //排序
+            string DateSort = data.getItem("DateSort").ToString(); //排序
+            int PageSize = int.Parse(function.CheckInt(data.getItem("PageSize").ToString()));
+            int PageNum = int.Parse(function.CheckInt(data.getItem("PageNum").ToString()));
             List<Dictionary<string, object>> dataList = new List<Dictionary<string, object>>();
             IQueryable<MerchantInfo> query = maindb.MerchantInfo.Where(m => m.UserId == UserId && (m.Status == 2 || m.QueryCount == 2));
             DateTime today = DateTime.Parse(DateTime.Now.ToString("yyyy-MM-dd") + " 00:00:00");
@@ -325,6 +331,7 @@ namespace MySystem.Areas.Api.Controllers.v1
         public JsonResult MyMerchantDetail(string value)
         {
             value = DesDecrypt(value);
+            value = value.Replace("null", "\"\"");
             JsonData data = JsonMapper.ToObject(value);
             Dictionary<string, object> Obj = MyMerchantDetailDo(value);
             return Json(new AppResultJson() { Status = "1", Info = "", Data = Obj });
@@ -333,7 +340,7 @@ namespace MySystem.Areas.Api.Controllers.v1
         {
             JsonData data = JsonMapper.ToObject(value);
             Dictionary<string, object> Obj = new Dictionary<string, object>();
-            int Id = int.Parse(function.CheckInt(data["Id"].ToString()));
+            int Id = int.Parse(function.CheckInt(data.getItem("Id").ToString()));
             MerchantInfo merchant = MerchantInfoService.Query(Id);
             MerchantAddInfo addinfo = MerchantAddInfoService.Query(Id);
             Obj.Add("MerchantName", merchant.Name); //商户名称
@@ -355,6 +362,7 @@ namespace MySystem.Areas.Api.Controllers.v1
         public JsonResult MerchantTradeList(string value)
         {
             value = DesDecrypt(value);
+            value = value.Replace("null", "\"\"");
             JsonData data = JsonMapper.ToObject(value);
             Dictionary<string, object> other = new Dictionary<string, object>();
             List<Dictionary<string, object>> dataList = MerchantTradeListDo(value, out other);
@@ -363,10 +371,10 @@ namespace MySystem.Areas.Api.Controllers.v1
         public List<Dictionary<string, object>> MerchantTradeListDo(string value, out Dictionary<string, object> other)
         {
             JsonData data = JsonMapper.ToObject(value);
-            string TradeMonth = data["TradeMonth"].ToString(); //交易月
-            int MerchantId = int.Parse(function.CheckInt(data["MerchantId"].ToString())); //商户Id
-            int PageSize = int.Parse(function.CheckInt(data["PageSize"].ToString()));
-            int PageNum = int.Parse(function.CheckInt(data["PageNum"].ToString()));
+            string TradeMonth = data.getItem("TradeMonth").ToString(); //交易月
+            int MerchantId = int.Parse(function.CheckInt(data.getItem("MerchantId").ToString())); //商户Id
+            int PageSize = int.Parse(function.CheckInt(data.getItem("PageSize").ToString()));
+            int PageNum = int.Parse(function.CheckInt(data.getItem("PageNum").ToString()));
             List<Dictionary<string, object>> dataList = new List<Dictionary<string, object>>();
             string limit = " limit " + PageSize;
             if (PageNum == 1)
@@ -417,6 +425,7 @@ namespace MySystem.Areas.Api.Controllers.v1
         public JsonResult QrCodeList(string value)
         {
             value = DesDecrypt(value);
+            value = value.Replace("null", "\"\"");
             JsonData data = JsonMapper.ToObject(value);
             int TotalCount = 0;
             List<Dictionary<string, object>> dataList = QrCodeListDo(value, out TotalCount);
@@ -425,9 +434,9 @@ namespace MySystem.Areas.Api.Controllers.v1
         public List<Dictionary<string, object>> QrCodeListDo(string value, out int TotalCount)
         {
             JsonData data = JsonMapper.ToObject(value);
-            int MerchantId = int.Parse(function.CheckInt(data["MerchantId"].ToString())); //商户Id
-            int PageSize = int.Parse(function.CheckInt(data["PageSize"].ToString()));
-            int PageNum = int.Parse(function.CheckInt(data["PageNum"].ToString()));
+            int MerchantId = int.Parse(function.CheckInt(data.getItem("MerchantId").ToString())); //商户Id
+            int PageSize = int.Parse(function.CheckInt(data.getItem("PageSize").ToString()));
+            int PageNum = int.Parse(function.CheckInt(data.getItem("PageNum").ToString()));
             List<Dictionary<string, object>> dataList = new List<Dictionary<string, object>>();
             IQueryable<Models.Main1.MerchantQrCode> query = main1db.MerchantQrCode.Where(m => m.MerchantId == MerchantId && m.QueryCount == 2).OrderByDescending(m => m.Id);
             TotalCount = query.Count();
@@ -459,6 +468,7 @@ namespace MySystem.Areas.Api.Controllers.v1
         public JsonResult QrCodeList2(string value)
         {
             value = DesDecrypt(value);
+            value = value.Replace("null", "\"\"");
             JsonData data = JsonMapper.ToObject(value);
             int TotalCount = 0;
             List<Dictionary<string, object>> dataList = QrCodeList2Do(value, out TotalCount);
@@ -467,9 +477,9 @@ namespace MySystem.Areas.Api.Controllers.v1
         public List<Dictionary<string, object>> QrCodeList2Do(string value, out int TotalCount)
         {
             JsonData data = JsonMapper.ToObject(value);
-            int MerchantId = int.Parse(function.CheckInt(data["MerchantId"].ToString())); //商户Id
-            int PageSize = int.Parse(function.CheckInt(data["PageSize"].ToString()));
-            int PageNum = int.Parse(function.CheckInt(data["PageNum"].ToString()));
+            int MerchantId = int.Parse(function.CheckInt(data.getItem("MerchantId").ToString())); //商户Id
+            int PageSize = int.Parse(function.CheckInt(data.getItem("PageSize").ToString()));
+            int PageNum = int.Parse(function.CheckInt(data.getItem("PageNum").ToString()));
             List<Dictionary<string, object>> dataList = new List<Dictionary<string, object>>();
             IQueryable<Models.Main1.MachineForQrCode> query = main1db.MachineForQrCode.Where(m => m.MerchantId == MerchantId && m.MachineSnNo != m.SnNo).OrderByDescending(m => m.MerchantId);
             TotalCount = query.Count();
@@ -500,6 +510,7 @@ namespace MySystem.Areas.Api.Controllers.v1
         public JsonResult MerchantSearch(string value)
         {
             value = DesDecrypt(value);
+            value = value.Replace("null", "\"\"");
             JsonData data = JsonMapper.ToObject(value);
             List<Dictionary<string, object>> dataList = MerchantSearchDo(value);
             return Json(new AppResultJson() { Status = "1", Info = "", Data = dataList });
@@ -507,11 +518,11 @@ namespace MySystem.Areas.Api.Controllers.v1
         public List<Dictionary<string, object>> MerchantSearchDo(string value)
         {
             JsonData data = JsonMapper.ToObject(value);
-            string SearchKey = data["SearchKey"].ToString(); //搜索关键词
-            int UserId = int.Parse(function.CheckInt(data["UserId"].ToString()));
-            // int ProductType = 1; //int.Parse(function.CheckInt(data["ProductType"].ToString()));
-            int PageSize = int.Parse(function.CheckInt(data["PageSize"].ToString()));
-            int PageNum = int.Parse(function.CheckInt(data["PageNum"].ToString()));
+            string SearchKey = data.getItem("SearchKey").ToString(); //搜索关键词
+            int UserId = int.Parse(function.CheckInt(data.getItem("UserId").ToString()));
+            // int ProductType = 1; //int.Parse(function.CheckInt(data.getItem("ProductType").ToString()));
+            int PageSize = int.Parse(function.CheckInt(data.getItem("PageSize").ToString()));
+            int PageNum = int.Parse(function.CheckInt(data.getItem("PageNum").ToString()));
             List<Dictionary<string, object>> dataList = new List<Dictionary<string, object>>();
             IQueryable<MerchantInfo> query = maindb.MerchantInfo.Where(m => m.UserId == UserId);
             if (!string.IsNullOrEmpty(SearchKey))
@@ -547,6 +558,7 @@ namespace MySystem.Areas.Api.Controllers.v1
         public JsonResult Delete(string value)
         {
             value = DesDecrypt(value);
+            value = value.Replace("null", "\"\"");
             JsonData data = JsonMapper.ToObject(value);
             AppResultJson result = DeleteDo(value);
             return Json(new AppResultJson() { Status = result.Status, Info = result.Info, Data = result.Data });
@@ -554,8 +566,8 @@ namespace MySystem.Areas.Api.Controllers.v1
         public AppResultJson DeleteDo(string value)
         {
             JsonData data = JsonMapper.ToObject(value);
-            int Id = int.Parse(function.CheckInt(data["Id"].ToString()));
-            int UserId = int.Parse(function.CheckInt(data["UserId"].ToString())); //所属创客
+            int Id = int.Parse(function.CheckInt(data.getItem("Id").ToString()));
+            int UserId = int.Parse(function.CheckInt(data.getItem("UserId").ToString())); //所属创客
             Dictionary<string, object> Obj = new Dictionary<string, object>();
             MerchantInfo edit = maindb.MerchantInfo.FirstOrDefault(m => m.Id == Id && m.UserId == UserId);
             if (edit != null)
@@ -579,6 +591,7 @@ namespace MySystem.Areas.Api.Controllers.v1
         public JsonResult TmpMerchantList(string value)
         {
             value = DesDecrypt(value);
+            value = value.Replace("null", "\"\"");
             JsonData data = JsonMapper.ToObject(value);
             List<Dictionary<string, object>> dataList = TmpMerchantListDo(value);
             return Json(new AppResultJson() { Status = "1", Info = "", Data = dataList });
@@ -610,6 +623,7 @@ namespace MySystem.Areas.Api.Controllers.v1
         public JsonResult ModifyLoginPwd(string value)
         {
             value = DesDecrypt(value);
+            value = value.Replace("null", "\"\"");
             JsonData data = JsonMapper.ToObject(value);
             AppResultJson result = ModifyLoginPwdDo(value);
             return Json(new AppResultJson() { Status = result.Status, Info = result.Info, Data = result.Data });
@@ -638,6 +652,7 @@ namespace MySystem.Areas.Api.Controllers.v1
         public JsonResult Detail(string value)
         {
             value = DesDecrypt(value);
+            value = value.Replace("null", "\"\"");
             JsonData data = JsonMapper.ToObject(value);
             Dictionary<string, object> Obj = DetailDo(value);
             return Json(new AppResultJson() { Status = "1", Info = "", Data = Obj });
@@ -703,6 +718,7 @@ namespace MySystem.Areas.Api.Controllers.v1
                 value = value.Split('=')[1];
             }
             value = DesDecrypt(value);
+            value = value.Replace("null", "\"\"");
             JsonData data = JsonMapper.ToObject(value);
             Dictionary<string, object> Obj = DetailBySnDo(value);
             return Json(new AppResultJson() { Status = "1", Info = "", Data = Obj });
@@ -733,6 +749,7 @@ namespace MySystem.Areas.Api.Controllers.v1
         public JsonResult ForgetPwd(string value)
         {
             value = DesDecrypt(value);
+            value = value.Replace("null", "\"\"");
             JsonData data = JsonMapper.ToObject(value);
             AppResultJson result = ForgetPwdDo(value);
             return Json(new AppResultJson() { Status = result.Status, Info = result.Info, Data = result.Data });
@@ -782,6 +799,7 @@ namespace MySystem.Areas.Api.Controllers.v1
         public JsonResult StatData(string value)
         {
             value = DesDecrypt(value);
+            value = value.Replace("null", "\"\"");
             JsonData data = JsonMapper.ToObject(value);
             Dictionary<string, object> Obj = StatDataDo(value);
             return Json(new AppResultJson() { Status = "1", Info = "", Data = Obj });
@@ -801,6 +819,7 @@ namespace MySystem.Areas.Api.Controllers.v1
         public JsonResult CheckMerchant(string value)
         {
             value = DesDecrypt(value);
+            value = value.Replace("null", "\"\"");
             JsonData data = JsonMapper.ToObject(value);
             bool Obj = CheckMerchantDo(value);
             return Json(new AppResultJson() { Status = "1", Info = "", Data = Obj });

+ 10 - 8
Areas/Api/Controllers/Main/MerchantParamSetController.cs

@@ -29,6 +29,7 @@ namespace MySystem.Areas.Api.Controllers.v1
         public JsonResult Detail(string value)
         {
             value = DesDecrypt(value);
+            value = value.Replace("null", "\"\"");
             JsonData data = JsonMapper.ToObject(value);
             Dictionary<string, object> Obj = DetailDo(value);
             return Json(new AppResultJson() { Status = "1", Info = "", Data = Obj });
@@ -37,7 +38,7 @@ namespace MySystem.Areas.Api.Controllers.v1
         {
             JsonData data = JsonMapper.ToObject(value);
             Dictionary<string, object> Obj = new Dictionary<string, object>();
-            int Id = int.Parse(function.CheckInt(data["Id"].ToString()));
+            int Id = int.Parse(function.CheckInt(data.getItem("Id").ToString()));
             MerchantParamSet query = MerchantParamSetDbconn.Instance.Get(Id);
             if (query == null)
             {
@@ -61,6 +62,7 @@ namespace MySystem.Areas.Api.Controllers.v1
         public JsonResult Set(string value)
         {
             value = DesDecrypt(value);
+            value = value.Replace("null", "\"\"");
             JsonData data = JsonMapper.ToObject(value);
             AppResultJson result = SetDo(value);
             return Json(new AppResultJson() { Status = result.Status, Info = result.Info, Data = result.Data });
@@ -68,13 +70,13 @@ namespace MySystem.Areas.Api.Controllers.v1
         public AppResultJson SetDo(string value)
         {
             JsonData data = JsonMapper.ToObject(value);
-            int IsAll = int.Parse(function.CheckInt(data["IsAll"].ToString())); //是否收全额
-            decimal MinPayMoney = decimal.Parse(function.CheckNum(data["MinPayMoney"].ToString())); //订单参与门槛
-            decimal GetPercent = decimal.Parse(function.CheckNum(data["GetPercent"].ToString())); //商家实收比例
-            int ProfitDays = int.Parse(function.CheckInt(data["ProfitDays"].ToString())); //分红期限(天)
-            decimal DiviPercent = decimal.Parse(function.CheckNum(data["DiviPercent"].ToString())); //最大分红比例
-            int DiviPersons = int.Parse(function.CheckInt(data["DiviPersons"].ToString())); //单笔订单分红人数
-            string MobileCode = data["MobileCode"].ToString(); //短信验证码
+            int IsAll = int.Parse(function.CheckInt(data.getItem("IsAll").ToString())); //是否收全额
+            decimal MinPayMoney = decimal.Parse(function.CheckNum(data.getItem("MinPayMoney").ToString())); //订单参与门槛
+            decimal GetPercent = decimal.Parse(function.CheckNum(data.getItem("GetPercent").ToString())); //商家实收比例
+            int ProfitDays = int.Parse(function.CheckInt(data.getItem("ProfitDays").ToString())); //分红期限(天)
+            decimal DiviPercent = decimal.Parse(function.CheckNum(data.getItem("DiviPercent").ToString())); //最大分红比例
+            int DiviPersons = int.Parse(function.CheckInt(data.getItem("DiviPersons").ToString())); //单笔订单分红人数
+            string MobileCode = data.getItem("MobileCode").ToString(); //短信验证码
             if (string.IsNullOrEmpty(data["IsAll"].ToString()))
             {
                 return new AppResultJson() { Status = "-1", Info = "请填写是否收全额" };

+ 15 - 11
Areas/Api/Controllers/Main/MerchantQrCodeController.cs

@@ -31,6 +31,7 @@ namespace MySystem.Areas.Api.Controllers.v1
         public JsonResult List(string value)
         {
             value = DesDecrypt(value);
+            value = value.Replace("null", "\"\"");
             JsonData data = JsonMapper.ToObject(value);
             List<Dictionary<string, object>> dataList = ListDo(value);
             return Json(new AppResultJson() { Status = "1", Info = "", Data = dataList });
@@ -38,9 +39,9 @@ namespace MySystem.Areas.Api.Controllers.v1
         public List<Dictionary<string, object>> ListDo(string value)
         {
             JsonData data = JsonMapper.ToObject(value);
-            int MerchantId = int.Parse(function.CheckInt(data["MerchantId"].ToString())); //商户
-            int PageSize = int.Parse(function.CheckInt(data["PageSize"].ToString()));
-            int PageNum = int.Parse(function.CheckInt(data["PageNum"].ToString()));
+            int MerchantId = int.Parse(function.CheckInt(data.getItem("MerchantId").ToString())); //商户
+            int PageSize = int.Parse(function.CheckInt(data.getItem("PageSize").ToString()));
+            int PageNum = int.Parse(function.CheckInt(data.getItem("PageNum").ToString()));
             List<Dictionary<string, object>> dataList = new List<Dictionary<string, object>>();
             Models.Main.MerchantInfo merchant = MerchantInfoDbconn.Instance.Get(MerchantId) ?? new Models.Main.MerchantInfo();
             IQueryable<Models.Main1.MerchantQrCode> query = main1db.MerchantQrCode.Where(m => m.MerchantId == MerchantId && m.QueryCount == 2);
@@ -75,6 +76,7 @@ namespace MySystem.Areas.Api.Controllers.v1
         public JsonResult Bind(string value)
         {
             value = DesDecrypt(value);
+            value = value.Replace("null", "\"\"");
             JsonData data = JsonMapper.ToObject(value);
             AppResultJson result = BindDo(value);
             return Json(new AppResultJson() { Status = result.Status, Info = result.Info, Data = result.Data });
@@ -82,9 +84,9 @@ namespace MySystem.Areas.Api.Controllers.v1
         public AppResultJson BindDo(string value)
         {
             JsonData data = JsonMapper.ToObject(value);
-            int MerchantId = int.Parse(function.CheckInt(data["MerchantId"].ToString())); //商户
-            string SnNo = data["SnNo"].ToString(); //Sn编号
-            string MachineNo = data["Machine"].ToString(); //音箱码
+            int MerchantId = int.Parse(function.CheckInt(data.getItem("MerchantId").ToString())); //商户
+            string SnNo = data.getItem("SnNo").ToString(); //Sn编号
+            string MachineNo = data.getItem("Machine").ToString(); //音箱码
             if (SnNo.Length > 20)
             {
                 SnNo = System.Web.HttpUtility.UrlDecode(SnNo);
@@ -221,6 +223,7 @@ namespace MySystem.Areas.Api.Controllers.v1
         public JsonResult ConfirmReplace(string value)
         {
             value = DesDecrypt(value);
+            value = value.Replace("null", "\"\"");
             JsonData data = JsonMapper.ToObject(value);
             AppResultJson result = ConfirmReplaceDo(value);
             return Json(new AppResultJson() { Status = result.Status, Info = result.Info, Data = result.Data });
@@ -228,9 +231,9 @@ namespace MySystem.Areas.Api.Controllers.v1
         public AppResultJson ConfirmReplaceDo(string value)
         {
             JsonData data = JsonMapper.ToObject(value);
-            int MerchantId = int.Parse(function.CheckInt(data["MerchantId"].ToString())); //商户
-            int MachineId = int.Parse(function.CheckInt(data["MachineId"].ToString())); //设备
-            int QrCodeId = int.Parse(function.CheckInt(data["QrCodeId"].ToString())); //收款码Id
+            int MerchantId = int.Parse(function.CheckInt(data.getItem("MerchantId").ToString())); //商户
+            int MachineId = int.Parse(function.CheckInt(data.getItem("MachineId").ToString())); //设备
+            int QrCodeId = int.Parse(function.CheckInt(data.getItem("QrCodeId").ToString())); //收款码Id
             Dictionary<string, object> Obj = new Dictionary<string, object>();
             Models.Main1.MerchantQrCode query = MerchantQrCodeService.Query(QrCodeId) ?? new Models.Main1.MerchantQrCode();
             Models.Main1.PosMachines machine = PosMachinesDbconn.Instance.Get(MachineId) ?? new Models.Main1.PosMachines();
@@ -254,6 +257,7 @@ namespace MySystem.Areas.Api.Controllers.v1
         public JsonResult Remove(string value)
         {
             value = DesDecrypt(value);
+            value = value.Replace("null", "\"\"");
             JsonData data = JsonMapper.ToObject(value);
             AppResultJson result = RemoveDo(value);
             return Json(new AppResultJson() { Status = result.Status, Info = result.Info, Data = result.Data });
@@ -261,8 +265,8 @@ namespace MySystem.Areas.Api.Controllers.v1
         public AppResultJson RemoveDo(string value)
         {
             JsonData data = JsonMapper.ToObject(value);
-            int MerchantId = int.Parse(function.CheckInt(data["MerchantId"].ToString())); //商户
-            int Id = int.Parse(function.CheckInt(data["Id"].ToString()));
+            int MerchantId = int.Parse(function.CheckInt(data.getItem("MerchantId").ToString())); //商户
+            int Id = int.Parse(function.CheckInt(data.getItem("Id").ToString()));
             Dictionary<string, object> Obj = new Dictionary<string, object>();
             string CheckKey = Id + "_";
             var list = main1db.MachineForQrCode.Select(m => new { m.MerchantId, m.DataId }).Where(m => m.MerchantId == MerchantId && m.DataId.StartsWith(CheckKey)).ToList();

+ 2 - 1
Areas/Api/Controllers/Main/MobileCodeCheckController.cs

@@ -28,6 +28,7 @@ namespace MySystem.Areas.Api.Controllers.v1
         public JsonResult SendSms(string value)
         {
             value = DesDecrypt(value);
+            value = value.Replace("null", "\"\"");
             JsonData data = JsonMapper.ToObject(value);
             AppResultJson result = SendSmsDo(value);
             return Json(new AppResultJson() { Status = result.Status, Info = result.Info, Data = result.Data });
@@ -36,7 +37,7 @@ namespace MySystem.Areas.Api.Controllers.v1
         {
             JsonData data = JsonMapper.ToObject(value);
             Dictionary<string, object> Obj = new Dictionary<string, object>();
-            string Mobile = data["Mobile"].ToString(); //手机号
+            string Mobile = data.getItem("Mobile").ToString(); //手机号
             MobileCodeCheck check = RedisDbconn.Instance.Get<MobileCodeCheck>("MobileCodeCheck:" + Mobile);
             if (check != null)
             { 

+ 4 - 3
Areas/Api/Controllers/Main/OpenBankTableController.cs

@@ -29,6 +29,7 @@ namespace MySystem.Areas.Api.Controllers.v1
         public JsonResult List(string value)
         {
             value = DesDecrypt(value);
+            value = value.Replace("null", "\"\"");
             JsonData data = JsonMapper.ToObject(value);
             List<Dictionary<string, object>> dataList = ListDo(value);
             return Json(new AppResultJson() { Status = "1", Info = "", Data = dataList });
@@ -36,9 +37,9 @@ namespace MySystem.Areas.Api.Controllers.v1
         public List<Dictionary<string, object>> ListDo(string value)
         {
             JsonData data = JsonMapper.ToObject(value);
-            string SearchKey = data["SearchKey"].ToString(); //搜索关键词
-            int PageSize = int.Parse(function.CheckInt(data["PageSize"].ToString()));
-            int PageNum = int.Parse(function.CheckInt(data["PageNum"].ToString()));
+            string SearchKey = data.getItem("SearchKey").ToString(); //搜索关键词
+            int PageSize = int.Parse(function.CheckInt(data.getItem("PageSize").ToString()));
+            int PageNum = int.Parse(function.CheckInt(data.getItem("PageNum").ToString()));
             string condition = ""; //查询条件
             if (value.Contains("\"Areas\""))
             {

+ 16 - 12
Areas/Api/Controllers/Main/PosCouponOrdersController.cs

@@ -30,6 +30,7 @@ namespace MySystem.Areas.Api.Controllers.v1.pos
         public JsonResult List(string value)
         {
             value = DesDecrypt(value);
+            value = value.Replace("null", "\"\"");
             JsonData data = JsonMapper.ToObject(value);
             Dictionary<string, object> other = new Dictionary<string, object>();
             List<Dictionary<string, object>> dataList = ListDo(value, out other);
@@ -38,10 +39,10 @@ namespace MySystem.Areas.Api.Controllers.v1.pos
         public List<Dictionary<string, object>> ListDo(string value, out Dictionary<string, object> other)
         {
             JsonData data = JsonMapper.ToObject(value);
-            int UserId = int.Parse(function.CheckInt(data["UserId"].ToString())); //创客Id
-            int ChangeKind = int.Parse(function.CheckInt(data["ChangeKind"].ToString())); // 1-拨入,2-拨出
-            int PageSize = int.Parse(function.CheckInt(data["PageSize"].ToString()));
-            int PageNum = int.Parse(function.CheckInt(data["PageNum"].ToString()));
+            int UserId = int.Parse(function.CheckInt(data.getItem("UserId").ToString())); //创客Id
+            int ChangeKind = int.Parse(function.CheckInt(data.getItem("ChangeKind").ToString())); // 1-拨入,2-拨出
+            int PageSize = int.Parse(function.CheckInt(data.getItem("PageSize").ToString()));
+            int PageNum = int.Parse(function.CheckInt(data.getItem("PageNum").ToString()));
             List<Dictionary<string, object>> dataList = new List<Dictionary<string, object>>();
             IQueryable<PosCouponOrders> query = maindb.PosCouponOrders.Where(m=> m.ChangeKind == 1);
             if(ChangeKind == 1)
@@ -116,6 +117,7 @@ namespace MySystem.Areas.Api.Controllers.v1.pos
         public JsonResult Detail(string value)
         {
             value = DesDecrypt(value);
+            value = value.Replace("null", "\"\"");
             JsonData data = JsonMapper.ToObject(value);
             Dictionary<string, object> Obj = DetailDo(value);
             return Json(new AppResultJson() { Status = "1", Info = "", Data = Obj });
@@ -124,8 +126,8 @@ namespace MySystem.Areas.Api.Controllers.v1.pos
         {
             JsonData data = JsonMapper.ToObject(value);
             Dictionary<string, object> Obj = new Dictionary<string, object>();
-            int UserId = int.Parse(function.CheckInt(data["UserId"].ToString()));
-            int Id = int.Parse(function.CheckInt(data["Id"].ToString()));
+            int UserId = int.Parse(function.CheckInt(data.getItem("UserId").ToString()));
+            int Id = int.Parse(function.CheckInt(data.getItem("Id").ToString()));
             PosCouponOrders query = maindb.PosCouponOrders.FirstOrDefault(m => m.Id == Id) ?? new PosCouponOrders();
             string OrderNo = query.OrderNo;
             Dictionary<string, object> UserInfo = new Dictionary<string, object>();
@@ -175,6 +177,7 @@ namespace MySystem.Areas.Api.Controllers.v1.pos
         public JsonResult List2(string value)
         {
             value = DesDecrypt(value);
+            value = value.Replace("null", "\"\"");
             JsonData data = JsonMapper.ToObject(value);
             Dictionary<string, object> other = new Dictionary<string, object>();
             List<Dictionary<string, object>> dataList = List2Do(value, out other);
@@ -183,10 +186,10 @@ namespace MySystem.Areas.Api.Controllers.v1.pos
         public List<Dictionary<string, object>> List2Do(string value, out Dictionary<string, object> other)
         {
             JsonData data = JsonMapper.ToObject(value);
-            int UserId = int.Parse(function.CheckInt(data["UserId"].ToString())); //创客Id
-            int ChangeKind = int.Parse(function.CheckInt(data["ChangeKind"].ToString())); // 1-拨入,2-拨出
-            int PageSize = int.Parse(function.CheckInt(data["PageSize"].ToString()));
-            int PageNum = int.Parse(function.CheckInt(data["PageNum"].ToString()));
+            int UserId = int.Parse(function.CheckInt(data.getItem("UserId").ToString())); //创客Id
+            int ChangeKind = int.Parse(function.CheckInt(data.getItem("ChangeKind").ToString())); // 1-拨入,2-拨出
+            int PageSize = int.Parse(function.CheckInt(data.getItem("PageSize").ToString()));
+            int PageNum = int.Parse(function.CheckInt(data.getItem("PageNum").ToString()));
             List<Dictionary<string, object>> dataList = new List<Dictionary<string, object>>();
             IQueryable<PosCouponOrders> query = maindb.PosCouponOrders.Where(m=> m.ChangeKind == 2);
             if(ChangeKind == 1)
@@ -261,6 +264,7 @@ namespace MySystem.Areas.Api.Controllers.v1.pos
         public JsonResult Detail2(string value)
         {
             value = DesDecrypt(value);
+            value = value.Replace("null", "\"\"");
             JsonData data = JsonMapper.ToObject(value);
             Dictionary<string, object> Obj = Detail2Do(value);
             return Json(new AppResultJson() { Status = "1", Info = "", Data = Obj });
@@ -269,8 +273,8 @@ namespace MySystem.Areas.Api.Controllers.v1.pos
         {
             JsonData data = JsonMapper.ToObject(value);
             Dictionary<string, object> Obj = new Dictionary<string, object>();
-            int UserId = int.Parse(function.CheckInt(data["UserId"].ToString()));
-            int Id = int.Parse(function.CheckInt(data["Id"].ToString()));
+            int UserId = int.Parse(function.CheckInt(data.getItem("UserId").ToString()));
+            int Id = int.Parse(function.CheckInt(data.getItem("Id").ToString()));
             PosCouponOrders query = maindb.PosCouponOrders.FirstOrDefault(m => m.Id == Id) ?? new PosCouponOrders();
             string OrderNo = query.OrderNo;
             Dictionary<string, object> UserInfo = new Dictionary<string, object>();

+ 5 - 3
Areas/Api/Controllers/Main/PosCouponRecordController.cs

@@ -29,6 +29,7 @@ namespace MySystem.Areas.Api.Controllers.v1.pos
         public JsonResult Add(string value)
         {
             value = DesDecrypt(value);
+            value = value.Replace("null", "\"\"");
             JsonData data = JsonMapper.ToObject(value);
             AppResultJson result = AddDo(value);
             return Json(new AppResultJson() { Status = result.Status, Info = result.Info, Data = result.Data });
@@ -111,6 +112,7 @@ namespace MySystem.Areas.Api.Controllers.v1.pos
         public JsonResult Add2(string value)
         {
             value = DesDecrypt(value);
+            value = value.Replace("null", "\"\"");
             JsonData data = JsonMapper.ToObject(value);
             AppResultJson result = Add2Do(value);
             return Json(new AppResultJson() { Status = result.Status, Info = result.Info, Data = result.Data });
@@ -118,9 +120,9 @@ namespace MySystem.Areas.Api.Controllers.v1.pos
         public AppResultJson Add2Do(string value)
         {
             JsonData data = JsonMapper.ToObject(value);
-            int ToUserId = int.Parse(function.CheckInt(data["ToUserId"].ToString())); //目标创客
-            int UserId = int.Parse(function.CheckInt(data["UserId"].ToString())); //创客Id
-            string SnIds = data["SnIds"].ToString(); //码牌列表返回的Id集合
+            int ToUserId = int.Parse(function.CheckInt(data.getItem("ToUserId").ToString())); //目标创客
+            int UserId = int.Parse(function.CheckInt(data.getItem("UserId").ToString())); //创客Id
+            string SnIds = data.getItem("SnIds").ToString(); //码牌列表返回的Id集合
             Dictionary<string, object> Obj = new Dictionary<string, object>();
             bool checkUser = kxsdb.Users.Any(m => m.Id == ToUserId);
             if (!checkUser)

+ 13 - 0
Areas/Api/Controllers/Main/PosMachinesController.cs

@@ -29,6 +29,7 @@ namespace MySystem.Areas.Api.Controllers.v1
         public JsonResult List(string value)
         {
             value = DesDecrypt(value);
+            value = value.Replace("null", "\"\"");
             JsonData data = JsonMapper.ToObject(value);
             List<Dictionary<string, object>> dataList = ListDo(value);
             return Json(new AppResultJson() { Status = "1", Info = "", Data = dataList });
@@ -63,6 +64,7 @@ namespace MySystem.Areas.Api.Controllers.v1
         public JsonResult BindedMachines(string value)
         {
             value = DesDecrypt(value);
+            value = value.Replace("null", "\"\"");
             JsonData data = JsonMapper.ToObject(value);
             List<Dictionary<string, object>> dataList = BindedMachinesDo(value);
             return Json(new AppResultJson() { Status = "1", Info = "", Data = dataList });
@@ -117,6 +119,7 @@ namespace MySystem.Areas.Api.Controllers.v1
         public JsonResult ReplaceMachines(string value)
         {
             value = DesDecrypt(value);
+            value = value.Replace("null", "\"\"");
             JsonData data = JsonMapper.ToObject(value);
             List<Dictionary<string, object>> dataList = ReplaceMachinesDo(value);
             return Json(new AppResultJson() { Status = "1", Info = "", Data = dataList });
@@ -147,6 +150,7 @@ namespace MySystem.Areas.Api.Controllers.v1
         public JsonResult Add(string value)
         {
             value = DesDecrypt(value);
+            value = value.Replace("null", "\"\"");
             JsonData data = JsonMapper.ToObject(value);
             AppResultJson result = AddDo(value);
             return Json(new AppResultJson() { Status = result.Status, Info = result.Info, Data = result.Data });
@@ -180,6 +184,7 @@ namespace MySystem.Areas.Api.Controllers.v1
         public JsonResult BindList(string value)
         {
             value = DesDecrypt(value);
+            value = value.Replace("null", "\"\"");
             JsonData data = JsonMapper.ToObject(value);
             List<Dictionary<string, object>> dataList = BindListDo(value);
             return Json(new AppResultJson() { Status = "1", Info = "", Data = dataList });
@@ -215,6 +220,7 @@ namespace MySystem.Areas.Api.Controllers.v1
         public JsonResult Bind(string value)
         {
             value = DesDecrypt(value);
+            value = value.Replace("null", "\"\"");
             JsonData data = JsonMapper.ToObject(value);
             AppResultJson result = BindDo(value);
             return Json(new AppResultJson() { Status = result.Status, Info = result.Info, Data = result.Data });
@@ -242,6 +248,7 @@ namespace MySystem.Areas.Api.Controllers.v1
         public JsonResult Remove(string value)
         {
             value = DesDecrypt(value);
+            value = value.Replace("null", "\"\"");
             JsonData data = JsonMapper.ToObject(value);
             AppResultJson result = RemoveDo(value);
             return Json(new AppResultJson() { Status = result.Status, Info = result.Info, Data = result.Data });
@@ -281,6 +288,7 @@ namespace MySystem.Areas.Api.Controllers.v1
         public JsonResult MyMachinesForBind(string value)
         {
             value = DesDecrypt(value);
+            value = value.Replace("null", "\"\"");
             JsonData data = JsonMapper.ToObject(value);
             Dictionary<string, object> Other = new Dictionary<string, object>();
             List<Dictionary<string, object>> dataList = MyMachinesForBindDo(value, out Other);
@@ -355,6 +363,7 @@ namespace MySystem.Areas.Api.Controllers.v1
         public JsonResult MyMachines(string value)
         {
             value = DesDecrypt(value);
+            value = value.Replace("null", "\"\"");
             JsonData data = JsonMapper.ToObject(value);
             Dictionary<string, object> Other = new Dictionary<string, object>();
             List<Dictionary<string, object>> dataList = MyMachinesDo(value, out Other);
@@ -429,6 +438,7 @@ namespace MySystem.Areas.Api.Controllers.v1
         public JsonResult MyMachinesForUnBind(string value)
         {
             value = DesDecrypt(value);
+            value = value.Replace("null", "\"\"");
             JsonData data = JsonMapper.ToObject(value);
             Dictionary<string, object> Other = new Dictionary<string, object>();
             List<Dictionary<string, object>> dataList = MyMachinesForUnBindDo(value, out Other);
@@ -514,6 +524,7 @@ namespace MySystem.Areas.Api.Controllers.v1
         public JsonResult MyMachinesForBind2(string value)
         {
             value = DesDecrypt(value);
+            value = value.Replace("null", "\"\"");
             JsonData data = JsonMapper.ToObject(value);
             Dictionary<string, object> Other = new Dictionary<string, object>();
             List<Dictionary<string, object>> dataList = MyMachinesForBind2Do(value, out Other);
@@ -579,6 +590,7 @@ namespace MySystem.Areas.Api.Controllers.v1
         public JsonResult MyMachines2(string value)
         {
             value = DesDecrypt(value);
+            value = value.Replace("null", "\"\"");
             JsonData data = JsonMapper.ToObject(value);
             Dictionary<string, object> Other = new Dictionary<string, object>();
             List<Dictionary<string, object>> dataList = MyMachines2Do(value, out Other);
@@ -645,6 +657,7 @@ namespace MySystem.Areas.Api.Controllers.v1
         public JsonResult MyMachinesForUnBind2(string value)
         {
             value = DesDecrypt(value);
+            value = value.Replace("null", "\"\"");
             JsonData data = JsonMapper.ToObject(value);
             Dictionary<string, object> Other = new Dictionary<string, object>();
             List<Dictionary<string, object>> dataList = MyMachinesForUnBind2Do(value, out Other);

+ 1 - 0
Areas/Api/Controllers/Main/ProfitRewardRecordController.cs

@@ -29,6 +29,7 @@ namespace MySystem.Areas.Api.Controllers.v1
         public JsonResult TradeProfitList(string value)
         {
             value = DesDecrypt(value);
+            value = value.Replace("null", "\"\"");
             JsonData data = JsonMapper.ToObject(value);
             List<Dictionary<string, object>> dataList = TradeProfitListDo(value);
             return Json(new AppResultJson() { Status = "1", Info = "", Data = dataList });

+ 4 - 0
Areas/Api/Controllers/MySelf/MySelfController.cs

@@ -28,6 +28,7 @@ namespace MySystem.Areas.Api.Controllers.v1
         public JsonResult CardInComeRecordList(string value)
         {
             value = DesDecrypt(value);
+            value = value.Replace("null", "\"\"");
             JsonData data = JsonMapper.ToObject(value);
             List<Dictionary<string, object>> dataList = CardInComeRecordListDo(value);
             return Json(new AppResultJson() { Status = "1", Info = "", Data = dataList });
@@ -50,6 +51,7 @@ namespace MySystem.Areas.Api.Controllers.v1
         public JsonResult CardInComeRecordDetail(string value)
         {
             value = DesDecrypt(value);
+            value = value.Replace("null", "\"\"");
             JsonData data = JsonMapper.ToObject(value);
             Dictionary<string, object> obj = CardInComeRecordDetailDo(value);
             return Json(new AppResultJson() { Status = "1", Info = "", Data = obj });
@@ -70,6 +72,7 @@ namespace MySystem.Areas.Api.Controllers.v1
         public JsonResult OldMobileCheck(string value)
         {
             value = DesDecrypt(value);
+            value = value.Replace("null", "\"\"");
             JsonData data = JsonMapper.ToObject(value);
             AppResultJson result = OldMobileCheckDo(value);
             return Json(new AppResultJson() { Status = result.Status, Info = result.Info, Data = result.Data });
@@ -99,6 +102,7 @@ namespace MySystem.Areas.Api.Controllers.v1
         public JsonResult ChangeLoginMobile(string value)
         {
             value = DesDecrypt(value);
+            value = value.Replace("null", "\"\"");
             JsonData data = JsonMapper.ToObject(value);
             AppResultJson result = ChangeLoginMobileDo(value);
             return Json(new AppResultJson() { Status = result.Status, Info = result.Info, Data = result.Data });

+ 2 - 0
Areas/Api/Controllers/WorkSpace/WorkSpaceController.cs

@@ -28,6 +28,7 @@ namespace MySystem.Areas.Api.Controllers.v1
         public JsonResult IndexStat(string value)
         {
             value = DesDecrypt(value);
+            value = value.Replace("null", "\"\"");
             JsonData data = JsonMapper.ToObject(value);
             Dictionary<string, object> Obj = IndexStatDo(value);
             return Json(new AppResultJson() { Status = "1", Info = "", Data = Obj });
@@ -48,6 +49,7 @@ namespace MySystem.Areas.Api.Controllers.v1
         public JsonResult Detail(string value)
         {
             value = DesDecrypt(value);
+            value = value.Replace("null", "\"\"");
             JsonData data = JsonMapper.ToObject(value);
             Dictionary<string, object> Obj = DetailDo(value);
             return Json(new AppResultJson() { Status = "1", Info = "", Data = Obj });

+ 1 - 1
Util/Extension/JsonDataExtension.cs

@@ -10,7 +10,7 @@ namespace MySystem
         #region 获取是否存在Key, isFlag判断是抛出异常还是返回""
         public static object getItem(this JsonData input, string key)
         {
-            string jsonString = input.ToJson().Replace("null", "\"\"");
+            string jsonString = input.ToJson();
             if (jsonString.Contains("\"" + key + "\""))
             {
                 return input[key];

+ 1 - 1
Util/Main/MerchantAddInfoUtil.cs

@@ -279,7 +279,7 @@ namespace MySystem
 
             Obj.Add("OpenBankAccout", query.OpenBankAccout); // 开户许可证-银行卡号
             Obj.Add("OpenBankAccName", query.OpenBankAccName); // 开户许可证-开户名
-            Obj.Add("OpenBankName", query.OpenUnionNo); // 开户许可证-开户行全称
+            Obj.Add("OpenBankName", OpenBankAllService.Query(" BankChildNo='" + query.OpenUnionNo + "'").BankChild); // 开户许可证-开户行全称
             var str = "";
             str = HaoDaAreaCodeService.Query("CityCode='" + query.OpenBankRegionCode + "'").CityName;
             string OpenBankRegionCode = "";