播放设置 限制添加
This commit is contained in:
parent
1c78b649d0
commit
7ed674cf48
@ -150,5 +150,29 @@ namespace APT.PF.WebApiControllers.Api.PF
|
||||
return model;
|
||||
});
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 更新或新增数据
|
||||
/// </summary>
|
||||
/// <param name="entity">对象实体</param>
|
||||
/// <returns></returns>
|
||||
[HttpPost, Route("UpdatePlaySet")]
|
||||
public JsonActionResult<bool> UpdatePlaySet([FromBody] T_PF_BIPLAY_SET entity)
|
||||
{
|
||||
return SafeExecute(() =>
|
||||
{
|
||||
if (entity.V_ISAUTO && !entity.V_ISSILENT)
|
||||
{
|
||||
throw new Exception("自动播放必须静音!");
|
||||
}
|
||||
if (!entity.V_ISSHOWCONTROL && !entity.V_ISAUTO)
|
||||
{
|
||||
throw new Exception("不自动播放必须显示控制器!");
|
||||
}
|
||||
bool result = UpdateEntity(entity);
|
||||
return result;
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user