C#查询:数据查询层
作者:互联网
C#查询:数据查询层
public List<PackageBox> GetPackageBoxList(int memberID) { using (var wmsconn = DapperConnection.GetConnection(DatabaseEnum.WMS_Main_Read.ToString())) { string sql = @"SELECT a.OwnerMemberID AS MemberID, b.WarehouseID, a.BoxID, a.BoxCode, a.BoxName, a.Weight FROM tm_master_packegbox a JOIN tr_master_warehousetomember b ON a.OwnerMemberID = b.MemberID JOIN tr_master_packegboxtowarehouse c on c.BoxID=a.BoxID WHERE b.WarehouseID =@warehouseId AND a.OwnerMemberID=@memberID AND a.Status=1 and c.WarehouseID=@warehouseID and c.Status=1;"; var list = wmsconn.Query<PackageBox>(sql, new { warehouseID, memberID }).ToList(); return list; } }
标签:BoxID,WarehouseID,C#,OwnerMemberID,查询,master,memberID,数据 来源: https://www.cnblogs.com/nanxixi/p/14713550.html