Search in sources :

Example 1 with SysUserExample

use of com.megagao.production.ssm.domain.authority.SysUserExample in project production_ssm by megagao.

the class UserServiceImpl method searchSysUserBySysUserName.

@Override
public List<SysUser> searchSysUserBySysUserName(String sysUserName) throws Exception {
    SysUserExample example = new SysUserExample();
    SysUserExample.Criteria criteria = example.createCriteria();
    criteria.andUsernameLike(sysUserName);
    return sysUserMapper.selectByExample(example);
}
Also used : SysUserExample(com.megagao.production.ssm.domain.authority.SysUserExample)

Example 2 with SysUserExample

use of com.megagao.production.ssm.domain.authority.SysUserExample in project production_ssm by megagao.

the class SysServiceImpl method getSysUserByName.

@Override
public SysUser getSysUserByName(String username) throws Exception {
    SysUserExample sysUserExample = new SysUserExample();
    SysUserExample.Criteria criteria = sysUserExample.createCriteria();
    criteria.andUsernameEqualTo(username);
    List<SysUser> list = sysUserMapper.selectByExample(sysUserExample);
    if (list != null && list.size() == 1) {
        return list.get(0);
    }
    return null;
}
Also used : SysUser(com.megagao.production.ssm.domain.authority.SysUser) SysUserExample(com.megagao.production.ssm.domain.authority.SysUserExample)

Example 3 with SysUserExample

use of com.megagao.production.ssm.domain.authority.SysUserExample in project production_ssm by megagao.

the class UserServiceImpl method findByUserNameAndId.

@Override
public List<SysUser> findByUserNameAndId(String username, String id) throws Exception {
    SysUserExample example = new SysUserExample();
    SysUserExample.Criteria criteria = example.createCriteria();
    criteria.andUsernameEqualTo(username);
    if (id != null) {
        criteria.andIdNotEqualTo(id);
    }
    List<SysUser> sysUserList = sysUserMapper.selectByExample(example);
    return sysUserList;
}
Also used : SysUser(com.megagao.production.ssm.domain.authority.SysUser) SysUserExample(com.megagao.production.ssm.domain.authority.SysUserExample)

Example 4 with SysUserExample

use of com.megagao.production.ssm.domain.authority.SysUserExample in project production_ssm by megagao.

the class UserServiceImpl method searchSysUserBySysUserId.

@Override
public List<SysUser> searchSysUserBySysUserId(String sysUserId) throws Exception {
    SysUserExample example = new SysUserExample();
    SysUserExample.Criteria criteria = example.createCriteria();
    criteria.andIdLike(sysUserId);
    return sysUserMapper.selectByExample(example);
}
Also used : SysUserExample(com.megagao.production.ssm.domain.authority.SysUserExample)

Aggregations

SysUserExample (com.megagao.production.ssm.domain.authority.SysUserExample)4 SysUser (com.megagao.production.ssm.domain.authority.SysUser)2