|
@@ -36,9 +36,9 @@ import cn.com.qmth.examcloud.api.commons.security.bean.User;
|
|
import cn.com.qmth.examcloud.api.commons.security.enums.RoleMeta;
|
|
import cn.com.qmth.examcloud.api.commons.security.enums.RoleMeta;
|
|
import cn.com.qmth.examcloud.commons.exception.StatusException;
|
|
import cn.com.qmth.examcloud.commons.exception.StatusException;
|
|
import cn.com.qmth.examcloud.commons.helpers.poi.ExcelWriter;
|
|
import cn.com.qmth.examcloud.commons.helpers.poi.ExcelWriter;
|
|
|
|
+import cn.com.qmth.examcloud.commons.util.UrlUtil;
|
|
import cn.com.qmth.examcloud.core.basic.api.controller.bean.StudentDomain;
|
|
import cn.com.qmth.examcloud.core.basic.api.controller.bean.StudentDomain;
|
|
import cn.com.qmth.examcloud.core.basic.base.constants.BasicConsts;
|
|
import cn.com.qmth.examcloud.core.basic.base.constants.BasicConsts;
|
|
-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.OrgRepo;
|
|
import cn.com.qmth.examcloud.core.basic.dao.StudentCodeRepo;
|
|
import cn.com.qmth.examcloud.core.basic.dao.StudentCodeRepo;
|
|
import cn.com.qmth.examcloud.core.basic.dao.StudentRepo;
|
|
import cn.com.qmth.examcloud.core.basic.dao.StudentRepo;
|
|
@@ -186,10 +186,9 @@ public class StudentController extends ControllerSupport {
|
|
|
|
|
|
List<StudentDomain> studentDomainList = Lists.newArrayList();
|
|
List<StudentDomain> studentDomainList = Lists.newArrayList();
|
|
|
|
|
|
- String urlPrefix = PropertyHolder.getString(PropKeys.STUDENT_PHOTO_URL_PREFIX);
|
|
|
|
- if (StringUtils.isBlank(urlPrefix)) {
|
|
|
|
- throw new StatusException("560111",
|
|
|
|
- "property[$studentPhoto.url.prefix] is not configured");
|
|
|
|
|
|
+ String upyunDomain = PropertyHolder.getString("$upyun.site.1.domain");
|
|
|
|
+ if (StringUtils.isBlank(upyunDomain)) {
|
|
|
|
+ throw new StatusException("560111", "property[$upyun.site.1.domain] is not configured");
|
|
}
|
|
}
|
|
|
|
|
|
while (iterator.hasNext()) {
|
|
while (iterator.hasNext()) {
|
|
@@ -212,7 +211,8 @@ public class StudentController extends ControllerSupport {
|
|
|
|
|
|
bean.setIdentityNumber(next.getIdentityNumber());
|
|
bean.setIdentityNumber(next.getIdentityNumber());
|
|
if (StringUtils.isNotBlank(next.getPhotoPath())) {
|
|
if (StringUtils.isNotBlank(next.getPhotoPath())) {
|
|
- bean.setPhotoPath(urlPrefix + next.getPhotoPath());
|
|
|
|
|
|
+ bean.setPhotoPath(
|
|
|
|
+ UrlUtil.joinUrl(upyunDomain, "student_base_photo", next.getPhotoPath()));
|
|
}
|
|
}
|
|
bean.setPhoneNumber(next.getPhoneNumber());
|
|
bean.setPhoneNumber(next.getPhoneNumber());
|
|
bean.setSecurityPhone(next.getSecurityPhone());
|
|
bean.setSecurityPhone(next.getSecurityPhone());
|