【优化】移除后台提货单的删除功能,防止删除后导致无法提货的问题。

This commit is contained in:
jianweie code
2023-12-06 17:10:35 +08:00
parent 860962ec4d
commit 1b16b65bb6
2 changed files with 27 additions and 29 deletions

View File

@@ -327,25 +327,25 @@ namespace CoreCms.Net.Web.Admin.Controllers
/// </summary>
/// <param name="entity"></param>
/// <returns></returns>
[HttpPost]
[Description("单选删除")]
public async Task<AdminUiCallBack> DoDelete([FromBody] FMIntId entity)
{
var jm = new AdminUiCallBack();
//[HttpPost]
//[Description("单选删除")]
//public async Task<AdminUiCallBack> DoDelete([FromBody] FMIntId entity)
//{
// var jm = new AdminUiCallBack();
var model = await _coreCmsBillLadingServices.QueryByIdAsync(entity.id);
if (model == null)
{
jm.msg = GlobalConstVars.DataisNo;
return jm;
}
// var model = await _coreCmsBillLadingServices.QueryByIdAsync(entity.id);
// if (model == null)
// {
// jm.msg = GlobalConstVars.DataisNo;
// return jm;
// }
var bl = await _coreCmsBillLadingServices.DeleteByIdAsync(entity.id);
jm.code = bl ? 0 : 1;
jm.msg = bl ? GlobalConstVars.DeleteSuccess : GlobalConstVars.DeleteFailure;
return jm;
// var bl = await _coreCmsBillLadingServices.DeleteByIdAsync(entity.id);
// jm.code = bl ? 0 : 1;
// jm.msg = bl ? GlobalConstVars.DeleteSuccess : GlobalConstVars.DeleteFailure;
// return jm;
}
//}
#endregion