yonge il y a 5 ans
Parent
commit
4359ceeac1

+ 0 - 6
mec-biz/pom.xml

@@ -34,11 +34,5 @@
 			<groupId>com.ym</groupId>
 			<artifactId>mec-thirdparty</artifactId>
 		</dependency>
-        <dependency>
-            <groupId>com.ym</groupId>
-            <artifactId>mec-auth-server</artifactId>
-            <version>1.0</version>
-            <scope>compile</scope>
-        </dependency>
     </dependencies>
 </project>

+ 16 - 12
mec-biz/src/main/java/com/ym/mec/biz/service/impl/StudentRegistrationServiceImpl.java

@@ -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);