|
@@ -27,6 +27,7 @@ import org.springframework.web.bind.annotation.RestController;
|
|
|
import com.google.common.collect.Lists;
|
|
|
|
|
|
import cn.com.qmth.examcloud.commons.base.exception.StatusException;
|
|
|
+import cn.com.qmth.examcloud.commons.base.util.PropertiesUtil;
|
|
|
import cn.com.qmth.examcloud.commons.web.helpers.page.PageInfo;
|
|
|
import cn.com.qmth.examcloud.commons.web.security.bean.User;
|
|
|
import cn.com.qmth.examcloud.commons.web.support.ControllerSupport;
|
|
@@ -119,6 +120,12 @@ public class StudentController extends ControllerSupport {
|
|
|
|
|
|
List<StudentDomain> studentDomainList = Lists.newArrayList();
|
|
|
|
|
|
+ String urlPrefix = PropertiesUtil.getString("$upyun.studentPhoto.url.prefix");
|
|
|
+ if (StringUtils.isBlank(urlPrefix)) {
|
|
|
+ throw new StatusException("B-560111",
|
|
|
+ "property[$upyun.studentPhoto.url.prefix] is not configured");
|
|
|
+ }
|
|
|
+
|
|
|
while (iterator.hasNext()) {
|
|
|
StudentEntity next = iterator.next();
|
|
|
StudentDomain bean = new StudentDomain();
|
|
@@ -130,7 +137,7 @@ public class StudentController extends ControllerSupport {
|
|
|
bean.setEnable(next.getEnable());
|
|
|
bean.setStudentCode(next.getStudentCode());
|
|
|
bean.setIdentityNumber(next.getIdentityNumber());
|
|
|
- bean.setPhotoPath(next.getPhotoPath());
|
|
|
+ bean.setPhotoPath(urlPrefix + next.getPhotoPath());
|
|
|
bean.setPhoneNumber(next.getPhoneNumber());
|
|
|
bean.setSecurityPhone(next.getSecurityPhone());
|
|
|
bean.setRemark(next.getRemark());
|