@ -1,19 +1,14 @@
package com.msdw.tms.controller ;
package com.msdw.tms.controller ;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper ;
import com.msdw.tms.api.StudentControllerApi ;
import com.msdw.tms.api.StudentControllerApi ;
import com.msdw.tms.common.utils.Constant ;
import com.msdw.tms.common.utils.ConstantUtils ;
import com.msdw.tms.common.utils.ConstantUtils ;
import com.msdw.tms.common.utils.PageUtils ;
import com.msdw.tms.common.utils.PageUtils ;
import com.msdw.tms.common.utils.R ;
import com.msdw.tms.common.utils.R ;
import com.msdw.tms.entity.StudentEntity ;
import com.msdw.tms.entity.UserInfoEntity ;
import com.msdw.tms.entity.UserInfoEntity ;
import com.msdw.tms.entity.vo.StudentVo ;
import com.msdw.tms.entity.vo.StudentVo ;
import com.msdw.tms.service.StudentService ;
import com.msdw.tms.service.StudentService ;
import com.msdw.tms.service.UserInfoService ;
import com.msdw.tms.service.UserInfoService ;
import com.sun.xml.bind.v2.model.core.ID ;
import org.springframework.beans.factory.annotation.Autowired ;
import org.springframework.beans.factory.annotation.Autowired ;
import org.springframework.data.redis.core.ValueOperations ;
import org.springframework.transaction.annotation.Transactional ;
import org.springframework.transaction.annotation.Transactional ;
import org.springframework.web.bind.annotation.* ;
import org.springframework.web.bind.annotation.* ;
import org.springframework.web.multipart.MultipartFile ;
import org.springframework.web.multipart.MultipartFile ;
@ -21,11 +16,8 @@ import org.springframework.web.multipart.MultipartFile;
import javax.servlet.http.HttpServletResponse ;
import javax.servlet.http.HttpServletResponse ;
import javax.validation.Valid ;
import javax.validation.Valid ;
import java.io.IOException ;
import java.io.IOException ;
import java.util.HashMap ;
import java.util.List ;
import java.util.List ;
import java.util.Map ;
import java.util.Map ;
import java.util.UUID ;
import java.util.concurrent.TimeUnit ;
/ * *
/ * *
* 学生管理
* 学生管理
@ -51,9 +43,8 @@ public class StudentController implements StudentControllerApi{
studentVo . setSchoolId ( ConstantUtils . Keda_schoolId ) ;
studentVo . setSchoolId ( ConstantUtils . Keda_schoolId ) ;
String account = studentVo . getAccount ( ) ;
String account = studentVo . getAccount ( ) ;
String phone = studentVo . getPhone ( ) ;
String phone = studentVo . getPhone ( ) ;
Integer schoolId = studentVo . getSchoolId ( ) ;
Integer result = studentService . queryStudentIdNumber ( studentVo . getWorkNumber ( ) , ConstantUtils . Keda_schoolId ) ;
Integer result = studentService . queryStudentIdNumber ( studentVo . getWorkNumber ( ) , schoolId ) ;
Integer res = userInfoService . queryStudentAccount ( account , ConstantUtils . Keda_schoolId ) ;
Integer res = userInfoService . queryStudentAccount ( account , schoolId ) ;
if ( phone ! = null & & phone ! = "" ) {
if ( phone ! = null & & phone ! = "" ) {
Integer outcome = userInfoService . queryStudentPhone ( phone ) ;
Integer outcome = userInfoService . queryStudentPhone ( phone ) ;
if ( outcome = = 1 ) {
if ( outcome = = 1 ) {
@ -72,7 +63,7 @@ public class StudentController implements StudentControllerApi{
userInfoList . setAccount ( account )
userInfoList . setAccount ( account )
. setPhone ( phone )
. setPhone ( phone )
. setEmail ( studentVo . getEmail ( ) )
. setEmail ( studentVo . getEmail ( ) )
. setSchoolId ( studentVo . getSchoolAppellationId ( ) )
. setSchoolId ( ConstantUtils . Keda_schoolId )
. setUserName ( studentVo . getUserName ( ) )
. setUserName ( studentVo . getUserName ( ) )
. setToken ( new ConstantUtils ( ) . token ) ;
. setToken ( new ConstantUtils ( ) . token ) ;
userInfoService . saveUserInfo ( userInfoList ) ;
userInfoService . saveUserInfo ( userInfoList ) ;