套餐详情增加查看附件功能

This commit is contained in:
wuweihua
2026-10-15 16:37:57 +08:00
parent 071e7f0c55
commit 7db0796c2f
9 changed files with 128 additions and 2 deletions
@@ -18,6 +18,9 @@ public interface PrcPriceExcelFileMapper
public List<PrcPriceExcelFile> selectByRedlineProductCode(@Param("productCode") String productCode);
/** Distinct excel files linked by prc_price_set_product.pef_id for a version. */
public List<PrcPriceExcelFile> selectByPsvId(@Param("psvId") Long psvId);
public int insertPrcPriceExcelFile(PrcPriceExcelFile row);
public int updatePrcPriceExcelFile(PrcPriceExcelFile row);
@@ -16,6 +16,9 @@ public interface IPrcPriceExcelFileService
List<PrcPriceExcelFile> selectByRedlineProductCode(String productCode);
/** Import excel files for a price-set version via prc_price_set_product.psv_id. */
List<PrcPriceExcelFile> selectByPsvId(Long psvId);
/**
* Persist uploaded Excel under upload/price/excel and insert metadata row.
*
@@ -59,6 +59,17 @@ public class PrcPriceExcelFileServiceImpl implements IPrcPriceExcelFileService
return list == null ? java.util.Collections.emptyList() : list;
}
@Override
public List<PrcPriceExcelFile> selectByPsvId(Long psvId)
{
if (psvId == null)
{
return Collections.emptyList();
}
List<PrcPriceExcelFile> list = excelFileMapper.selectByPsvId(psvId);
return list == null ? Collections.emptyList() : list;
}
@Override
public PrcPriceExcelFile saveImportExcel(String excelType, Date effectiveTime, byte[] bytes,
String filename, String operName) throws Exception
@@ -125,4 +125,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
order by f.effective_time desc, f.pef_id desc
</select>
<select id="selectByPsvId" resultMap="PrcPriceExcelFileResult">
select distinct f.pef_id, f.excel_type, f.effective_time, f.file_name, f.file_path, f.file_size,
f.content_type, f.file_extension, f.oss_id, f.sheet_names, f.remark,
f.created_by, f.create_time, f.updated_by, f.update_time
from prc_price_excel_file f
inner join prc_price_set_product psp on psp.pef_id = f.pef_id
where psp.psv_id = #{psvId}
and psp.pef_id is not null
order by f.effective_time desc, f.pef_id desc
</select>
</mapper>