Commit 6dab6629 authored by 赵啸非's avatar 赵啸非

添加站点授权

parent 978704ef
......@@ -5,6 +5,7 @@ import com.alibaba.fastjson.JSONObject;
import com.mortals.framework.exception.AppException;
import com.mortals.framework.web.BaseController;
import com.mortals.xhx.base.system.upload.service.UploadService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
......@@ -22,6 +23,7 @@ import java.util.Map;
*/
@RestController
@RequestMapping("file")
@Slf4j
public class UploadController extends BaseController {
@Resource
......@@ -37,7 +39,6 @@ public class UploadController extends BaseController {
model.put(KEY_RESULT_CODE, VALUE_RESULT_SUCCESS);
jsonStr = JSONObject.toJSONString(model);
} catch (AppException e) {
log.debug(e);
model.put(KEY_RESULT_CODE, VALUE_RESULT_FAILURE);
model.put(KEY_RESULT_MSG, e.getMessage());
jsonStr = JSONObject.toJSONString(model);
......@@ -62,7 +63,7 @@ public class UploadController extends BaseController {
model.put(KEY_RESULT_CODE, VALUE_RESULT_SUCCESS);
jsonStr = JSONObject.toJSONString(model);
} catch (AppException e) {
log.debug(e);
log.error("上传异常",e);
model.put(KEY_RESULT_CODE, VALUE_RESULT_FAILURE);
model.put(KEY_RESULT_MSG, e.getMessage());
jsonStr = JSONObject.toJSONString(model);
......@@ -72,6 +73,7 @@ public class UploadController extends BaseController {
model.put(KEY_RESULT_MSG, "文件上传失败");
jsonStr = JSONObject.toJSONString(model);
}
log.info("uploadResp==>{}",jsonStr);
return jsonStr;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment