|
@@ -1,10 +1,21 @@
|
|
|
package com.ym.mec.biz.service.impl;
|
|
|
|
|
|
+import java.util.ArrayList;
|
|
|
+import java.util.Date;
|
|
|
+import java.util.HashMap;
|
|
|
+import java.util.List;
|
|
|
+import java.util.Map;
|
|
|
+
|
|
|
+import javax.annotation.Resource;
|
|
|
+
|
|
|
+import org.springframework.beans.factory.annotation.Autowired;
|
|
|
+import org.springframework.stereotype.Service;
|
|
|
+import org.springframework.transaction.annotation.Transactional;
|
|
|
+
|
|
|
+import com.ym.mec.auth.api.client.SysUserFeignService;
|
|
|
import com.ym.mec.auth.api.entity.SysUser;
|
|
|
import com.ym.mec.auth.api.enums.SysUserType;
|
|
|
import com.ym.mec.auth.api.enums.UserLockFlag;
|
|
|
-import com.ym.mec.auth.service.SysUserService;
|
|
|
-import com.ym.mec.biz.dal.dao.StudentRechargeDao;
|
|
|
import com.ym.mec.biz.dal.dao.StudentRegistrationDao;
|
|
|
import com.ym.mec.biz.dal.dto.StudentApplyDetailDto;
|
|
|
import com.ym.mec.biz.dal.dto.StudentFeeDto;
|
|
@@ -17,20 +28,13 @@ import com.ym.mec.common.page.PageInfo;
|
|
|
import com.ym.mec.common.service.impl.BaseServiceImpl;
|
|
|
import com.ym.mec.util.collection.MapUtil;
|
|
|
|
|
|
-import org.springframework.beans.factory.annotation.Autowired;
|
|
|
-import org.springframework.stereotype.Service;
|
|
|
-import org.springframework.transaction.annotation.Transactional;
|
|
|
-
|
|
|
-import javax.annotation.Resource;
|
|
|
-import java.util.*;
|
|
|
-
|
|
|
@Service
|
|
|
public class StudentRegistrationServiceImpl extends BaseServiceImpl<Long, StudentRegistration> implements StudentRegistrationService {
|
|
|
|
|
|
@Resource
|
|
|
private StudentRegistrationDao studentRegistrationDao;
|
|
|
@Autowired
|
|
|
- private SysUserService sysUserService;
|
|
|
+ private SysUserFeignService sysUserFeignService;
|
|
|
|
|
|
@Override
|
|
|
public BaseDAO<Long, StudentRegistration> getDAO() {
|
|
@@ -98,7 +102,7 @@ public class StudentRegistrationServiceImpl extends BaseServiceImpl<Long, Studen
|
|
|
@Transactional(rollbackFor = Exception.class)
|
|
|
public StudentRegistration addStudent(StudentRegistration studentRegistration) {
|
|
|
Date date = new Date();
|
|
|
- SysUser sysUser = sysUserService.queryByPhone(studentRegistration.getParentsPhone());
|
|
|
+ SysUser sysUser = sysUserFeignService.getUserByMobile(studentRegistration.getParentsPhone());
|
|
|
if (sysUser == null) {
|
|
|
sysUser = new SysUser();
|
|
|
sysUser.setPhone(studentRegistration.getParentsPhone());
|
|
@@ -111,7 +115,7 @@ public class StudentRegistrationServiceImpl extends BaseServiceImpl<Long, Studen
|
|
|
sysUser.setOrganId(studentRegistration.getOrganId());
|
|
|
sysUser.setRealName(studentRegistration.getName());
|
|
|
sysUser.setIdCardNo(studentRegistration.getIdCardNo());
|
|
|
- sysUserService.add(sysUser);
|
|
|
+ sysUserFeignService.addUser(sysUser);
|
|
|
}
|
|
|
studentRegistration.setUserId(sysUser.getId());
|
|
|
studentRegistrationDao.insert(studentRegistration);
|