|
|
@@ -235,6 +235,27 @@ public class GoodsDescServiceImpl extends ServiceImpl<GoodsDescMapper, GoodsDesc
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
+ public GoodsDescVO getGoodsDesc(Long id, String tenantId) {
|
|
|
+ GoodsDescVO goodsDescVO = baseMapper.selectGoodsMessage(id, tenantId);
|
|
|
+ if (ObjectUtils.isNotNull(goodsDescVO)) {
|
|
|
+ GoodsType goodsType = goodsTypeService.getById(goodsDescVO.getGoodsTypeId());
|
|
|
+ if (ObjectUtils.isNotNull(goodsType)) {
|
|
|
+ goodsDescVO.setGoodsTypeId(goodsType.getId() + "");
|
|
|
+ goodsDescVO.setGoodsTypeName(goodsType.getCname());
|
|
|
+ }
|
|
|
+ List<GoodsFiles> filesList = goodsFilesMapper.selectList(new LambdaQueryWrapper<GoodsFiles>()
|
|
|
+ .eq(GoodsFiles::getPid, id)
|
|
|
+ .eq(GoodsFiles::getIsDeleted, 0)
|
|
|
+ );
|
|
|
+ if (filesList.size() > 0) {
|
|
|
+ goodsDescVO.setUrl(filesList.get(0).getUrl());
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ return goodsDescVO;
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
@Transactional(rollbackFor = Exception.class)
|
|
|
public void modify(GoodsDesc goodsDesc) {
|
|
|
LambdaQueryWrapper<GoodsDesc> lambdaQueryWrapper = new LambdaQueryWrapper<>();
|