Commit efd445b3 by huluobin

update

parent 626d79f7
......@@ -78,7 +78,6 @@ public class MallOrder {
@ApiModelProperty("付款客户")
private Integer paymentCustomerId;
@ApiModelProperty("订单类型")
@ApiModelProperty("订单类型 1-默认类型")
private Integer type;
......
......@@ -44,7 +44,8 @@ public class Swagger2Config {
tokenPar.name("token")
.description("登陆凭证")
.modelRef(new ModelRef("string"))
.parameterType("header").required(false).build();
.parameterType("header").required(false)
.parameterType("sourceFrom").required(true).build();
pars.add(tokenPar.build());
return new Docket(DocumentationType.SWAGGER_2)
......
package com.gogirl.interfaces.user;
import com.gogirl.infrastructure.common.base.JsonResult;
import com.gogirl.infrastructure.common.exception.RRException;
import com.gogirl.infrastructure.service.file.FileService;
import com.gogirl.infrastructure.util.Base64Utils;
import io.swagger.annotations.Api;
......@@ -24,6 +25,9 @@ public class FileController {
@ApiOperation(value = "图片上传")
@PostMapping("/customer/xcx/upload")
public JsonResult<String> upload(MultipartFile multipartFile) throws Exception {
if (multipartFile == null) {
throw new RRException("上传内容为空");
}
log.info("图片上传");
String imgUrl = fileService.saveImage(multipartFile);
return JsonResult.success(imgUrl);
......@@ -32,6 +36,9 @@ public class FileController {
@ApiOperation(value = "base64图片上传")
@PostMapping("/customer/xcx/no_base64Upload")
public JsonResult<String> base64Upload(@RequestBody String base64) throws Exception {
if (base64 == null) {
throw new RRException("上传内容为空");
}
log.info("图片上传");
MultipartFile multipartFile = Base64Utils.base64ToMultipart(base64);
String imgUrl = fileService.saveImage(multipartFile);
......
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