Browse Source

修改上传图片

zx 2 năm trước cách đây
mục cha
commit
9db6bb3119

+ 9 - 0
src/main/java/com/steerinfo/dil/controller/AmsshipDeliveryNoticeController.java

@@ -21,6 +21,7 @@ import io.swagger.annotations.ApiImplicitParams;
 import io.swagger.annotations.ApiOperation;
 import oracle.jdbc.proxy.annotation.Post;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.http.MediaType;
 import org.springframework.web.bind.annotation.*;
 import org.springframework.web.multipart.MultipartFile;
 
@@ -165,6 +166,14 @@ public class AmsshipDeliveryNoticeController extends BaseRESTfulController {
         return success("下发成功");
     }
 
+
+    //    处理货权转移图片
+    @PostMapping(value = "/uploadCargoPic",consumes = MediaType.MULTIPART_FORM_DATA_VALUE)
+    public RESTfulResult uploadCargoPic(@RequestParam("file") MultipartFile multipartFile) throws Exception {
+        String url = imageFileUtils.updateFile(multipartFile);
+        return success(url);
+    }
+
     //获取货权转移的图片
     @ApiOperation(value="更新详细信息", notes="根据url的id来指定更新对象,并根据传过来的amsshipDeliveryNotice信息来更新详细信息")
     @ApiImplicitParams({

+ 2 - 0
src/main/resources/application-dev.yml

@@ -7,6 +7,8 @@ spring:
   application:
     name: dil-shiptms-api-dev
 
+piction:
+  path: /shared
 
 
 openfeign:

+ 3 - 0
src/main/resources/application-prod.yml

@@ -22,6 +22,9 @@ spring:
       # 登录密码
       login-password: dagang0426
 
+piction:
+    path: /shared
+
 openfeign:
   WmshboundFeign:
     url: ${WMSHBOUNDFEIGN_URL:172.16.33.166:8070}