| | |
| | | import com.example.erp.controller.dto.UserDTO; |
| | | import com.example.erp.entity.userInfo.PermissionBasic; |
| | | import com.example.erp.entity.userInfo.Role; |
| | | import com.example.erp.entity.userInfo.SysError; |
| | | import com.example.erp.entity.userInfo.User; |
| | | import com.example.erp.mapper.userInfo.*; |
| | | import com.example.erp.tools.TokenTools; |
| | |
| | | import org.springframework.cache.annotation.Cacheable; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.transaction.interceptor.TransactionAspectSupport; |
| | | |
| | | import java.util.Collections; |
| | | import java.util.HashMap; |
| | |
| | | return returnUser; |
| | | } |
| | | |
| | | @Transactional |
| | | public Boolean updatePassWord(Map<String,Object> object) { |
| | | boolean saveState = false; |
| | | int userId =0; |
| | | String oldPassWord = ""; |
| | | String passWord = ""; |
| | | if (object.get("userId") != null) { |
| | | userId = Integer.parseInt(object.get("userId").toString()); |
| | | } |
| | | if (object.get("oldPassword") != null) { |
| | | oldPassWord = object.get("oldPassword").toString(); |
| | | } |
| | | if (object.get("password") != null) { |
| | | passWord = object.get("password").toString(); |
| | | } |
| | | |
| | | User user =userMapper.findOnePassWord(userId,oldPassWord); |
| | | if (user!=null){ |
| | | if (userMapper.updatePassWordById(userId,passWord)){ |
| | | saveState = true; |
| | | } |
| | | } |
| | | return saveState; |
| | | |
| | | } |
| | | |
| | | /*----------------新版本登陆*/ |
| | | public UserDTO doLogin(UserDTO userDTO) { |
| | | User user = userMapper.selectOne(new QueryWrapper<User>(). |