修改文件访问路径

This commit is contained in:
haozq 2025-09-16 17:09:58 +08:00
parent 100d67ddf6
commit 3c30e22b2f
3 changed files with 5 additions and 7 deletions

View File

@ -385,7 +385,7 @@ public class ProductServiceImpl implements ProductService {
String originFileName = file.getOriginalFilename();
String suffix=StringUtils.substringAfterLast(originFileName, ".");
//产品 封面
String filePath = "/product" + "/" +
String filePath = "product" + "/" +
year + "/" + month + "/" + day + "/" + uuid + "." + suffix;
String path=service.uploadFile(file, filePath);
if(path==null){

View File

@ -191,7 +191,7 @@ public class TbPromotionMaterialServiceImpl implements ITbPromotionMaterialServi
String originFileName = file.getOriginalFilename();
String suffix=StringUtils.substringAfterLast(originFileName, ".");
//产品 封面
String filePath = "/material" + "/" +
String filePath = "material" + "/" +
year + "/" + month + "/" + day + "/" + uuid + "." + suffix;
SysFile sysFile = fileUploadService.uploadLargeFile(file, filePath);
TbPromotionMaterialFiles materialFile=new TbPromotionMaterialFiles();

View File

@ -29,12 +29,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="getMaterialList" resultType="com.bonus.business.domain.ProductScreenVo">
select tpm.id, tpm.type_id typeId,sdd.dict_label typeName,tpm.name ,tpm.version ,tpm.description ,tpm.image ,
pmf.file_type fileType ,pmf.file_path filePath, pmf.bucket_name bucketName,pmf.original_name originalName
from tb_promotion_material tpm
from tb_promotion_material_product pmp
left join tb_promotion_material tpm on pmp.material_id=tpm.id
left join sys_dict_data sdd on sdd.dict_value=tpm.type_id and sdd.dict_type='tb_product_type'
left join tb_promotion_material_files pmf on tpm.id=pmf.material_id and pmf.del_flag=0 and pmf.type_id=2
where tpm.del_flag=0
<if test="typeId!=null and typeId!=''">
and tpm.type_id=#{typeId}
</if>
where tpm.del_flag=0 and pmp.product_id=#{id}
</select>
</mapper>