|
@@ -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 });
|