组织查询修改登录修改
parent
6f853e4653
commit
d200813e58
|
|
@ -3,13 +3,16 @@ package com.whdc.service.impl;
|
|||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.whdc.exception.MyException;
|
||||
import com.whdc.mapper.AddressBookMapper;
|
||||
import com.whdc.mapper.UserMapper;
|
||||
import com.whdc.model.dto.LoginDto;
|
||||
import com.whdc.model.entity.AddressBook;
|
||||
import com.whdc.model.entity.User;
|
||||
import com.whdc.model.vo.LoginVo;
|
||||
import com.whdc.service.IUserService;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.util.DigestUtils;
|
||||
|
||||
|
|
@ -30,6 +33,9 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements IU
|
|||
|
||||
public static final String DEFAULT_PASSWORD = "Fxkh@123456";
|
||||
|
||||
@Autowired
|
||||
private AddressBookMapper addressBookMapper;
|
||||
|
||||
@Override
|
||||
public IPage<User> page(User dto) {
|
||||
return baseMapper.page(new Page<>(), dto);
|
||||
|
|
@ -55,6 +61,9 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements IU
|
|||
if (getPassword(sysUser.getSalt() ,dto.getPassword()).equals(sysUser.getPassword())) {
|
||||
LoginVo out = new LoginVo();
|
||||
BeanUtils.copyProperties(sysUser, out);
|
||||
|
||||
AddressBook book = addressBookMapper.selectById(sysUser.getAbId());
|
||||
out.setName(book.getName());
|
||||
return out;
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@
|
|||
F.SORT FSORT
|
||||
FROM
|
||||
UNIT_DICT UD
|
||||
LEFT JOIN FC F ON F.AB_ID = O.ID
|
||||
LEFT JOIN FC F ON F.AB_ID = UD.O_ID
|
||||
<where>
|
||||
<if test="userId != null and userId != ''">
|
||||
F.USER_ID = #{userId}
|
||||
|
|
|
|||
Loading…
Reference in New Issue