|
@@ -314,6 +314,7 @@ public class GoodsLogic {
|
|
|
* @return
|
|
|
*/
|
|
|
public GoodsBean detail(String goodsId) throws RemoteServiceException {
|
|
|
+ AdminUserCom adminUser = commonLogic.getAdminUser();
|
|
|
Goods goods = goodsService.getById(goodsId);
|
|
|
List<GoodsSpec> goodsSpecs = goodsSpecService.lambdaQuery()
|
|
|
.eq(GoodsSpec::getGoodsId, goodsId)
|
|
@@ -330,6 +331,11 @@ public class GoodsLogic {
|
|
|
BeanUtils.copyProperties(goods, goodsBean);
|
|
|
goodsBean.setGoodsSpecs(goodsSpecs);
|
|
|
goodsBean.setImages(commonLogic.queryFileByObjId(goods.getGoodsId(), Constant.Img.GOODS_IMG));
|
|
|
+
|
|
|
+ goodsBean.setGoodsCompanies(goodsCompanyService.lambdaQuery()
|
|
|
+ .in(GoodsCompany::getCompanyId,adminUser.getAdminCompanyIds())
|
|
|
+ .eq(GoodsCompany::getGoodsId,goods.getGoodsId()).list()
|
|
|
+ );
|
|
|
goodsBean.setStock(goodsStock);
|
|
|
List<GoodsTemplate> goodsTemplates = goodsTemplateService.lambdaQuery()
|
|
|
.eq(GoodsTemplate::getGoodsId, goodsId)
|