duheng
2024-12-09 477be839d94e42de8bef6c4fa55496253d4ceb7a
Service/HStation.Service.PhartRelation.Core/04-dal/02-postgresql/01-pump-main/XhsPumpMainPhartMapping.cs
@@ -167,14 +167,14 @@
        }
        /// <summary>
        /// 通过 PumpMainID 获取
        /// 通过 MainID 获取
        /// </summary>
        public List<Entity.XhsPumpMainPhartMapping> GetByPumpMainID(long PumpMainID)
        {
            using (var db = new SqlSugarClient(ConnectionConfig))
            {
                return db.Queryable<Entity.XhsPumpMainPhartMapping>()
                    .Where(x => x.PumpMainID == PumpMainID)
                    .Where(x => x.MainID == PumpMainID)
                    .OrderBy(x => x.SortCode).ToList();
            }
        }
@@ -191,7 +191,7 @@
            using (var db = new SqlSugarClient(ConnectionConfig))
            {
                return db.Queryable<Entity.XhsPumpMainPhartMapping>()
                    .Where(x => PumpMainIds.Contains(x.PumpMainID))
                    .Where(x => PumpMainIds.Contains(x.MainID))
                    .OrderBy(x => x.SortCode).ToList();
            }
        }
@@ -255,14 +255,14 @@
        }
        /// <summary>
        /// 通过 PumpMainID 删除
        /// 通过 MainID 删除
        /// </summary>
        public bool DeleteByPumpMainID(long PumpMainID)
        {
            using (var db = new SqlSugarClient(ConnectionConfig))
            {
                return db.Deleteable<Entity.XhsPumpMainPhartMapping>()
                    .Where(x => x.PumpMainID == PumpMainID)
                    .Where(x => x.MainID == PumpMainID)
                    .ExecuteCommandHasChange();
            }
        }
@@ -302,7 +302,7 @@
                }
            }
        }
    }