|
@@ -18,6 +18,8 @@ import org.springframework.stereotype.Service;
|
|
|
|
|
|
import cn.com.qmth.examcloud.commons.base.exception.StatusException;
|
|
|
import cn.com.qmth.examcloud.commons.base.util.ErrorMsg;
|
|
|
+import cn.com.qmth.examcloud.commons.base.util.PropertiesUtil;
|
|
|
+import cn.com.qmth.examcloud.core.basic.base.constants.PropKeys;
|
|
|
import cn.com.qmth.examcloud.core.basic.dao.OrgRepo;
|
|
|
import cn.com.qmth.examcloud.core.basic.dao.StudentRepo;
|
|
|
import cn.com.qmth.examcloud.core.basic.dao.UserRepo;
|
|
@@ -304,7 +306,17 @@ public class StudentServiceImpl implements StudentService {
|
|
|
}
|
|
|
}
|
|
|
info.setPhoneNumber(s.getPhoneNumber());
|
|
|
- info.setPhotoPath(s.getPhotoPath());
|
|
|
+
|
|
|
+ if (StringUtils.isNotBlank(s.getPhotoPath())) {
|
|
|
+ String basePath = PropertiesUtil.getString(PropKeys.UPYUN_STUDENT_PHOTO_PATH);
|
|
|
+ if (StringUtils.isBlank(basePath)) {
|
|
|
+ throw new StatusException("B-160212", "照片根路径未配置");
|
|
|
+ }
|
|
|
+ String path = basePath + "/" + s.getPhotoPath();
|
|
|
+ path = StringUtils.replaceAll(path, "//", "/");
|
|
|
+ info.setPhotoPath(s.getPhotoPath());
|
|
|
+ }
|
|
|
+
|
|
|
info.setRemark(s.getRemark());
|
|
|
info.setRootOrgId(s.getRootOrgId());
|
|
|
Org rootOrg = orgRepo.findOne(s.getRootOrgId());
|