|
@@ -23,6 +23,7 @@ import com.ym.mec.util.date.DateUtil;
|
|
|
import com.ym.mec.web.WebFeignService;
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
+import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
import org.springframework.util.CollectionUtils;
|
|
@@ -698,6 +699,8 @@ public class StudentManageServiceImpl implements StudentManageService {
|
|
|
student.setUpdateTime(date);
|
|
|
student.setCreateTime(date);
|
|
|
student.setUserType("STUDENT");
|
|
|
+ int phoneStrLen = student.getPhone().length();
|
|
|
+ student.setPassword(new BCryptPasswordEncoder().encode("gym" + student.getPhone().substring(phoneStrLen - 4, phoneStrLen)));
|
|
|
teacherDao.addSysUser(student);
|
|
|
// HttpResponseResult<Integer> result = sysUserFeignService.addUser(student);
|
|
|
// student.setId(result.getData());
|