|
@@ -22,6 +22,7 @@ import com.factory.user.entity.vo.res.RoleListRes;
|
|
|
import com.factory.user.entity.vo.res.UserMenuRes;
|
|
|
import com.factory.user.mapper.DeptMapper;
|
|
|
import com.factory.user.service.*;
|
|
|
+import lombok.extern.slf4j.Slf4j;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
@@ -32,6 +33,7 @@ import java.util.List;
|
|
|
import java.util.Optional;
|
|
|
import java.util.stream.Collectors;
|
|
|
|
|
|
+@Slf4j
|
|
|
@Service
|
|
|
public class CommonServiceImpl implements CommonService {
|
|
|
@Resource
|
|
@@ -195,6 +197,7 @@ public class CommonServiceImpl implements CommonService {
|
|
|
HashMap<String, Object> fileUploadMap = new HashMap<>();
|
|
|
fileUploadMap.put("file", tempFile);
|
|
|
try {
|
|
|
+ log.debug(">>>>>>>>>>{}<<<<<", "http://127.0.0.1:40045/file/file/uploadOne");
|
|
|
HttpResponse response = HttpRequest.post("http://127.0.0.1:40045/file/file/uploadOne")
|
|
|
.form(fileUploadMap)
|
|
|
.header("content-type", "multipart/form-data")
|
|
@@ -204,7 +207,7 @@ public class CommonServiceImpl implements CommonService {
|
|
|
fileInfo = JSONObject.toJavaObject(JSON.parseObject(response.body()).getJSONObject("data"), FileRes.class);
|
|
|
}
|
|
|
} catch (Exception e) {
|
|
|
- e.printStackTrace();
|
|
|
+ log.error("下载文件保错", e);
|
|
|
return ResponseBeanBuilder.fail("获取文件服务失败,请重试");
|
|
|
|
|
|
}
|