From ce4a770744d7a0b4e4ea3b5101556b94e72bdf1c Mon Sep 17 00:00:00 2001 From: lidongdong <1459917685@qq.com> Date: 星期二, 14 十一月 2023 17:49:20 +0800 Subject: [PATCH] 修改打卡 --- springcloud_k8s_panzhihuazhihuishequ/service_partybuilding/src/main/java/com/panzhihua/service_dangjian/service/impl/ComPbServiceTeamServiceImpl.java | 19 ++++++++++++++----- 1 files changed, 14 insertions(+), 5 deletions(-) diff --git a/springcloud_k8s_panzhihuazhihuishequ/service_partybuilding/src/main/java/com/panzhihua/service_dangjian/service/impl/ComPbServiceTeamServiceImpl.java b/springcloud_k8s_panzhihuazhihuishequ/service_partybuilding/src/main/java/com/panzhihua/service_dangjian/service/impl/ComPbServiceTeamServiceImpl.java index 53d4540..84626db 100644 --- a/springcloud_k8s_panzhihuazhihuishequ/service_partybuilding/src/main/java/com/panzhihua/service_dangjian/service/impl/ComPbServiceTeamServiceImpl.java +++ b/springcloud_k8s_panzhihuazhihuishequ/service_partybuilding/src/main/java/com/panzhihua/service_dangjian/service/impl/ComPbServiceTeamServiceImpl.java @@ -1,5 +1,7 @@ package com.panzhihua.service_dangjian.service.impl; +import static java.util.Objects.nonNull; + import java.util.List; import javax.annotation.Resource; @@ -52,12 +54,16 @@ ComPbServiceTeamDO comPbServiceTeamDO = new ComPbServiceTeamDO(); BeanUtils.copyProperties(comPbServiceTeamDTO, comPbServiceTeamDO); comPbServiceTeamDO.setIsReg(2); - SysUserVO sysUser = comPbMemberRoleDAO.getSysUserByPhone(comPbServiceTeamDTO.getPhone()); - if (!ObjectUtils.isEmpty(sysUser)) { + Long userId = comPbMemberRoleDAO.getSysUserIdByPhone(comPbServiceTeamDTO.getPhone(), comPbServiceTeamDTO.getAppid()); + if (nonNull(userId)) { comPbServiceTeamDO.setIsReg(1); } int insert = comPbServiceTeamDAO.insert(comPbServiceTeamDO); if (insert > 0) { + if (nonNull(userId)) { + String userKey = UserConstants.LOGIN_USER_INFO + userId; + stringRedisTemplate.delete(userKey); + } return R.ok(); } return R.fail(); @@ -78,9 +84,9 @@ ComPbServiceTeamDO oldComPbServiceTeam = comPbServiceTeamDAO.selectComPbServiceTeamById(comPbServiceTeamDTO.getId()); String oldphone = oldComPbServiceTeam.getPhone(); - SysUserVO sysUserOld = comPbMemberRoleDAO.getSysUserByPhone(oldphone); + SysUserVO sysUserOld = comPbMemberRoleDAO.getSysUserByPhone(oldphone, comPbServiceTeamDTO.getAppid()); String newphone = comPbServiceTeamDTO.getPhone(); - SysUserVO sysUserNew = comPbMemberRoleDAO.getSysUserByPhone(newphone); + SysUserVO sysUserNew = comPbMemberRoleDAO.getSysUserByPhone(newphone, comPbServiceTeamDTO.getAppid()); if (!ObjectUtils.isEmpty(sysUserOld) || !ObjectUtils.isEmpty(sysUserNew)) { comPbServiceTeamDO.setIsReg(1); } @@ -112,6 +118,9 @@ page.setSize(pageSize); page.setCurrent(pageNum); IPage<ComPbServiceTeamVO> iPage = comPbServiceTeamDAO.PageComPbServiceTeamDTO(page, pageComPbServiceTeamDTO); + if (nonNull(pageComPbServiceTeamDTO.getPropertyId())){ + iPage = comPbServiceTeamDAO.pageServiceTeamProperty(page, pageComPbServiceTeamDTO); + } return R.ok(iPage); } @@ -132,7 +141,7 @@ int delete = comPbServiceTeamDAO.deleteById(comPbServiceTeamDTO.getId()); if (delete > 0) { - SysUserVO sysUserVO = comPbMemberRoleDAO.getSysUserByPhone(comPbServiceTeamDO.getPhone()); + SysUserVO sysUserVO = comPbMemberRoleDAO.getSysUserByPhone(comPbServiceTeamDO.getPhone(), comPbServiceTeamDTO.getAppid()); // 删除用户信息缓存 if (sysUserVO != null) { Long userId = sysUserVO.getUserId(); -- Gitblit v1.7.1