| | |
| | | AjaxResult ajax = success(); |
| | | SysUser user = UserHoder.getLoginUser().getUser(); |
| | | if (null != user.getUserId()) { |
| | | if (secretKeyLogin) |
| | | { |
| | | if (secretKeyLogin) { |
| | | if(null !=user.getDeptId()){ |
| | | if(!SecurityUtils.isAdmin(user.getUserId())){ |
| | | SysDept sysDept = deptService.getById(user.getDeptId()); |
| | | if (null != sysDept) { |
| | | DictHosp dictHosp = hospService.getById(sysDept.getHospId()); |
| | | if (null != dictHosp) { |
| | | user.setHospName(dictHosp.getHospAreaName()); |
| | | user.setHospId(dictHosp.getHospAreaId()); |
| | | } |
| | | if (!SecurityUtils.isAdmin(user.getUserId())) { |
| | | if(null !=dictHosp && dictHosp.getSecretKey() !=null && dictHosp.getExpirationTime() !=null){ |
| | | if (!SecurityUtils.matchesMallMerchantSecretKey(secret,dictHosp.getHospAreaId(),dictHosp.getHospAreaName(), |
| | | dictHosp.getExpirationTime(),dictHosp.getSecretKey())) { |
| | | |
| | | String userIdKey = Constants.LOGIN_USERID_KEY + user.getUserId(); |
| | | String userKey = redisCache.getCacheObject(userIdKey); |
| | | if (org.apache.commons.lang3.StringUtils.isNotEmpty(userKey)) |
| | | { |
| | | if (org.apache.commons.lang3.StringUtils.isNotEmpty(userKey)) { |
| | | redisCache.deleteObject(userIdKey); |
| | | redisCache.deleteObject(userKey); |
| | | } |