管道基础大数据平台系统开发-【CS】-ExportMap
1
13693261870
2023-08-03 2e2f1f542db7d709813efd6dcce14e3bc076bfa0
ExportMap/db/TaskDBHelper.cs
@@ -12,13 +12,26 @@
    public class TaskDBHelper
    {
        /// <summary>
        /// 根据ID查询
        /// </summary>
        public static SysTask SelectById(int id)
        {
            string sql = string.Format("select * from lf.sys_task where id = {0} order by id desc", id);
            DataTable dt = Tools.DBHelper.GetDataTable(sql);
            List<SysTask> list = ModelHandler.FillModel<SysTask>(dt);
            return null == list || list.Count == 0 ? null : list[0];
        }
        /// <summary>
        /// 根据ID集合查询
        /// </summary>
        public static List<SysTask> SelectByIds(List<int> ids)
        {
            string sql = string.Format("select * from lf.sys_task where id in ({0}) order by id desc", string.Join(",", ids.ToArray()));
            DataTable dt = SQLiteHelper.GetDataTable(sql);
            DataTable dt = Tools.DBHelper.GetDataTable(sql);
            List<SysTask> list = ModelHandler.FillModel<SysTask>(dt);
            return list;