|
@@ -36,19 +36,25 @@ namespace MySystem.Areas.Api.Controllers.v1
|
|
|
{
|
|
|
JsonData data = JsonMapper.ToObject(value);
|
|
|
string SearchKey = data["SearchKey"].ToString(); //搜索关键词
|
|
|
- string Areas = data["Areas"].ToString();
|
|
|
- string BankName = data["BankName"].ToString();
|
|
|
int PageSize = int.Parse(function.CheckInt(data["PageSize"].ToString()));
|
|
|
int PageNum = int.Parse(function.CheckInt(data["PageNum"].ToString()));
|
|
|
List<Dictionary<string, object>> dataList = new List<Dictionary<string, object>>();
|
|
|
IQueryable<OpenBankTable> query = maindb.OpenBankTable;
|
|
|
- if(!string.IsNullOrEmpty(SearchKey))
|
|
|
+ if(!value.Contains("\"Areas\""))
|
|
|
{
|
|
|
- query = query.Where(m => m.BankName.Contains(Areas));
|
|
|
+ if(!string.IsNullOrEmpty(data["Areas"].ToString()))
|
|
|
+ {
|
|
|
+ string Areas = data["Areas"].ToString();
|
|
|
+ query = query.Where(m => m.BankName.Contains(Areas));
|
|
|
+ }
|
|
|
}
|
|
|
- if(!string.IsNullOrEmpty(SearchKey))
|
|
|
+ if(!value.Contains("\"BankName\""))
|
|
|
{
|
|
|
- query = query.Where(m => m.BankName.Contains(BankName));
|
|
|
+ if(!string.IsNullOrEmpty(data["BankName"].ToString()))
|
|
|
+ {
|
|
|
+ string BankName = data["BankName"].ToString();
|
|
|
+ query = query.Where(m => m.BankName.Contains(BankName));
|
|
|
+ }
|
|
|
}
|
|
|
if(!string.IsNullOrEmpty(SearchKey))
|
|
|
{
|