using SqlSugar;
|
using System;
|
using System.Collections.Generic;
|
using System.Data;
|
using System.Linq;
|
|
namespace IStation.DAL
|
{
|
/// <summary>
|
///
|
/// </summary>
|
public partial class SpecialProperty : CorpTraceDAL_Sorter<Entity.SpecialProperty>
|
{
|
/// <summary>
|
///
|
/// </summary>
|
public override ConnectionConfig ConnectionConfig
|
{
|
get { return ConfigHelper.DefaultConnectionConfig; }
|
|
}
|
|
/// <summary>
|
/// 通过 GroupID 获取
|
/// </summary>
|
public List<Entity.SpecialProperty> GetByGroupID(long CorpID, long GroupID)
|
{
|
using (var db = new SqlSugarClient(ConnectionConfig))
|
{
|
return db.Queryable<Entity.SpecialProperty>().Where(x => x.CorpID == CorpID && x.GroupID == GroupID).ToList();
|
}
|
}
|
|
|
/// <summary>
|
/// 更新 GroupID
|
/// </summary>
|
public bool UpdateGroupID(long CorpID, long ID, long GroupID, long UpdateUserID, DateTime UpdateTime)
|
{
|
using (SqlSugarClient db = new SqlSugarClient(ConnectionConfig))
|
{
|
return db.Updateable<Entity.SpecialProperty>()
|
.SetColumns(x => x.GroupID == GroupID)
|
.SetColumns(x => x.UpdateUserID == UpdateUserID)
|
.SetColumns(x => x.UpdateTime == UpdateTime)
|
.Where(x => x.CorpID == CorpID && x.ID == ID)
|
.ExecuteCommand() > 0;
|
}
|
}
|
|
|
}
|
}
|