| | |
| | | import com.whyc.constant.UserConstant; |
| | | import com.whyc.constant.YamlProperties; |
| | | import com.whyc.dto.Response; |
| | | import com.whyc.mapper.BaoJiGroupUserMapper; |
| | | import com.whyc.mapper.PermitGroupUserMapper; |
| | | import com.whyc.mapper.UserMapper; |
| | | import com.whyc.mapper.UserPermitGroupDataMapper; |
| | | import com.whyc.mapper.*; |
| | | import com.whyc.pojo.*; |
| | | import com.whyc.util.ActionUtil; |
| | | import com.whyc.util.RSAUtil; |
| | |
| | | |
| | | @Resource |
| | | private PermitGroupUserService permitGroupUserService; |
| | | |
| | | @Resource |
| | | private PageParamMapper pageParamMapper; |
| | | |
| | | |
| | | |
| | |
| | | public void updatePasswordsTo3072(List<UserInf> userListWithNewPwd) { |
| | | userMapper.updatePasswordsTo3072(userListWithNewPwd); |
| | | } |
| | | //验证密码的时效性 |
| | | public int checkPasswordValidity(UserInf uinf) { |
| | | int flag=1; |
| | | //获取系统设置的密码时效(57,15) |
| | | QueryWrapper wrapper=new QueryWrapper(); |
| | | wrapper.eq("categoryId",15); |
| | | wrapper.eq("id",57); |
| | | wrapper.last("limit 1"); |
| | | PageParam pageParam=pageParamMapper.selectOne(wrapper); |
| | | if(pageParam!=null){ |
| | | int dayDifference=ActionUtil.daysBetween(uinf.getPasswordUpdateTime(),new Date()); |
| | | if((pageParam.getStatus()>0)&&(dayDifference>pageParam.getStatus())){ |
| | | flag= -1; |
| | | } |
| | | } |
| | | return flag; |
| | | } |
| | | } |