You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
39 lines
1.1 KiB
Java
39 lines
1.1 KiB
Java
|
2 years ago
|
package com.sztzjy.linkCommerce.service.impl;
|
||
|
|
|
||
|
|
import com.sztzjy.linkCommerce.entity.Userinfo;
|
||
|
|
import com.sztzjy.linkCommerce.entity.UserinfoExample;
|
||
|
|
import com.sztzjy.linkCommerce.mapper.*;
|
||
|
|
|
||
|
|
import com.sztzjy.linkCommerce.service.UserInfoService;
|
||
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
||
|
|
import org.springframework.stereotype.Service;
|
||
|
|
|
||
|
|
import java.util.List;
|
||
|
|
|
||
|
|
|
||
|
|
@Service
|
||
|
|
public class UserInfoServiceImpl implements UserInfoService {
|
||
|
|
@Autowired
|
||
|
|
UserinfoMapper userInfoMapper;
|
||
|
|
@Autowired
|
||
|
|
SchoolMapper schoolMapper;
|
||
|
|
@Autowired
|
||
|
|
SchoolFacultyMapper schoolFacultyMapper;
|
||
|
|
@Autowired
|
||
|
|
SchoolMajorMapper schoolMajorMapper;
|
||
|
|
@Autowired
|
||
|
|
SchoolClassMapper schoolClassMapper;
|
||
|
|
|
||
|
|
@Override
|
||
|
|
public boolean existsByUserName(String userName) {
|
||
|
|
UserinfoExample userInfoExample = new UserinfoExample();
|
||
|
|
userInfoExample.createCriteria().andUsernameEqualTo(userName);
|
||
|
|
List<Userinfo> userInfos = userInfoMapper.selectByExample(userInfoExample);
|
||
|
|
if(userInfos.isEmpty() || userInfos==null){
|
||
|
|
return false;
|
||
|
|
}else {
|
||
|
|
return true;
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|