|
@@ -20,6 +20,7 @@ import com.gis.cms.service.AuditLogService;
|
|
|
import com.gis.cms.service.FileService;
|
|
|
import com.gis.cms.service.GoodsService;
|
|
|
import com.github.pagehelper.PageInfo;
|
|
|
+import lombok.extern.slf4j.Slf4j;
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
import org.springframework.beans.BeanUtils;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
@@ -38,6 +39,7 @@ import java.util.Map;
|
|
|
/**
|
|
|
* Created by owen on 2020/3/11 0011 16:16
|
|
|
*/
|
|
|
+@Slf4j
|
|
|
@Service
|
|
|
public class GoodsServiceImpl extends IBaseServiceImpl<GoodsEntity, Long> implements GoodsService {
|
|
|
|
|
@@ -280,7 +282,9 @@ public class GoodsServiceImpl extends IBaseServiceImpl<GoodsEntity, Long> implem
|
|
|
newName = newName + "." + suffix;
|
|
|
}
|
|
|
String urlPath = "/goods/" + type + "/" + newName;
|
|
|
- String savePath = configConstant.serverBasePath + "goods/" + type + "/" + newName;
|
|
|
+ String savePath = configConstant.serverBasePath + urlPath;
|
|
|
+ log.info("保存文件地址:{}", savePath);
|
|
|
+
|
|
|
try {
|
|
|
FileUtil.writeFromStream(file.getInputStream(), savePath);
|
|
|
} catch (Exception e) {
|