Shi Kejing 4 gadi atpakaļ
vecāks
revīzija
e0854ca605

+ 5 - 1
guns-main/src/main/java/cn/stylefeng/guns/zjxl/cnotroller/ZjxlBannerCnotroller.java

@ -8,6 +8,7 @@ import cn.stylefeng.guns.zjxl.model.ret.BaseResultModel;
import cn.stylefeng.guns.zjxl.model.ret.ResultOneModel;
import cn.stylefeng.guns.zjxl.service.ZjxlBannerService;
import cn.stylefeng.guns.zjxlUtil.BaseController;
import cn.stylefeng.guns.zjxlUtil.FastDFSUtil;
import cn.stylefeng.guns.zjxlUtil.PageUtil;
import com.alibaba.fastjson.JSONObject;
import com.fasterxml.jackson.databind.node.ObjectNode;
@ -43,6 +44,8 @@ public class ZjxlBannerCnotroller extends BaseController {
    @Autowired
    FastDFSConfig fastDFSConfig;
    @Autowired
    FastDFSUtil fastDFSUtil;
    @Value("${fastDFS.fastdfs_file_url}")
    private String fastdfs_file_url;
@ -145,7 +148,8 @@ public class ZjxlBannerCnotroller extends BaseController {
        String fileType = fullName.substring(fullName.lastIndexOf(".") + 1).toLowerCase();
        String fileName = fullName.substring(0, fullName.lastIndexOf("."));
        //上传到fastdfs
        ObjectNode objectNode = fastDFSConfig.fastDFSUtil().upload(mf.getInputStream(), fileType, "");
//        ObjectNode objectNode = fastDFSConfig.fastDFSUtil().upload(mf.getInputStream(), fileType, "");
        ObjectNode objectNode = fastDFSUtil.upload(mf.getInputStream(), fileType, "");
        //解析返回的objectNode
        uploadModel.setFileName(fileName);
        uploadModel.setFileType(fileType);