liuxm
2024-05-23 dbf0844fc80f5bb0c4d44a4e211789e0be09cf2c
产品文件相关修改
3个文件已修改
20 ■■■■ 已修改文件
pms-parent/pms-global/src/main/resources/mapper/PltProParamsMapper.xml 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pms-parent/pms-global/src/main/resources/mapper/PltProductMapper.xml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
pms-parent/pms-web-platform/src/main/java/com/dy/pmsPlatform/product/ProductSv.java 15 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pms-parent/pms-global/src/main/resources/mapper/PltProParamsMapper.xml
@@ -86,6 +86,9 @@
      <if test="paramValue != null">
        param_value = #{paramValue,jdbcType=VARCHAR},
      </if>
      <if test="deleted != null">
        deleted = #{deleted,jdbcType=TINYINT}
      </if>
    </set>
    where id = #{id,jdbcType=BIGINT}
  </update>
pms-parent/pms-global/src/main/resources/mapper/PltProductMapper.xml
@@ -149,7 +149,7 @@
  </update>
  <select id="selectSome" resultMap="BaseResultMap">
  <select id="selectSome" resultMap="BaseResultMap2">
    select
    <include refid="Base_Column_List" />
    from plt_product p
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 ;
    }