| | |
| | | import com.panzhihua.common.model.dtos.user.PageUserAppletsBackstageDTO; |
| | | import com.panzhihua.common.model.dtos.user.SysUserFeedbackDTO; |
| | | import com.panzhihua.common.model.vos.*; |
| | | import com.panzhihua.common.model.vos.community.ComActVO; |
| | | import com.panzhihua.common.model.vos.community.ComMngVolunteerMngVO; |
| | | import com.panzhihua.common.model.vos.partybuilding.ActivityManagerVO; |
| | | import com.panzhihua.common.model.vos.user.*; |
| | |
| | | comMngFamilyInfoVOS.add(comMngFamilyInfoVO); |
| | | }); |
| | | loginUserInfoVO.setComMngFamilyInfoVOS(comMngFamilyInfoVOS); |
| | | } |
| | | ComActVO comActVO=userDao.selectCommunity(loginUserInfoVO.getCommunityId()); |
| | | if (!ObjectUtils.isEmpty(comActVO)) { |
| | | loginUserInfoVO.setCommunityName(comActVO.getName()); |
| | | } |
| | | return R.ok(loginUserInfoVO); |
| | | } |
| | |
| | | List<SysUserNoticeVO> sysUserNoticeVOList=new ArrayList<>(); |
| | | List<SysUserNoticeDO> sysUserNoticeDOS = sysUserNoticeDAO.selectList(new QueryWrapper<SysUserNoticeDO>().lambda().eq(SysUserNoticeDO::getUserId, userId).orderByDesc(SysUserNoticeDO::getCreateAt)); |
| | | if (!ObjectUtils.isEmpty(sysUserNoticeDOS)) { |
| | | List<Integer> typeList=new ArrayList<>(4); |
| | | sysUserNoticeDOS.forEach(sysUserNoticeDO -> { |
| | | SysUserNoticeVO sysUserNoticeVO=new SysUserNoticeVO(); |
| | | BeanUtils.copyProperties(sysUserNoticeDO,sysUserNoticeVO); |
| | | sysUserNoticeVOList.add(sysUserNoticeVO); |
| | | Integer type = sysUserNoticeDO.getType(); |
| | | if (!typeList.contains(type)) { |
| | | SysUserNoticeVO sysUserNoticeVO=new SysUserNoticeVO(); |
| | | BeanUtils.copyProperties(sysUserNoticeDO,sysUserNoticeVO); |
| | | sysUserNoticeVOList.add(sysUserNoticeVO); |
| | | typeList.add(type); |
| | | } |
| | | }); |
| | | } |
| | | noticeUnReadVO.setSysUserNoticeVOList(sysUserNoticeVOList); |
| | |
| | | return R.ok(sysUserAgreementVO); |
| | | } |
| | | |
| | | /** |
| | | * 维护用户最后登录时间 |
| | | * |
| | | * @param userId 用户主键 |
| | | * @return 维护结果 |
| | | */ |
| | | @Override |
| | | public R putUserLastLoginTime(Long userId) { |
| | | SysUserDO sysUserDO=new SysUserDO(); |
| | | sysUserDO.setUserId(userId); |
| | | sysUserDO.setLastLoginTime(new Date()); |
| | | int update = userDao.updateById(sysUserDO); |
| | | if (update>0) { |
| | | return R.ok(); |
| | | } |
| | | return R.fail(); |
| | | } |
| | | |
| | | |
| | | public static void main(String[] args) { |
| | | String encode = new BCryptPasswordEncoder().encode("admin123456"); |
| | | String encode = new BCryptPasswordEncoder().encode("lbsq123456"); |
| | | System.out.println(encode); |
| | | |
| | | |
| | | |
| | | BCryptPasswordEncoder encoder = new BCryptPasswordEncoder(); |
| | | boolean matches = encoder.matches("admin1234567", encode); |
| | | System.out.println(matches); |
| | | // BCryptPasswordEncoder encoder = new BCryptPasswordEncoder(); |
| | | // boolean matches = encoder.matches("admin1234567", encode); |
| | | // System.out.println(matches); |
| | | } |
| | | } |