Browse Source

fix: 文物列表、静态资源

wuweihao 4 năm trước cách đây
mục cha
commit
4e65ea8d91

+ 1 - 1
gis_cms/src/main/java/com/gis/cms/controller/GoodsController.java

@@ -31,7 +31,7 @@ public class GoodsController  {
     @ApiOperation("列表")
     @PostMapping("list")
     public Result<GoodsEntity> list(@RequestBody TypePageDateDto param) {
-        return entityService.search(param, 1);
+        return entityService.search(param, null);
     }
 
     @WebControllerLog(description = "精品典藏-新增/修改", addDb = true)

+ 5 - 1
gis_cms/src/main/java/com/gis/cms/service/impl/GoodsServiceImpl.java

@@ -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) {