|
@@ -6,9 +6,9 @@ import java.util.List;
|
|
|
import java.util.Map;
|
|
|
|
|
|
import org.apache.commons.fileupload.disk.DiskFileItem;
|
|
|
+import org.apache.commons.lang3.StringUtils;
|
|
|
import org.apache.tomcat.util.http.fileupload.FileUtils;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
-import org.springframework.util.StringUtils;
|
|
|
import org.springframework.web.bind.annotation.PostMapping;
|
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
import org.springframework.web.bind.annotation.RequestParam;
|
|
@@ -62,7 +62,8 @@ public class FaceController extends ControllerSupport {
|
|
|
*/
|
|
|
@ApiOperation(value = "保存学生照片")
|
|
|
@PostMapping("add")
|
|
|
- public void addPhoto(@RequestParam CommonsMultipartFile file) {
|
|
|
+ public void addPhoto(@RequestParam CommonsMultipartFile file,
|
|
|
+ @RequestParam(required = false) String operator) {
|
|
|
User accessUser = getAccessUser();
|
|
|
Long rootOrgId = accessUser.getRootOrgId();
|
|
|
|
|
@@ -81,8 +82,10 @@ public class FaceController extends ControllerSupport {
|
|
|
String identityNumber = fileName.substring(0, fileName.lastIndexOf("."));
|
|
|
String fileSuffix = fileName.substring(fileName.lastIndexOf("."));
|
|
|
|
|
|
- faceService.processFace(rootOrgId, identityNumber, fileSuffix, storeLocation,
|
|
|
- accessUser.getDisplayName());
|
|
|
+ if (StringUtils.isBlank(operator)) {
|
|
|
+ operator = accessUser.getDisplayName();
|
|
|
+ }
|
|
|
+ faceService.processFace(rootOrgId, identityNumber, fileSuffix, storeLocation, operator);
|
|
|
}
|
|
|
|
|
|
/**
|