ningshuxia
2022-08-19 153da1eef16b51d75442779a3964a1c5413132e4
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
using SqlSugar;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
 
namespace IStation.DAL
{
    /// <summary>
    /// 
    /// </summary>
    public partial class BaseTraceDAL_Sorter_UseStatus<T> : BaseTraceDAL_Sorter<T> where T : Entity.BaseTraceEntity, Entity.ISorter, Entity.IUseStatus, new()
    {
        /// <summary>
        /// 更新使用状态
        /// </summary>
        public virtual bool UpdateUseStatus(long ID, int UseStatus,long UpdateUserID,DateTime UpdateTime)
        {
            using (SqlSugarClient db = new SqlSugarClient(ConnectionConfig))
            {
                return db.Updateable<T>()
                    .SetColumns(x => x.UseStatus == UseStatus)
                    .SetColumns(x => x.UpdateUserID == UpdateUserID)
                    .SetColumns(x => x.UpdateTime == UpdateTime)
                    .Where(x => x.ID == ID)
                    .ExecuteCommandHasChange();
            }
        }
 
    }
}