From 28cf328a098334b51a3e9d2d56f983fb8c862211 Mon Sep 17 00:00:00 2001 From: yujian <yujian@163.com> Date: 星期六, 23 五月 2020 09:54:38 +0800 Subject: [PATCH] 足迹、收藏订单兼容新需求 --- fanli/src/main/java/com/yeshi/fanli/service/impl/lable/LabelServiceImpl.java | 13 +++++++------ 1 files changed, 7 insertions(+), 6 deletions(-) diff --git a/fanli/src/main/java/com/yeshi/fanli/service/impl/lable/LabelServiceImpl.java b/fanli/src/main/java/com/yeshi/fanli/service/impl/lable/LabelServiceImpl.java index 5da3b12..57a52f5 100644 --- a/fanli/src/main/java/com/yeshi/fanli/service/impl/lable/LabelServiceImpl.java +++ b/fanli/src/main/java/com/yeshi/fanli/service/impl/lable/LabelServiceImpl.java @@ -23,8 +23,9 @@ import com.yeshi.fanli.entity.bus.lable.Label; import com.yeshi.fanli.entity.bus.lable.LabelGoods; import com.yeshi.fanli.entity.common.AdminUser; -import com.yeshi.fanli.exception.LabelException; +import com.yeshi.fanli.exception.goods.quality.LabelException; import com.yeshi.fanli.service.inter.lable.LabelService; +import com.yeshi.fanli.util.FilePathEnum; import com.yeshi.fanli.util.StringUtil; import jxl.Sheet; @@ -49,7 +50,7 @@ } @Override - @Transactional + @Transactional(rollbackFor=Exception.class) public void insertList(List<Label> records,AdminUser admin) throws LabelException{ if (records != null && records.size() > 0) { for (Label label : records) { @@ -96,7 +97,7 @@ } @Override - @Transactional + @Transactional(rollbackFor=Exception.class) public void updateList(List<Label> records) throws LabelException{ if (records != null && records.size() > 0) { for (Label label : records) { @@ -125,13 +126,13 @@ @Override - @Transactional + @Transactional(rollbackFor=Exception.class) public int deleteBatchById(long[] ids) throws LabelException{ return labelMapper.deleteBatchByPrimaryKey(ids); } @Override - @Transactional + @Transactional(rollbackFor=Exception.class) public void deleteBatchByPrimaryKey(List<Long> ids) throws LabelException { for (Long id : ids) { Label label = labelMapper.selectByPrimaryKey(id); @@ -245,7 +246,7 @@ String contentType = file.getContentType(); String type = contentType.substring(contentType.indexOf("/") + 1); // 涓婁紶鏂囦欢鐩稿浣嶇疆 - String fileUrl="LableImg/"+UUID.randomUUID().toString().replace("-", "") + "." + type; + String fileUrl=FilePathEnum.lable.getPath() + UUID.randomUUID().toString().replace("-", "") + "." + type; boolean deleteFile =true; -- Gitblit v1.8.0