// Path: src/main/java/cn/iflyapi/blog/model/JSONResult.java
// @Getter
// @Setter
// public class JSONResult {
// 
//     private int code;
//     private String msg;
//     private boolean success;
//     private Object data;
// 
//     private JSONResult(int code, String msg, boolean success, Object data) {
//         this.code = code;
//         this.msg = msg;
//         this.success = success;
//         this.data = data;
//     }
// 
//     public static JSONResult ok(int code, String msg, Object data) {
//         return new JSONResult(code, msg, true, data);
//     }
// 
//     public static JSONResult ok(CodeMsgEnum codeMsgEnum, Object data) {
//         return ok(codeMsgEnum.getCode(), codeMsgEnum.getMsg(), data);
//     }
// 
//     public static JSONResult ok(Object data) {
//         return ok(CodeMsgEnum.OK, data);
//     }
// 
//     public static JSONResult ok() {
//         return ok(CodeMsgEnum.OK, null);
//     }
// 
//     public static JSONResult fail(int code, String msg) {
//         return new JSONResult(code, msg, false, null);
//     }
// 
//     public static JSONResult fail(CodeMsgEnum codeMsgEnum, Object data) {
//         return ok(codeMsgEnum.getCode(), codeMsgEnum.getMsg(), data);
//     }
// 
//     public static JSONResult fail(CodeMsgEnum codeMsgEnum) {
//         return ok(codeMsgEnum.getCode(), codeMsgEnum.getMsg(), null);
//     }
// 
//     public static JSONResult fail(Object data) {
//         return ok(CodeMsgEnum.FAIL, data);
//     }
// 
//     public static JSONResult fail() {
//         return ok(CodeMsgEnum.FAIL, null);
//     }
// }
// 
// Path: src/main/java/cn/iflyapi/blog/service/IFileService.java
// public interface IFileService {
// 
//     String upload(MultipartFile file, Long userId);
// }


import cn.iflyapi.blog.model.JSONResult;
import cn.iflyapi.blog.service.IFileService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;
package cn.iflyapi.blog.controller;


/**
 * @author flyhero
 * @date 2018-12-22 6:48 PM
 */
@Api(value = "FileController", tags = "文件接口")
@RestController
public class FileController extends BaseController {

    @Autowired
    @Qualifier("qiniu")
// Path: src/main/java/cn/iflyapi/blog/model/JSONResult.java
// @Getter
// @Setter
// public class JSONResult {
// 
//     private int code;
//     private String msg;
//     private boolean success;
//     private Object data;
// 
//     private JSONResult(int code, String msg, boolean success, Object data) {
//         this.code = code;
//         this.msg = msg;
//         this.success = success;
//         this.data = data;
//     }
// 
//     public static JSONResult ok(int code, String msg, Object data) {
//         return new JSONResult(code, msg, true, data);
//     }
// 
//     public static JSONResult ok(CodeMsgEnum codeMsgEnum, Object data) {
//         return ok(codeMsgEnum.getCode(), codeMsgEnum.getMsg(), data);
//     }
// 
//     public static JSONResult ok(Object data) {
//         return ok(CodeMsgEnum.OK, data);
//     }
// 
//     public static JSONResult ok() {
//         return ok(CodeMsgEnum.OK, null);
//     }
// 
//     public static JSONResult fail(int code, String msg) {
//         return new JSONResult(code, msg, false, null);
//     }
// 
//     public static JSONResult fail(CodeMsgEnum codeMsgEnum, Object data) {
//         return ok(codeMsgEnum.getCode(), codeMsgEnum.getMsg(), data);
//     }
// 
//     public static JSONResult fail(CodeMsgEnum codeMsgEnum) {
//         return ok(codeMsgEnum.getCode(), codeMsgEnum.getMsg(), null);
//     }
// 
//     public static JSONResult fail(Object data) {
//         return ok(CodeMsgEnum.FAIL, data);
//     }
// 
//     public static JSONResult fail() {
//         return ok(CodeMsgEnum.FAIL, null);
//     }
// }
// 
// Path: src/main/java/cn/iflyapi/blog/service/IFileService.java
// public interface IFileService {
// 
//     String upload(MultipartFile file, Long userId);
// }


// Path: src/main/java/cn/iflyapi/blog/controller/FileController.java
import cn.iflyapi.blog.model.JSONResult;
import cn.iflyapi.blog.service.IFileService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;

package cn.iflyapi.blog.controller;


/**
 * @author flyhero
 * @date 2018-12-22 6:48 PM
 */
@Api(value = "FileController", tags = "文件接口")
@RestController
public class FileController extends BaseController {

    @Autowired
    @Qualifier("qiniu")
    private IFileService fileService;