bug--修复砍价海报价格不变问题

This commit is contained in:
taozi
2020-09-14 11:37:02 +08:00
parent 9984a568dd
commit c869e4f6a4
4 changed files with 27 additions and 0 deletions

View File

@ -294,6 +294,10 @@ public class CreatShareProductService {
String name = bargainId+"_"+uid + "_"+from+"_bargain_share_wap.jpg";
YxSystemAttachment attachment = systemAttachmentService.getInfo(name);
//删除已经存在的砍价海报图片
if (ObjectUtil.isNotNull(attachment)) {
storeBargainService.deleteBargainImg(name);
}
String fileDir = path+"qrcode"+ File.separator;
String qrcodeUrl = "";
if(ObjectUtil.isNull(attachment)){
@ -327,6 +331,10 @@ public class CreatShareProductService {
String spreadPicPath = fileDir+spreadPicName;
YxSystemAttachment attachmentT = systemAttachmentService.getInfo(spreadPicName);
//删除已经存在的砍价海报图片
if (ObjectUtil.isNotNull(attachmentT)) {
storeBargainService.deleteBargainImg(spreadPicName);
}
String spreadUrl = "";
File newFile = new File("poster.jpg");
File newFileT = new File("simsunb.ttf");

View File

@ -116,4 +116,10 @@ public interface YxStoreBargainService extends BaseService<YxStoreBargain>{
* @throws IOException /
*/
void download(List<YxStoreBargainDto> all, HttpServletResponse response) throws IOException;
/**
* 删除砍价海报
* @param id
*/
void deleteBargainImg(String id);
}

View File

@ -418,4 +418,14 @@ public class YxStoreBargainServiceImpl extends BaseServiceImpl<YxStoreBargainMap
}
FileUtil.downloadExcel(list, response);
}
/**
* 删除砍价海报
*
* @param name
*/
@Override
public void deleteBargainImg(String name) {
baseMapper.deleteBargainImg(name);
}
}

View File

@ -11,6 +11,7 @@ package co.yixiang.modules.activity.service.mapper;
import co.yixiang.common.mapper.CoreMapper;
import co.yixiang.modules.activity.domain.YxStoreBargain;
import co.yixiang.modules.product.vo.YxStoreProductQueryVo;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;
@ -53,4 +54,6 @@ public interface YxStoreBargainMapper extends CoreMapper<YxStoreBargain> {
" where id=#{id}")
void addBargainLook(@Param("id") Long id);
@Delete("delete from yx_system_attachment where name = #{name}")
void deleteBargainImg(@Param("name") String name);
}