liuxm
2024-05-23 dbf0844fc80f5bb0c4d44a4e211789e0be09cf2c
pms-parent/pms-web-platform/src/main/java/com/dy/pmsPlatform/product/ProductSv.java
@@ -14,6 +14,7 @@
import com.dy.pmsGlobal.pojoPlt.PltProductFile;
import jakarta.servlet.http.HttpServletResponse;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections4.CollectionUtils;
import org.apache.dubbo.common.utils.PojoUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
@@ -128,10 +129,8 @@
    private void saveRel(PltProduct p, List<PltProductFile> docs) {
        docs.forEach(doc -> {
            if(doc.id == null){
                doc.proId = p.id;
                pfDao.insertSelective(doc);
            }
            doc.proId = p.id;
            pfDao.insertSelective(doc);
        });
    }
@@ -163,6 +162,9 @@
            pro.proFiles.stream().forEach(doc -> {
                 OthFile file = othFileMapper.selectByPrimaryKey(doc.fileId);
                 if (file == null) {
                     return;
                 }
                 FileRestVo fileRestVo = fileOperate.parseHashcode(fmUrl, file.hash);
                 doc.webUrl = fileRestVo.fileWebUrl + file.filePath;
@@ -192,6 +194,11 @@
        rsVo.calculateAndSet(itemTotal, params);
        //查询符合条件的记录
        rsVo.obj = dao.selectSome(params) ;
        if(CollectionUtils.isNotEmpty(rsVo.obj)){
            rsVo.obj.forEach(pro->{
                pro = addWebUrl(pro);
            });
        }
        return rsVo ;
    }