|
@@ -1,18 +1,5 @@
|
|
|
package cn.com.qmth.examcloud.core.basic.service.impl;
|
|
|
|
|
|
-import java.util.List;
|
|
|
-import java.util.Map;
|
|
|
-
|
|
|
-import javax.transaction.Transactional;
|
|
|
-
|
|
|
-import org.apache.commons.collections4.CollectionUtils;
|
|
|
-import org.apache.commons.lang3.StringUtils;
|
|
|
-import org.springframework.beans.factory.annotation.Autowired;
|
|
|
-import org.springframework.stereotype.Service;
|
|
|
-
|
|
|
-import com.google.common.collect.Lists;
|
|
|
-import com.google.common.collect.Maps;
|
|
|
-
|
|
|
import cn.com.qmth.examcloud.commons.exception.StatusException;
|
|
|
import cn.com.qmth.examcloud.commons.util.ByteUtil;
|
|
|
import cn.com.qmth.examcloud.commons.util.SHA256;
|
|
@@ -33,6 +20,18 @@ import cn.com.qmth.examcloud.support.filestorage.FileStorageUtil;
|
|
|
import cn.com.qmth.examcloud.task.api.DataSyncCloudService;
|
|
|
import cn.com.qmth.examcloud.task.api.request.SyncStudentReq;
|
|
|
import cn.com.qmth.examcloud.web.helpers.GlobalHelper;
|
|
|
+import com.google.common.collect.Lists;
|
|
|
+import com.google.common.collect.Maps;
|
|
|
+import org.apache.commons.collections4.CollectionUtils;
|
|
|
+import org.apache.commons.lang3.StringUtils;
|
|
|
+import org.springframework.beans.factory.annotation.Autowired;
|
|
|
+import org.springframework.data.jpa.domain.Specification;
|
|
|
+import org.springframework.stereotype.Service;
|
|
|
+
|
|
|
+import javax.persistence.criteria.Predicate;
|
|
|
+import javax.transaction.Transactional;
|
|
|
+import java.util.*;
|
|
|
+import java.util.stream.Collectors;
|
|
|
|
|
|
/**
|
|
|
* 学生服务类 Created by songyue on 17/1/14.
|
|
@@ -40,458 +39,473 @@ import cn.com.qmth.examcloud.web.helpers.GlobalHelper;
|
|
|
@Service
|
|
|
public class StudentServiceImpl implements StudentService {
|
|
|
|
|
|
- @Autowired
|
|
|
- StudentRepo studentRepo;
|
|
|
-
|
|
|
- @Autowired
|
|
|
- UserRepo userRepo;
|
|
|
-
|
|
|
- @Autowired
|
|
|
- StudentCodeRepo studentCodeRepo;
|
|
|
-
|
|
|
- @Autowired
|
|
|
- UserService userService;
|
|
|
-
|
|
|
- @Autowired
|
|
|
- OrgRepo orgRepo;
|
|
|
-
|
|
|
- @Autowired
|
|
|
- OrgServiceImpl orgService;
|
|
|
-
|
|
|
- @Autowired
|
|
|
- DataSyncCloudService dataSyncCloudService;
|
|
|
-
|
|
|
- @Autowired
|
|
|
- StudentCache studentCache;
|
|
|
-
|
|
|
- @Autowired
|
|
|
- OrgCache orgCache;
|
|
|
-
|
|
|
- /*
|
|
|
- * 实现
|
|
|
- *
|
|
|
- * @author WANGWEI
|
|
|
- *
|
|
|
- * @see cn.com.qmth.examcloud.core.basic.service.StudentService#
|
|
|
- * insertOrUpdateStudent(cn.com.qmth.examcloud.core.basic.service.bean.
|
|
|
- * StudentInfo)
|
|
|
- */
|
|
|
- @Override
|
|
|
- @Transactional
|
|
|
- public StudentEntity saveStudent(StudentInfo studentInfo) {
|
|
|
- Long rootOrgId = studentInfo.getRootOrgId();
|
|
|
- OrgEntity rootOrg = GlobalHelper.getEntity(orgRepo, rootOrgId, OrgEntity.class);
|
|
|
-
|
|
|
- if (null == rootOrg || null != rootOrg.getParentId()) {
|
|
|
- throw new StatusException("160001", "顶级机构错误");
|
|
|
- }
|
|
|
-
|
|
|
- String identityNumber = studentInfo.getIdentityNumber();
|
|
|
- if (StringUtils.isBlank(identityNumber)) {
|
|
|
- throw new StatusException("160012", "身份证号不能为空");
|
|
|
- }
|
|
|
-
|
|
|
- StudentEntity student = studentRepo.findByIdentityNumberAndRootOrgId(identityNumber,
|
|
|
- rootOrgId);
|
|
|
-
|
|
|
- OrgEntity org = null;
|
|
|
- if (null != studentInfo.getOrgId()) {
|
|
|
- org = GlobalHelper.getEntity(orgRepo, studentInfo.getOrgId(), OrgEntity.class);
|
|
|
- if (null == org) {
|
|
|
- throw new StatusException("160050", "orgId is wrong");
|
|
|
- }
|
|
|
- if (!org.getRootId().equals(rootOrgId)) {
|
|
|
- throw new StatusException("160051", "orgId is wrong");
|
|
|
- }
|
|
|
- if (null == org.getParentId()) {
|
|
|
- throw new StatusException("160052", "orgId is wrong");
|
|
|
- }
|
|
|
- if (!org.getParentId().equals(rootOrgId)) {
|
|
|
- throw new StatusException("160053", "orgId is wrong");
|
|
|
- }
|
|
|
- } else if (StringUtils.isNotBlank(studentInfo.getOrgCode())) {
|
|
|
- org = orgRepo.findByRootIdAndCode(rootOrgId, studentInfo.getOrgCode());
|
|
|
- if (null == org) {
|
|
|
- String orgName = studentInfo.getOrgName();
|
|
|
- if (StringUtils.isBlank(orgName)) {
|
|
|
- throw new StatusException("160003", "orgName is blank");
|
|
|
- }
|
|
|
- org = new OrgEntity();
|
|
|
- org.setParentId(rootOrgId);
|
|
|
- org.setCode(studentInfo.getOrgCode());
|
|
|
- org.setName(orgName);
|
|
|
- org.setEnable(true);
|
|
|
- org.setRootId(rootOrgId);
|
|
|
- org = orgRepo.save(org);
|
|
|
- }
|
|
|
- } else {
|
|
|
- if (null != student) {
|
|
|
- org = GlobalHelper.getEntity(orgRepo, student.getOrgId(), OrgEntity.class);
|
|
|
- } else {
|
|
|
- org = orgRepo.findByRootIdAndCode(rootOrgId, BasicConsts.DEFAULT_ORG_COEE);
|
|
|
- if (null == org) {
|
|
|
- org = new OrgEntity();
|
|
|
- org.setParentId(rootOrgId);
|
|
|
- org.setCode(BasicConsts.DEFAULT_ORG_COEE);
|
|
|
- org.setName(BasicConsts.DEFAULT_ORG_NAME);
|
|
|
- org.setEnable(true);
|
|
|
- org.setRootId(rootOrgId);
|
|
|
- org = orgRepo.save(org);
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- long updateTime = 0L;
|
|
|
- if (null != student) {
|
|
|
- if (null != student.getUpdateTime()) {
|
|
|
- updateTime = student.getUpdateTime().getTime();
|
|
|
- }
|
|
|
- if (null == student.getEnable()) {
|
|
|
- student.setEnable(true);
|
|
|
- }
|
|
|
- } else {
|
|
|
- student = new StudentEntity();
|
|
|
- student.setPasswordWeak(true);
|
|
|
- student.setEnable(true);
|
|
|
- String passwd=null;
|
|
|
+ @Autowired
|
|
|
+ StudentRepo studentRepo;
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ UserRepo userRepo;
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ StudentCodeRepo studentCodeRepo;
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ UserService userService;
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ OrgRepo orgRepo;
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ OrgServiceImpl orgService;
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ DataSyncCloudService dataSyncCloudService;
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ StudentCache studentCache;
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ OrgCache orgCache;
|
|
|
+
|
|
|
+ /*
|
|
|
+ * 实现
|
|
|
+ *
|
|
|
+ * @author WANGWEI
|
|
|
+ *
|
|
|
+ * @see cn.com.qmth.examcloud.core.basic.service.StudentService#
|
|
|
+ * insertOrUpdateStudent(cn.com.qmth.examcloud.core.basic.service.bean.
|
|
|
+ * StudentInfo)
|
|
|
+ */
|
|
|
+ @Override
|
|
|
+ @Transactional
|
|
|
+ public StudentEntity saveStudent(StudentInfo studentInfo) {
|
|
|
+ Long rootOrgId = studentInfo.getRootOrgId();
|
|
|
+ OrgEntity rootOrg = GlobalHelper.getEntity(orgRepo, rootOrgId, OrgEntity.class);
|
|
|
+
|
|
|
+ if (null == rootOrg || null != rootOrg.getParentId()) {
|
|
|
+ throw new StatusException("160001", "顶级机构错误");
|
|
|
+ }
|
|
|
+
|
|
|
+ String identityNumber = studentInfo.getIdentityNumber();
|
|
|
+ if (StringUtils.isBlank(identityNumber)) {
|
|
|
+ throw new StatusException("160012", "身份证号不能为空");
|
|
|
+ }
|
|
|
+
|
|
|
+ StudentEntity student = studentRepo.findByIdentityNumberAndRootOrgId(identityNumber,
|
|
|
+ rootOrgId);
|
|
|
+
|
|
|
+ OrgEntity org = null;
|
|
|
+ if (null != studentInfo.getOrgId()) {
|
|
|
+ org = GlobalHelper.getEntity(orgRepo, studentInfo.getOrgId(), OrgEntity.class);
|
|
|
+ if (null == org) {
|
|
|
+ throw new StatusException("160050", "orgId is wrong");
|
|
|
+ }
|
|
|
+ if (!org.getRootId().equals(rootOrgId)) {
|
|
|
+ throw new StatusException("160051", "orgId is wrong");
|
|
|
+ }
|
|
|
+ if (null == org.getParentId()) {
|
|
|
+ throw new StatusException("160052", "orgId is wrong");
|
|
|
+ }
|
|
|
+ if (!org.getParentId().equals(rootOrgId)) {
|
|
|
+ throw new StatusException("160053", "orgId is wrong");
|
|
|
+ }
|
|
|
+ } else if (StringUtils.isNotBlank(studentInfo.getOrgCode())) {
|
|
|
+ org = orgRepo.findByRootIdAndCode(rootOrgId, studentInfo.getOrgCode());
|
|
|
+ if (null == org) {
|
|
|
+ String orgName = studentInfo.getOrgName();
|
|
|
+ if (StringUtils.isBlank(orgName)) {
|
|
|
+ throw new StatusException("160003", "orgName is blank");
|
|
|
+ }
|
|
|
+ org = new OrgEntity();
|
|
|
+ org.setParentId(rootOrgId);
|
|
|
+ org.setCode(studentInfo.getOrgCode());
|
|
|
+ org.setName(orgName);
|
|
|
+ org.setEnable(true);
|
|
|
+ org.setRootId(rootOrgId);
|
|
|
+ org = orgRepo.save(org);
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ if (null != student) {
|
|
|
+ org = GlobalHelper.getEntity(orgRepo, student.getOrgId(), OrgEntity.class);
|
|
|
+ } else {
|
|
|
+ org = orgRepo.findByRootIdAndCode(rootOrgId, BasicConsts.DEFAULT_ORG_COEE);
|
|
|
+ if (null == org) {
|
|
|
+ org = new OrgEntity();
|
|
|
+ org.setParentId(rootOrgId);
|
|
|
+ org.setCode(BasicConsts.DEFAULT_ORG_COEE);
|
|
|
+ org.setName(BasicConsts.DEFAULT_ORG_NAME);
|
|
|
+ org.setEnable(true);
|
|
|
+ org.setRootId(rootOrgId);
|
|
|
+ org = orgRepo.save(org);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ long updateTime = 0L;
|
|
|
+ if (null != student) {
|
|
|
+ if (null != student.getUpdateTime()) {
|
|
|
+ updateTime = student.getUpdateTime().getTime();
|
|
|
+ }
|
|
|
+ if (null == student.getEnable()) {
|
|
|
+ student.setEnable(true);
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ student = new StudentEntity();
|
|
|
+ student.setPasswordWeak(true);
|
|
|
+ student.setEnable(true);
|
|
|
+ String passwd = null;
|
|
|
if (StringUtils.isNotEmpty(identityNumber)
|
|
|
&& identityNumber.matches("[0-9a-zA-Z]{6,}")) {
|
|
|
- passwd=StringUtils.substring(identityNumber, -6, identityNumber.length());
|
|
|
+ passwd = StringUtils.substring(identityNumber, -6, identityNumber.length());
|
|
|
} else {
|
|
|
- passwd=BasicConsts.DEFAULT_PASSWORD;
|
|
|
+ passwd = BasicConsts.DEFAULT_PASSWORD;
|
|
|
}
|
|
|
byte[] bytes = SHA256.encode(identityNumber + passwd);
|
|
|
- String encodePassword = ByteUtil.toHexAscii(bytes);
|
|
|
- student.setPassword(encodePassword);
|
|
|
-
|
|
|
- student.setRootOrgId(rootOrgId);
|
|
|
- student.setIdentityNumber(identityNumber);
|
|
|
- }
|
|
|
-
|
|
|
- student.setOrgId(org.getId());
|
|
|
- if (null != studentInfo.getName()) {
|
|
|
- if (StringUtils.isBlank(studentInfo.getName())) {
|
|
|
- throw new StatusException("160006", "姓名不能为空串");
|
|
|
- }
|
|
|
- student.setName(studentInfo.getName());
|
|
|
- }
|
|
|
- if (null != studentInfo.getPhotoPath()) {
|
|
|
- student.setPhotoPath(studentInfo.getPhotoPath());
|
|
|
- }
|
|
|
- if (null != studentInfo.getPhoneNumber()) {
|
|
|
- student.setPhoneNumber(studentInfo.getPhoneNumber());
|
|
|
- }
|
|
|
- if (null != studentInfo.getRemark()) {
|
|
|
- student.setRemark(studentInfo.getRemark());
|
|
|
- }
|
|
|
- if (null != studentInfo.getEnable()) {
|
|
|
- student.setEnable(studentInfo.getEnable());
|
|
|
- }
|
|
|
- StudentEntity saved = studentRepo.saveAndFlush(student);
|
|
|
-
|
|
|
- List<String> studentCodeList = studentInfo.getStudentCodeList();
|
|
|
- if (CollectionUtils.isNotEmpty(studentCodeList)) {
|
|
|
-
|
|
|
- if (5 < studentCodeList.size()) {
|
|
|
- throw new StatusException("160019", "身份证绑定的学号数量不能超过5个");
|
|
|
- }
|
|
|
-
|
|
|
- for (String studentCode : studentCodeList) {
|
|
|
- if (StringUtils.isBlank(studentCode)) {
|
|
|
- continue;
|
|
|
- }
|
|
|
- StudentCodeEntity studentCodeEntity = studentCodeRepo
|
|
|
- .findByStudentCodeAndRootOrgId(studentCode, rootOrgId);
|
|
|
-
|
|
|
- if (null != studentCodeEntity) {
|
|
|
- if (!studentCodeEntity.getIdentityNumber().equalsIgnoreCase(identityNumber)) {
|
|
|
- throw new StatusException("160008", "学号被占用. 学号: " + studentCode);
|
|
|
- }
|
|
|
- } else {
|
|
|
- studentCodeEntity = new StudentCodeEntity();
|
|
|
- studentCodeEntity.setIdentityNumber(identityNumber);
|
|
|
- studentCodeEntity.setRootOrgId(rootOrgId);
|
|
|
- studentCodeEntity.setStudentCode(studentCode);
|
|
|
- studentCodeEntity.setStudentId(saved.getId());
|
|
|
-
|
|
|
- studentCodeRepo.save(studentCodeEntity);
|
|
|
- }
|
|
|
-
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- List<StudentCodeEntity> studentCodeEntityList = studentCodeRepo
|
|
|
- .findByStudentId(saved.getId());
|
|
|
-
|
|
|
- if (5 < studentCodeEntityList.size()) {
|
|
|
- throw new StatusException("160018", "身份证绑定的学号数量不能超过5个");
|
|
|
- }
|
|
|
-
|
|
|
- List<String> lastStudentCodeList = Lists.newArrayList();
|
|
|
- for (StudentCodeEntity cur : studentCodeEntityList) {
|
|
|
- lastStudentCodeList.add(cur.getStudentCode());
|
|
|
- }
|
|
|
-
|
|
|
- // 同步操作
|
|
|
- if (updateTime != saved.getUpdateTime().getTime()) {
|
|
|
- SyncStudentReq req = new SyncStudentReq();
|
|
|
- req.setEnable(saved.getEnable());
|
|
|
- req.setId(saved.getId());
|
|
|
- req.setIdentityNumber(saved.getIdentityNumber());
|
|
|
- req.setName(saved.getName());
|
|
|
- req.setOrgCode(org.getCode());
|
|
|
- req.setOrgId(org.getId());
|
|
|
- req.setOrgName(org.getName());
|
|
|
- req.setPhoneNumber(saved.getPhoneNumber());
|
|
|
- req.setPhotoPath(saved.getPhotoPath());
|
|
|
- req.setRootOrgId(saved.getRootOrgId());
|
|
|
- req.setSecurityPhone(saved.getSecurityPhone());
|
|
|
- req.setStudentCodeList(lastStudentCodeList);
|
|
|
-
|
|
|
- req.setSyncType("update");
|
|
|
-
|
|
|
- dataSyncCloudService.syncStudent(req);
|
|
|
- }
|
|
|
-
|
|
|
- studentCache.remove(saved.getId());
|
|
|
- orgCache.remove(org.getId());
|
|
|
-
|
|
|
- return saved;
|
|
|
- }
|
|
|
-
|
|
|
- /*
|
|
|
- * 实现
|
|
|
- *
|
|
|
- * @author WANGWEI
|
|
|
- *
|
|
|
- * @see
|
|
|
- * cn.com.qmth.examcloud.core.basic.service.StudentService#getStudentInfo(
|
|
|
- * java.lang.Long, java.lang.String, java.lang.String, java.lang.String)
|
|
|
- */
|
|
|
- @Override
|
|
|
- public StudentInfo getStudentInfo(Long rootOrgId, Long studentId, String identityNumber,
|
|
|
- String studentCode, String securityPhone) {
|
|
|
-
|
|
|
- StudentEntity s = null;
|
|
|
- int count = 0;
|
|
|
- if (null != studentId) {
|
|
|
- count++;
|
|
|
- s = GlobalHelper.getEntity(studentRepo, studentId, StudentEntity.class);
|
|
|
- } else if (StringUtils.isNotBlank(securityPhone)) {
|
|
|
- count++;
|
|
|
- s = studentRepo.findBySecurityPhone(securityPhone);
|
|
|
- } else if (null == rootOrgId) {
|
|
|
- throw new StatusException("160250", "rootOrgId is null");
|
|
|
- }
|
|
|
-
|
|
|
- if (StringUtils.isNotBlank(identityNumber)) {
|
|
|
- count++;
|
|
|
- s = studentRepo.findByIdentityNumberAndRootOrgId(identityNumber, rootOrgId);
|
|
|
- }
|
|
|
- if (StringUtils.isNotBlank(studentCode)) {
|
|
|
- count++;
|
|
|
-
|
|
|
- StudentCodeEntity studentCodeEntity = studentCodeRepo
|
|
|
- .findByStudentCodeAndRootOrgId(studentCode, rootOrgId);
|
|
|
- if (null != studentCodeEntity) {
|
|
|
- s = GlobalHelper.getEntity(studentRepo, studentCodeEntity.getStudentId(),
|
|
|
- StudentEntity.class);
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- if (count > 1) {
|
|
|
- throw new StatusException("160210",
|
|
|
- "参数过多,只需要[studentId,identityNumber,studentCode,securityPhone]中的一个");
|
|
|
- }
|
|
|
-
|
|
|
- if (null == s) {
|
|
|
- throw new StatusException("160211", "学生不存在");
|
|
|
- }
|
|
|
-
|
|
|
- StudentInfo info = new StudentInfo();
|
|
|
- info.setId(s.getId());
|
|
|
- info.setEnable(s.getEnable());
|
|
|
- info.setIdentityNumber(s.getIdentityNumber());
|
|
|
- info.setName(s.getName());
|
|
|
- info.setOrgId(s.getOrgId());
|
|
|
- if (null != s.getOrgId()) {
|
|
|
- OrgEntity org = GlobalHelper.getEntity(orgRepo, s.getOrgId(), OrgEntity.class);
|
|
|
- if (null != org) {
|
|
|
- info.setOrgCode(org.getCode());
|
|
|
- info.setOrgName(org.getName());
|
|
|
- }
|
|
|
- }
|
|
|
- info.setPhoneNumber(s.getPhoneNumber());
|
|
|
-
|
|
|
- if (StringUtils.isNotBlank(s.getPhotoPath())) {
|
|
|
-// String upyunDomain = PropertyHolder.getString("$upyun.site.1.domain");
|
|
|
-// if (StringUtils.isBlank(upyunDomain)) {
|
|
|
-// throw new StatusException("560111",
|
|
|
-// "property[$upyun.site.1.domain] is not configured");
|
|
|
-// }
|
|
|
-// String path = UrlUtil.joinUrl(upyunDomain, "student_base_photo", s.getPhotoPath());
|
|
|
-// info.setPhotoPath(path);
|
|
|
- //通用存储
|
|
|
- info.setPhotoPath(FileStorageUtil.realPath(FileStorageUtil.getIntactPath("student_base_photo", s.getPhotoPath())));
|
|
|
- }
|
|
|
-
|
|
|
- info.setRemark(s.getRemark());
|
|
|
- info.setRootOrgId(s.getRootOrgId());
|
|
|
- OrgEntity rootOrg = GlobalHelper.getEntity(orgRepo, s.getRootOrgId(), OrgEntity.class);
|
|
|
- info.setRootOrgName(rootOrg.getName());
|
|
|
- info.setSecurityPhone(s.getSecurityPhone());
|
|
|
-
|
|
|
- List<StudentCodeEntity> studentCodeEntityList = studentCodeRepo.findByStudentId(s.getId());
|
|
|
-
|
|
|
- List<String> studentCodeList = Lists.newArrayList();
|
|
|
- for (StudentCodeEntity cur : studentCodeEntityList) {
|
|
|
- studentCodeList.add(cur.getStudentCode());
|
|
|
- }
|
|
|
- info.setStudentCodeList(studentCodeList);
|
|
|
-
|
|
|
- return info;
|
|
|
- }
|
|
|
-
|
|
|
- @Override
|
|
|
- public List<Long> unbindStudentCode(Long rootOrgId, String studentCode, String identityNumber) {
|
|
|
-
|
|
|
- if (null == rootOrgId) {
|
|
|
- throw new StatusException("120001", "rootOrgId is null");
|
|
|
- }
|
|
|
-
|
|
|
- // 更新的学生集合
|
|
|
- List<StudentEntity> studentList = Lists.newArrayList();
|
|
|
- // 解绑的学号集合
|
|
|
- Map<Long, List<String>> unboundStudentCodeMap = Maps.newHashMap();
|
|
|
-
|
|
|
- StudentEntity s1 = null;
|
|
|
- StudentEntity s2 = null;
|
|
|
- if (null != studentCode) {
|
|
|
- StudentCodeEntity sc = studentCodeRepo.findByStudentCodeAndRootOrgId(studentCode,
|
|
|
- rootOrgId);
|
|
|
- if (null != sc) {
|
|
|
- studentCodeRepo.delete(sc);
|
|
|
- s1 = GlobalHelper.getEntity(studentRepo, sc.getStudentId(), StudentEntity.class);
|
|
|
- studentList.add(s1);
|
|
|
- List<String> unboundStudentCodeList = Lists.newArrayList();
|
|
|
- unboundStudentCodeList.add(sc.getStudentCode());
|
|
|
- unboundStudentCodeMap.put(s1.getId(), unboundStudentCodeList);
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- if (null != identityNumber) {
|
|
|
- s2 = studentRepo.findByIdentityNumberAndRootOrgId(identityNumber, rootOrgId);
|
|
|
- if (null != s2) {
|
|
|
- if (null == s1 || !s1.getId().equals(s2.getId())) {
|
|
|
- studentList.add(s2);
|
|
|
- }
|
|
|
-
|
|
|
- List<StudentCodeEntity> scList = studentCodeRepo.findByStudentId(s2.getId());
|
|
|
- studentCodeRepo.deleteAll(scList);
|
|
|
-
|
|
|
- List<String> unboundStudentCodeList = unboundStudentCodeMap.get(s2.getId());
|
|
|
- if (null == unboundStudentCodeList) {
|
|
|
- unboundStudentCodeList = Lists.newArrayList();
|
|
|
- unboundStudentCodeMap.put(s2.getId(), unboundStudentCodeList);
|
|
|
- }
|
|
|
- for (StudentCodeEntity cur : scList) {
|
|
|
- unboundStudentCodeList.add(cur.getStudentCode());
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- List<Long> studentIdList = Lists.newArrayList();
|
|
|
-
|
|
|
- for (StudentEntity cur : studentList) {
|
|
|
- studentIdList.add(cur.getId());
|
|
|
-
|
|
|
- SyncStudentReq req = new SyncStudentReq();
|
|
|
- req.setEnable(cur.getEnable());
|
|
|
- req.setId(cur.getId());
|
|
|
- req.setIdentityNumber(cur.getIdentityNumber());
|
|
|
- req.setName(cur.getName());
|
|
|
-
|
|
|
- req.setOrgId(cur.getOrgId());
|
|
|
- OrgEntity org = GlobalHelper.getEntity(orgRepo, cur.getOrgId(), OrgEntity.class);
|
|
|
- req.setOrgCode(org.getCode());
|
|
|
- req.setOrgName(org.getName());
|
|
|
-
|
|
|
- req.setPhoneNumber(cur.getPhoneNumber());
|
|
|
- req.setPhotoPath(cur.getPhotoPath());
|
|
|
- req.setRootOrgId(cur.getRootOrgId());
|
|
|
- req.setSecurityPhone(cur.getSecurityPhone());
|
|
|
-
|
|
|
- List<StudentCodeEntity> studentCodeEntityList = studentCodeRepo
|
|
|
- .findByStudentId(cur.getId());
|
|
|
-
|
|
|
- List<String> lastStudentCodeList = Lists.newArrayList();
|
|
|
- for (StudentCodeEntity sc : studentCodeEntityList) {
|
|
|
- lastStudentCodeList.add(sc.getStudentCode());
|
|
|
- }
|
|
|
-
|
|
|
- req.setStudentCodeList(lastStudentCodeList);
|
|
|
-
|
|
|
- List<String> unboundStudentCodeList = unboundStudentCodeMap.get(cur.getId());
|
|
|
- req.setUnboundStudentCodeList(unboundStudentCodeList);
|
|
|
-
|
|
|
- req.setSyncType("update");
|
|
|
-
|
|
|
- dataSyncCloudService.syncStudent(req);
|
|
|
- }
|
|
|
-
|
|
|
- for (Long cur : studentIdList) {
|
|
|
- studentCache.remove(cur);
|
|
|
- }
|
|
|
-
|
|
|
- return studentIdList;
|
|
|
- }
|
|
|
-
|
|
|
- @Override
|
|
|
- public void unbindSecurityPhone(Long studentId) {
|
|
|
-
|
|
|
- StudentEntity s = GlobalHelper.getEntity(studentRepo, studentId, StudentEntity.class);
|
|
|
- if (null == s) {
|
|
|
- throw new StatusException("450110", "学生不存在");
|
|
|
- }
|
|
|
- s.setSecurityPhone(null);
|
|
|
- StudentEntity saved = studentRepo.save(s);
|
|
|
-
|
|
|
- SyncStudentReq req = new SyncStudentReq();
|
|
|
- req.setEnable(saved.getEnable());
|
|
|
- req.setId(saved.getId());
|
|
|
- req.setIdentityNumber(saved.getIdentityNumber());
|
|
|
- req.setName(saved.getName());
|
|
|
-
|
|
|
- req.setOrgId(saved.getOrgId());
|
|
|
- OrgEntity org = GlobalHelper.getEntity(orgRepo, saved.getOrgId(), OrgEntity.class);
|
|
|
- req.setOrgCode(org.getCode());
|
|
|
- req.setOrgName(org.getName());
|
|
|
-
|
|
|
- req.setPhoneNumber(saved.getPhoneNumber());
|
|
|
- req.setPhotoPath(saved.getPhotoPath());
|
|
|
- req.setRootOrgId(saved.getRootOrgId());
|
|
|
- req.setSecurityPhone(saved.getSecurityPhone());
|
|
|
-
|
|
|
- List<StudentCodeEntity> studentCodeEntityList = studentCodeRepo
|
|
|
- .findByStudentId(saved.getId());
|
|
|
- List<String> lastStudentCodeList = Lists.newArrayList();
|
|
|
- for (StudentCodeEntity sc : studentCodeEntityList) {
|
|
|
- lastStudentCodeList.add(sc.getStudentCode());
|
|
|
- }
|
|
|
- req.setStudentCodeList(lastStudentCodeList);
|
|
|
-
|
|
|
- req.setSyncType("update");
|
|
|
-
|
|
|
- dataSyncCloudService.syncStudent(req);
|
|
|
-
|
|
|
- studentCache.remove(studentId);
|
|
|
- }
|
|
|
-
|
|
|
- @Override
|
|
|
- public Boolean hasBeBound(String securityPhone) {
|
|
|
-
|
|
|
- StudentEntity s = studentRepo.findBySecurityPhone(securityPhone);
|
|
|
- return null != s;
|
|
|
- }
|
|
|
+ String encodePassword = ByteUtil.toHexAscii(bytes);
|
|
|
+ student.setPassword(encodePassword);
|
|
|
+
|
|
|
+ student.setRootOrgId(rootOrgId);
|
|
|
+ student.setIdentityNumber(identityNumber);
|
|
|
+ }
|
|
|
+
|
|
|
+ student.setOrgId(org.getId());
|
|
|
+ if (null != studentInfo.getName()) {
|
|
|
+ if (StringUtils.isBlank(studentInfo.getName())) {
|
|
|
+ throw new StatusException("160006", "姓名不能为空串");
|
|
|
+ }
|
|
|
+ student.setName(studentInfo.getName());
|
|
|
+ }
|
|
|
+ if (null != studentInfo.getPhotoPath()) {
|
|
|
+ student.setPhotoPath(studentInfo.getPhotoPath());
|
|
|
+ }
|
|
|
+ if (null != studentInfo.getPhoneNumber()) {
|
|
|
+ student.setPhoneNumber(studentInfo.getPhoneNumber());
|
|
|
+ }
|
|
|
+ if (null != studentInfo.getRemark()) {
|
|
|
+ student.setRemark(studentInfo.getRemark());
|
|
|
+ }
|
|
|
+ if (null != studentInfo.getEnable()) {
|
|
|
+ student.setEnable(studentInfo.getEnable());
|
|
|
+ }
|
|
|
+ StudentEntity saved = studentRepo.saveAndFlush(student);
|
|
|
+
|
|
|
+ List<String> studentCodeList = studentInfo.getStudentCodeList();
|
|
|
+ if (CollectionUtils.isNotEmpty(studentCodeList)) {
|
|
|
+
|
|
|
+ if (5 < studentCodeList.size()) {
|
|
|
+ throw new StatusException("160019", "身份证绑定的学号数量不能超过5个");
|
|
|
+ }
|
|
|
+
|
|
|
+ for (String studentCode : studentCodeList) {
|
|
|
+ if (StringUtils.isBlank(studentCode)) {
|
|
|
+ continue;
|
|
|
+ }
|
|
|
+ StudentCodeEntity studentCodeEntity = studentCodeRepo
|
|
|
+ .findByStudentCodeAndRootOrgId(studentCode, rootOrgId);
|
|
|
+
|
|
|
+ if (null != studentCodeEntity) {
|
|
|
+ if (!studentCodeEntity.getIdentityNumber().equalsIgnoreCase(identityNumber)) {
|
|
|
+ throw new StatusException("160008", "学号被占用. 学号: " + studentCode);
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ studentCodeEntity = new StudentCodeEntity();
|
|
|
+ studentCodeEntity.setIdentityNumber(identityNumber);
|
|
|
+ studentCodeEntity.setRootOrgId(rootOrgId);
|
|
|
+ studentCodeEntity.setStudentCode(studentCode);
|
|
|
+ studentCodeEntity.setStudentId(saved.getId());
|
|
|
+
|
|
|
+ studentCodeRepo.save(studentCodeEntity);
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ List<StudentCodeEntity> studentCodeEntityList = studentCodeRepo
|
|
|
+ .findByStudentId(saved.getId());
|
|
|
+
|
|
|
+ if (5 < studentCodeEntityList.size()) {
|
|
|
+ throw new StatusException("160018", "身份证绑定的学号数量不能超过5个");
|
|
|
+ }
|
|
|
+
|
|
|
+ List<String> lastStudentCodeList = Lists.newArrayList();
|
|
|
+ for (StudentCodeEntity cur : studentCodeEntityList) {
|
|
|
+ lastStudentCodeList.add(cur.getStudentCode());
|
|
|
+ }
|
|
|
+
|
|
|
+ // 同步操作
|
|
|
+ if (updateTime != saved.getUpdateTime().getTime()) {
|
|
|
+ SyncStudentReq req = new SyncStudentReq();
|
|
|
+ req.setEnable(saved.getEnable());
|
|
|
+ req.setId(saved.getId());
|
|
|
+ req.setIdentityNumber(saved.getIdentityNumber());
|
|
|
+ req.setName(saved.getName());
|
|
|
+ req.setOrgCode(org.getCode());
|
|
|
+ req.setOrgId(org.getId());
|
|
|
+ req.setOrgName(org.getName());
|
|
|
+ req.setPhoneNumber(saved.getPhoneNumber());
|
|
|
+ req.setPhotoPath(saved.getPhotoPath());
|
|
|
+ req.setRootOrgId(saved.getRootOrgId());
|
|
|
+ req.setSecurityPhone(saved.getSecurityPhone());
|
|
|
+ req.setStudentCodeList(lastStudentCodeList);
|
|
|
+
|
|
|
+ req.setSyncType("update");
|
|
|
+
|
|
|
+ dataSyncCloudService.syncStudent(req);
|
|
|
+ }
|
|
|
+
|
|
|
+ studentCache.remove(saved.getId());
|
|
|
+ orgCache.remove(org.getId());
|
|
|
+
|
|
|
+ return saved;
|
|
|
+ }
|
|
|
+
|
|
|
+ /*
|
|
|
+ * 实现
|
|
|
+ *
|
|
|
+ * @author WANGWEI
|
|
|
+ *
|
|
|
+ * @see
|
|
|
+ * cn.com.qmth.examcloud.core.basic.service.StudentService#getStudentInfo(
|
|
|
+ * java.lang.Long, java.lang.String, java.lang.String, java.lang.String)
|
|
|
+ */
|
|
|
+ @Override
|
|
|
+ public StudentInfo getStudentInfo(Long rootOrgId, Long studentId, String identityNumber,
|
|
|
+ String studentCode, String securityPhone) {
|
|
|
+
|
|
|
+ StudentEntity s = null;
|
|
|
+ int count = 0;
|
|
|
+ if (null != studentId) {
|
|
|
+ count++;
|
|
|
+ s = GlobalHelper.getEntity(studentRepo, studentId, StudentEntity.class);
|
|
|
+ } else if (StringUtils.isNotBlank(securityPhone)) {
|
|
|
+ count++;
|
|
|
+ s = studentRepo.findBySecurityPhone(securityPhone);
|
|
|
+ } else if (null == rootOrgId) {
|
|
|
+ throw new StatusException("160250", "rootOrgId is null");
|
|
|
+ }
|
|
|
+
|
|
|
+ if (StringUtils.isNotBlank(identityNumber)) {
|
|
|
+ count++;
|
|
|
+ s = studentRepo.findByIdentityNumberAndRootOrgId(identityNumber, rootOrgId);
|
|
|
+ }
|
|
|
+ if (StringUtils.isNotBlank(studentCode)) {
|
|
|
+ count++;
|
|
|
+
|
|
|
+ StudentCodeEntity studentCodeEntity = studentCodeRepo
|
|
|
+ .findByStudentCodeAndRootOrgId(studentCode, rootOrgId);
|
|
|
+ if (null != studentCodeEntity) {
|
|
|
+ s = GlobalHelper.getEntity(studentRepo, studentCodeEntity.getStudentId(),
|
|
|
+ StudentEntity.class);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ if (count > 1) {
|
|
|
+ throw new StatusException("160210",
|
|
|
+ "参数过多,只需要[studentId,identityNumber,studentCode,securityPhone]中的一个");
|
|
|
+ }
|
|
|
+
|
|
|
+ if (null == s) {
|
|
|
+ throw new StatusException("160211", "学生不存在");
|
|
|
+ }
|
|
|
+
|
|
|
+ StudentInfo info = new StudentInfo();
|
|
|
+ info.setId(s.getId());
|
|
|
+ info.setEnable(s.getEnable());
|
|
|
+ info.setIdentityNumber(s.getIdentityNumber());
|
|
|
+ info.setName(s.getName());
|
|
|
+ info.setOrgId(s.getOrgId());
|
|
|
+ if (null != s.getOrgId()) {
|
|
|
+ OrgEntity org = GlobalHelper.getEntity(orgRepo, s.getOrgId(), OrgEntity.class);
|
|
|
+ if (null != org) {
|
|
|
+ info.setOrgCode(org.getCode());
|
|
|
+ info.setOrgName(org.getName());
|
|
|
+ }
|
|
|
+ }
|
|
|
+ info.setPhoneNumber(s.getPhoneNumber());
|
|
|
+
|
|
|
+ if (StringUtils.isNotBlank(s.getPhotoPath())) {
|
|
|
+ // String upyunDomain = PropertyHolder.getString("$upyun.site.1.domain");
|
|
|
+ // if (StringUtils.isBlank(upyunDomain)) {
|
|
|
+ // throw new StatusException("560111",
|
|
|
+ // "property[$upyun.site.1.domain] is not configured");
|
|
|
+ // }
|
|
|
+ // String path = UrlUtil.joinUrl(upyunDomain, "student_base_photo", s.getPhotoPath());
|
|
|
+ // info.setPhotoPath(path);
|
|
|
+ //通用存储
|
|
|
+ info.setPhotoPath(FileStorageUtil.realPath(FileStorageUtil.getIntactPath("student_base_photo", s.getPhotoPath())));
|
|
|
+ }
|
|
|
+
|
|
|
+ info.setRemark(s.getRemark());
|
|
|
+ info.setRootOrgId(s.getRootOrgId());
|
|
|
+ OrgEntity rootOrg = GlobalHelper.getEntity(orgRepo, s.getRootOrgId(), OrgEntity.class);
|
|
|
+ info.setRootOrgName(rootOrg.getName());
|
|
|
+ info.setSecurityPhone(s.getSecurityPhone());
|
|
|
+
|
|
|
+ List<StudentCodeEntity> studentCodeEntityList = studentCodeRepo.findByStudentId(s.getId());
|
|
|
+
|
|
|
+ List<String> studentCodeList = Lists.newArrayList();
|
|
|
+ for (StudentCodeEntity cur : studentCodeEntityList) {
|
|
|
+ studentCodeList.add(cur.getStudentCode());
|
|
|
+ }
|
|
|
+ info.setStudentCodeList(studentCodeList);
|
|
|
+
|
|
|
+ return info;
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public List<Long> unbindStudentCode(Long rootOrgId, String studentCode, String identityNumber) {
|
|
|
+
|
|
|
+ if (null == rootOrgId) {
|
|
|
+ throw new StatusException("120001", "rootOrgId is null");
|
|
|
+ }
|
|
|
+
|
|
|
+ // 更新的学生集合
|
|
|
+ List<StudentEntity> studentList = Lists.newArrayList();
|
|
|
+ // 解绑的学号集合
|
|
|
+ Map<Long, List<String>> unboundStudentCodeMap = Maps.newHashMap();
|
|
|
+
|
|
|
+ StudentEntity s1 = null;
|
|
|
+ StudentEntity s2 = null;
|
|
|
+ if (null != studentCode) {
|
|
|
+ StudentCodeEntity sc = studentCodeRepo.findByStudentCodeAndRootOrgId(studentCode,
|
|
|
+ rootOrgId);
|
|
|
+ if (null != sc) {
|
|
|
+ studentCodeRepo.delete(sc);
|
|
|
+ s1 = GlobalHelper.getEntity(studentRepo, sc.getStudentId(), StudentEntity.class);
|
|
|
+ studentList.add(s1);
|
|
|
+ List<String> unboundStudentCodeList = Lists.newArrayList();
|
|
|
+ unboundStudentCodeList.add(sc.getStudentCode());
|
|
|
+ unboundStudentCodeMap.put(s1.getId(), unboundStudentCodeList);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ if (null != identityNumber) {
|
|
|
+ s2 = studentRepo.findByIdentityNumberAndRootOrgId(identityNumber, rootOrgId);
|
|
|
+ if (null != s2) {
|
|
|
+ if (null == s1 || !s1.getId().equals(s2.getId())) {
|
|
|
+ studentList.add(s2);
|
|
|
+ }
|
|
|
+
|
|
|
+ List<StudentCodeEntity> scList = studentCodeRepo.findByStudentId(s2.getId());
|
|
|
+ studentCodeRepo.deleteAll(scList);
|
|
|
+
|
|
|
+ List<String> unboundStudentCodeList = unboundStudentCodeMap.get(s2.getId());
|
|
|
+ if (null == unboundStudentCodeList) {
|
|
|
+ unboundStudentCodeList = Lists.newArrayList();
|
|
|
+ unboundStudentCodeMap.put(s2.getId(), unboundStudentCodeList);
|
|
|
+ }
|
|
|
+ for (StudentCodeEntity cur : scList) {
|
|
|
+ unboundStudentCodeList.add(cur.getStudentCode());
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ List<Long> studentIdList = Lists.newArrayList();
|
|
|
+
|
|
|
+ for (StudentEntity cur : studentList) {
|
|
|
+ studentIdList.add(cur.getId());
|
|
|
+
|
|
|
+ SyncStudentReq req = new SyncStudentReq();
|
|
|
+ req.setEnable(cur.getEnable());
|
|
|
+ req.setId(cur.getId());
|
|
|
+ req.setIdentityNumber(cur.getIdentityNumber());
|
|
|
+ req.setName(cur.getName());
|
|
|
+
|
|
|
+ req.setOrgId(cur.getOrgId());
|
|
|
+ OrgEntity org = GlobalHelper.getEntity(orgRepo, cur.getOrgId(), OrgEntity.class);
|
|
|
+ req.setOrgCode(org.getCode());
|
|
|
+ req.setOrgName(org.getName());
|
|
|
+
|
|
|
+ req.setPhoneNumber(cur.getPhoneNumber());
|
|
|
+ req.setPhotoPath(cur.getPhotoPath());
|
|
|
+ req.setRootOrgId(cur.getRootOrgId());
|
|
|
+ req.setSecurityPhone(cur.getSecurityPhone());
|
|
|
+
|
|
|
+ List<StudentCodeEntity> studentCodeEntityList = studentCodeRepo
|
|
|
+ .findByStudentId(cur.getId());
|
|
|
+
|
|
|
+ List<String> lastStudentCodeList = Lists.newArrayList();
|
|
|
+ for (StudentCodeEntity sc : studentCodeEntityList) {
|
|
|
+ lastStudentCodeList.add(sc.getStudentCode());
|
|
|
+ }
|
|
|
+
|
|
|
+ req.setStudentCodeList(lastStudentCodeList);
|
|
|
+
|
|
|
+ List<String> unboundStudentCodeList = unboundStudentCodeMap.get(cur.getId());
|
|
|
+ req.setUnboundStudentCodeList(unboundStudentCodeList);
|
|
|
+
|
|
|
+ req.setSyncType("update");
|
|
|
+
|
|
|
+ dataSyncCloudService.syncStudent(req);
|
|
|
+ }
|
|
|
+
|
|
|
+ for (Long cur : studentIdList) {
|
|
|
+ studentCache.remove(cur);
|
|
|
+ }
|
|
|
+
|
|
|
+ return studentIdList;
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public void unbindSecurityPhone(Long studentId) {
|
|
|
+
|
|
|
+ StudentEntity s = GlobalHelper.getEntity(studentRepo, studentId, StudentEntity.class);
|
|
|
+ if (null == s) {
|
|
|
+ throw new StatusException("450110", "学生不存在");
|
|
|
+ }
|
|
|
+ s.setSecurityPhone(null);
|
|
|
+ StudentEntity saved = studentRepo.save(s);
|
|
|
+
|
|
|
+ SyncStudentReq req = new SyncStudentReq();
|
|
|
+ req.setEnable(saved.getEnable());
|
|
|
+ req.setId(saved.getId());
|
|
|
+ req.setIdentityNumber(saved.getIdentityNumber());
|
|
|
+ req.setName(saved.getName());
|
|
|
+
|
|
|
+ req.setOrgId(saved.getOrgId());
|
|
|
+ OrgEntity org = GlobalHelper.getEntity(orgRepo, saved.getOrgId(), OrgEntity.class);
|
|
|
+ req.setOrgCode(org.getCode());
|
|
|
+ req.setOrgName(org.getName());
|
|
|
+
|
|
|
+ req.setPhoneNumber(saved.getPhoneNumber());
|
|
|
+ req.setPhotoPath(saved.getPhotoPath());
|
|
|
+ req.setRootOrgId(saved.getRootOrgId());
|
|
|
+ req.setSecurityPhone(saved.getSecurityPhone());
|
|
|
+
|
|
|
+ List<StudentCodeEntity> studentCodeEntityList = studentCodeRepo
|
|
|
+ .findByStudentId(saved.getId());
|
|
|
+ List<String> lastStudentCodeList = Lists.newArrayList();
|
|
|
+ for (StudentCodeEntity sc : studentCodeEntityList) {
|
|
|
+ lastStudentCodeList.add(sc.getStudentCode());
|
|
|
+ }
|
|
|
+ req.setStudentCodeList(lastStudentCodeList);
|
|
|
+
|
|
|
+ req.setSyncType("update");
|
|
|
+
|
|
|
+ dataSyncCloudService.syncStudent(req);
|
|
|
+
|
|
|
+ studentCache.remove(studentId);
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public Boolean hasBeBound(String securityPhone) {
|
|
|
+ StudentEntity s = studentRepo.findBySecurityPhone(securityPhone);
|
|
|
+ return null != s;
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public Map<Long, StudentEntity> getStudentMapsByIds(Set<Long> studentIds) {
|
|
|
+ if (CollectionUtils.isEmpty(studentIds)) {
|
|
|
+ return new HashMap<>();
|
|
|
+ }
|
|
|
+
|
|
|
+ Specification<StudentEntity> spec = (root, query, cb) -> {
|
|
|
+ List<Predicate> predicates = new ArrayList<>();
|
|
|
+ predicates.add(root.get("id").in(studentIds));
|
|
|
+ return cb.and(predicates.toArray(new Predicate[predicates.size()]));
|
|
|
+ };
|
|
|
+
|
|
|
+ List<StudentEntity> entities = studentRepo.findAll(spec);
|
|
|
+ return entities.stream().collect(Collectors.toMap(v -> v.getId(), v -> v, (k, v) -> v));
|
|
|
+ }
|
|
|
|
|
|
}
|