public APIResult SetIsUsed([FromBody] SetIsUsedArgsModel args) { //TODO:这里还需要判定是否可以操作当前店铺 var model = db.GetSingle <ShopBooking>(args.Id); if (model == null) { throw new Exception("数据库记录不存在"); } model.IsUsed = args.IsUsed; db.SaveChanges(); return(Success()); }
public APIResult SetIsUsed([FromBody] SetIsUsedArgsModel args) { //TODO:这里还需要判定是否可以操作当前店铺 var model = db.GetSingle <ShopCallingQueue>(args.Id); if (model == null) { throw new Exception("数据库记录不存在"); } //获取到订单后判断是否拥有指定的店铺的权限 CheckShopActor(model.ShopId, ShopActorType.超级管理员); model.IsUsed = args.IsUsed; db.SaveChanges(); return(Success()); }