Merge branch 'huacheng' into huacheng_test
| | |
| | | |
| | | @ApiModelProperty("新密码") |
| | | @NotBlank(message = "新密码不能为空") |
| | | @Pattern(message = "密码格式为6-16个字符,英文,数字,且必须包含英文和数字", regexp = "^(?![0-9]+$)(?![a-zA-Z]+$)[0-9A-Za-z]{6,16}$") |
| | | @Pattern(message = "密码强度过低,请将密码长度设置为8-16位,且包含字母、数字、字符。", regexp = "^(?![a-zA-Z]+$)(?![A-Z0-9]+$)(?![A-Z\\W_!@#$%^&*.`~()-+=]+$)(?![a-z0-9]+$)(?![a-z\\W_!@#$%^&.*`~()-+=]+$)(?![0-9\\W_!@#$%^.&*`~()-+=]+$)[a-zA-Z0-9\\W_!@#$%^&.*`~()-+=]{8,16}$") |
| | | private String newPassword; |
| | | |
| | | @ApiModelProperty(hidden = true, value = "当前登录用户id") |
| | |
| | | if(StringUtils.isEmpty(comActAcidRecordDTO.getLocalCity())){ |
| | | comActAcidRecordDTO.setLocalCity(this.getLoginUserInfo().getName()); |
| | | } |
| | | else { |
| | | if(!comActAcidRecordDTO.getLocalCity().contains(",")){ |
| | | comActAcidRecordDTO.setLocalCity(this.getLoginUserInfo().getName()+","+comActAcidRecordDTO.getLocalCity()); |
| | | } |
| | | } |
| | | return this.communityService.selectAllComActAcidRecord(comActAcidRecordDTO); |
| | | } |
| | | |
| | |
| | | |
| | | @Override |
| | | public R listComActVillage(ComMngVillageVO comMngVillageVO) { |
| | | List<ComMngVillageDO> vos = Lists.newArrayList(); |
| | | LambdaQueryWrapper<ComMngVillageDO> param = new QueryWrapper<ComMngVillageDO>().lambda(); |
| | | if(StringUtils.isNotEmpty(comMngVillageVO.getName())){ |
| | | param.like(ComMngVillageDO::getName, comMngVillageVO.getName()); |
| | | if(comMngVillageVO.getCommunityId()!=null){ |
| | | List<ComMngVillageDO> vos = Lists.newArrayList(); |
| | | LambdaQueryWrapper<ComMngVillageDO> param = new QueryWrapper<ComMngVillageDO>().lambda(); |
| | | if(StringUtils.isNotEmpty(comMngVillageVO.getName())){ |
| | | param.like(ComMngVillageDO::getName, comMngVillageVO.getName()); |
| | | } |
| | | if(comMngVillageVO.getCommunityId()!=0){ |
| | | param.eq(ComMngVillageDO::getCommunityId, comMngVillageVO.getCommunityId()); |
| | | } |
| | | List<ComMngVillageDO> comMngVillageDOS = comActVillageDAO.selectList(param); |
| | | BeanUtils.copyProperties(comMngVillageDOS, vos); |
| | | return R.ok(comMngVillageDOS); |
| | | } |
| | | if(comMngVillageVO.getCommunityId()!=0){ |
| | | param.eq(ComMngVillageDO::getCommunityId, comMngVillageVO.getCommunityId()); |
| | | } |
| | | List<ComMngVillageDO> comMngVillageDOS = comActVillageDAO.selectList(param); |
| | | BeanUtils.copyProperties(comMngVillageDOS, vos); |
| | | return R.ok(comMngVillageDOS); |
| | | return R.fail("暂无小区数据"); |
| | | } |
| | | |
| | | @Override |
| | |
| | | @Override |
| | | public R getSysUserVOByPhone(String phone) { |
| | | SysUserDO sysUserDO = userDao |
| | | .selectOne(new QueryWrapper<SysUserDO>().lambda().eq(SysUserDO::getPhone, phone).eq(SysUserDO::getType, 1)); |
| | | .selectOne(new QueryWrapper<SysUserDO>().lambda().eq(SysUserDO::getPhone, phone).eq(SysUserDO::getType, 1).orderByDesc(SysUserDO::getCreateAt).last("limit 1")); |
| | | if (ObjectUtils.isEmpty(sysUserDO)) { |
| | | return R.fail("账号或密码错误"); |
| | | } |
| | |
| | | COUNT(user_id)allUser, |
| | | COUNT(case WHEN DATE_FORMAT(t.create_at,'%m-%d-%Y')=DATE_FORMAT(SYSDATE(),'%m-%d-%Y') then user_id else null end )addUser, |
| | | COUNT(case WHEN DATE_FORMAT(last_login_time,'%m-%d-%Y')=DATE_FORMAT(SYSDATE(),'%m-%d-%Y') then user_id else null end )activeDayUser, |
| | | (SELECT count(user_id) FROM sys_user t left join com_act t1 on t.community_id = t1.community_id WHERE type = 1 AND last_login_time > date_sub(SYSDATE(), INTERVAL 7 DAY))activeWeekUser |
| | | (SELECT count(user_id) FROM sys_user t left join com_act t1 on t.community_id = t1.community_id WHERE t.type = 1 AND last_login_time > date_sub(SYSDATE(), INTERVAL 7 DAY))activeWeekUser |
| | | FROM |
| | | sys_user t LEFT JOIN com_act t1 on t.community_id = t1.community_id |
| | | where t.type=1 and t.community_id is not null |
| | | </select> |
| | | |
| | | <select id="selectCommunityUserOrder" resultType="com.panzhihua.service_user.model.dtos.DataKanbanDTO"> |
| | | select t.* from ( |
| | | SELECT |
| | | a.`name`, |
| | | COUNT(u.user_id)num, |
| | | (SELECT count( user_id ) FROM sys_user WHERE type = 1 and community_id = a.community_id |
| | | AND last_login_time > DATE_FORMAT( date_sub( SYSDATE(), INTERVAL 0 DAY ), '%Y-%m-%d 00:00:00')) as dayNum |
| | | a.`name`, |
| | | COUNT(u.user_id)num, |
| | | t1.dayNum |
| | | FROM |
| | | com_act a |
| | | LEFT JOIN sys_user u ON a.community_id = u.community_id and u.type=1 and a.state=0 |
| | | GROUP BY a.community_id)t ORDER BY t.num desc |
| | | com_act a |
| | | LEFT JOIN sys_user u ON a.community_id = u.community_id and u.type=1 and a.state=0 |
| | | left join (SELECT count( user_id ) dayNum,community_id FROM sys_user WHERE type = 1 |
| | | AND last_login_time > DATE_FORMAT( date_sub( SYSDATE(), INTERVAL 0 DAY ), '%Y-%m-%d 00:00:00') GROUP BY community_id) t1 on a.community_id = t1.community_id GROUP BY a.community_id |
| | | </select> |
| | | |
| | | <select id="selectCommunityUserOrderMonth" resultType="com.panzhihua.service_user.model.dtos.DataKanbanDTO"> |