| | |
| | | using CoreCms.Net.Model.ViewModels.Basics; |
| | | using CoreCms.Net.Model.ViewModels.UI; |
| | | using SqlSugar; |
| | | using static CoreCms.Net.Configuration.GlobalEnumVars; |
| | | |
| | | |
| | | namespace CoreCms.Net.Services |
| | |
| | | { |
| | | return await _dal.QueryDetaiListAsync(predicate, orderByExpression, orderByType, blUseNoLock); |
| | | } |
| | | |
| | | public async Task<CoreCmsProducts> QueryEditByID(int id) |
| | | { |
| | | return await _unitOfWork.GetDbClient().Queryable<CoreCmsGoods, CoreCmsProducts>((good, product) => new JoinQueryInfos( |
| | | JoinType.Inner, good.id == product.goodsId |
| | | ) |
| | | ).Where((good, product) =>product.id==id) |
| | | .Select((good, product) => new CoreCmsProducts |
| | | { |
| | | id = product.id, |
| | | goodsId = product.goodsId, |
| | | barcode = product.barcode, |
| | | sn = product.sn, |
| | | price = product.price, |
| | | costprice = product.costprice, |
| | | mktprice = product.mktprice, |
| | | marketable = product.marketable, |
| | | weight = product.weight, |
| | | stock = product.stock, |
| | | freezeStock = product.freezeStock, |
| | | pointsDeduction = product.pointsDeduction, |
| | | points = product.points, |
| | | spesDesc = product.spesDesc, |
| | | isDefalut = product.isDefalut, |
| | | images = product.images, |
| | | isDel = good.isDel, |
| | | name = good.name, |
| | | bn = good.bn, |
| | | isMarketable = good.isMarketable, |
| | | unit = good.unit, |
| | | distributionPrice = product.distributionPrice, |
| | | cutMoney = product.cutMoney, |
| | | distributionCutMoney = product.distributionCutMoney, |
| | | }).With(SqlWith.NoLock) |
| | | .FirstAsync(); |
| | | |
| | | } |
| | | #endregion |
| | | |
| | | |