初始化
This commit is contained in:
48
Face.Web/Areas/App/Controllers/QueryFaceStatusController.cs
Normal file
48
Face.Web/Areas/App/Controllers/QueryFaceStatusController.cs
Normal file
@@ -0,0 +1,48 @@
|
||||
using Face.Domain.Entities;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using System.Web.Mvc;
|
||||
|
||||
namespace Face.Web.Areas.App.Controllers
|
||||
{
|
||||
public class QueryFaceStatusController : Controller
|
||||
{
|
||||
// GET: App/QueryFaceStatus
|
||||
[HttpPost]
|
||||
public ActionResult QueryStatus(string HotelCode,string roomid,string key,string appid)
|
||||
{
|
||||
pmsLog list = new pmsLog();
|
||||
pmsLog listn = new pmsLog();
|
||||
//pmsLog pms= SqlSugarBase.Db.Insertable(log).ExecuteCommand();
|
||||
if (key== "blw_888")
|
||||
{
|
||||
list = SqlSugarBase.Db.Queryable<pmsLog>().OrderByDescending(x => x.Creationtime).First(x => x.HotelCode == HotelCode && x.roomid == roomid);
|
||||
if (list == null)
|
||||
{
|
||||
var json = new
|
||||
{
|
||||
Status = 100,
|
||||
message = "提供的酒店code和roomid没有查询到信息,请查看传递的信息是否有误!"
|
||||
};
|
||||
return Json(json);
|
||||
}
|
||||
listn = SqlSugarBase.Db.Queryable<pmsLog>().OrderByDescending(x => x.Creationtime).First(x => x.pmsid == list.pmsid);
|
||||
}
|
||||
else
|
||||
{
|
||||
var json = new
|
||||
{
|
||||
Status = 200,
|
||||
message = "提供的Key值有误!"
|
||||
};
|
||||
return Json(json);
|
||||
}
|
||||
|
||||
|
||||
|
||||
return Json(listn);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user