修改文件访问路径
This commit is contained in:
parent
100d67ddf6
commit
3c30e22b2f
|
|
@ -385,7 +385,7 @@ public class ProductServiceImpl implements ProductService {
|
||||||
String originFileName = file.getOriginalFilename();
|
String originFileName = file.getOriginalFilename();
|
||||||
String suffix=StringUtils.substringAfterLast(originFileName, ".");
|
String suffix=StringUtils.substringAfterLast(originFileName, ".");
|
||||||
//产品 封面
|
//产品 封面
|
||||||
String filePath = "/product" + "/" +
|
String filePath = "product" + "/" +
|
||||||
year + "/" + month + "/" + day + "/" + uuid + "." + suffix;
|
year + "/" + month + "/" + day + "/" + uuid + "." + suffix;
|
||||||
String path=service.uploadFile(file, filePath);
|
String path=service.uploadFile(file, filePath);
|
||||||
if(path==null){
|
if(path==null){
|
||||||
|
|
|
||||||
|
|
@ -191,7 +191,7 @@ public class TbPromotionMaterialServiceImpl implements ITbPromotionMaterialServi
|
||||||
String originFileName = file.getOriginalFilename();
|
String originFileName = file.getOriginalFilename();
|
||||||
String suffix=StringUtils.substringAfterLast(originFileName, ".");
|
String suffix=StringUtils.substringAfterLast(originFileName, ".");
|
||||||
//产品 封面
|
//产品 封面
|
||||||
String filePath = "/material" + "/" +
|
String filePath = "material" + "/" +
|
||||||
year + "/" + month + "/" + day + "/" + uuid + "." + suffix;
|
year + "/" + month + "/" + day + "/" + uuid + "." + suffix;
|
||||||
SysFile sysFile = fileUploadService.uploadLargeFile(file, filePath);
|
SysFile sysFile = fileUploadService.uploadLargeFile(file, filePath);
|
||||||
TbPromotionMaterialFiles materialFile=new TbPromotionMaterialFiles();
|
TbPromotionMaterialFiles materialFile=new TbPromotionMaterialFiles();
|
||||||
|
|
|
||||||
|
|
@ -29,12 +29,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<select id="getMaterialList" resultType="com.bonus.business.domain.ProductScreenVo">
|
<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 ,
|
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
|
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 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
|
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
|
where tpm.del_flag=0 and pmp.product_id=#{id}
|
||||||
<if test="typeId!=null and typeId!=''">
|
|
||||||
and tpm.type_id=#{typeId}
|
|
||||||
</if>
|
|
||||||
</select>
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
Loading…
Reference in New Issue