修改 盘点任务代码
This commit is contained in:
@@ -3,9 +3,12 @@ using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Aop.Api.Domain;
|
||||
using JNPF.Common.Contracts;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using SqlSugar;
|
||||
using Tnb.WarehouseMgr.Entities.Entity.Constraints;
|
||||
using Tnb.WarehouseMgr.Interfaces;
|
||||
|
||||
namespace Tnb.WarehouseMgr
|
||||
{
|
||||
@@ -13,17 +16,13 @@ namespace Tnb.WarehouseMgr
|
||||
/// Wms基础数据基类
|
||||
/// </summary>
|
||||
/// <typeparam name="TEntity"></typeparam>
|
||||
//public class WmsBasicDataBase<TEntity> : BaseWareHouseService where TEntity : BaseEntity<string>, new()
|
||||
//{
|
||||
// private readonly ISqlSugarClient _db;
|
||||
// public WmsBasicDataBase()
|
||||
// {
|
||||
|
||||
// }
|
||||
// [HttpPost]
|
||||
// public async Task<bool> IsEnabledMark(IEnumerable<string> ids,int status)
|
||||
// {
|
||||
|
||||
// }
|
||||
//}
|
||||
public class WmsBasicDataBase<TEntity> : BaseWareHouseService where TEntity : BaseEntity<string>, IUpdateEnabledEntity, new()
|
||||
{
|
||||
protected ISqlSugarClient DbContext { get; set; }
|
||||
[HttpPost]
|
||||
public async Task<bool> IsEnabledMark(IEnumerable<string> ids, int status)
|
||||
{
|
||||
return await DbContext.Updateable<TEntity>().SetColumns(it => it.enabled == status).ExecuteCommandHasChangeAsync();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user