|
|
@@ -3,6 +3,7 @@ package com.dk.mdm.controller;
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
import com.dk.common.infrastructure.constant.Constant;
|
|
|
import com.dk.common.infrastructure.enums.ErrorCodeEnum;
|
|
|
+import com.dk.common.model.vo.core.StaffEntity;
|
|
|
import com.dk.common.response.ResponseResultUtil;
|
|
|
import com.dk.common.response.ResponseResultVO;
|
|
|
import com.dk.mdm.infrastructure.util.AuthUtils;
|
|
|
@@ -68,7 +69,7 @@ public class FileController {
|
|
|
*/
|
|
|
private String getFileType(String fileName) {
|
|
|
if (fileName.indexOf(".") >= 0) {
|
|
|
- String appCode = Optional.ofNullable(authUtils.getStaff().getAppCode()).orElse("");
|
|
|
+ String appCode = Optional.ofNullable(authUtils.getStaff()).map(StaffEntity::getAppCode).orElse("");
|
|
|
String fileType = fileName.substring(fileName.lastIndexOf(".") + 1);
|
|
|
fileType = fileType.toLowerCase();
|
|
|
|