manailin
2021-11-03 c3811d01d1929a98a0f34f70ca187d82ee312dbb
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,11 +54,16 @@
        ComPbServiceTeamDO comPbServiceTeamDO = new ComPbServiceTeamDO();
        BeanUtils.copyProperties(comPbServiceTeamDTO, comPbServiceTeamDO);
        comPbServiceTeamDO.setIsReg(2);
        if (comPbMemberRoleDAO.getSysUserByPhoneCount(comPbServiceTeamDTO.getPhone()) > 0) {
        Long userId = comPbMemberRoleDAO.getSysUserIdByPhone(comPbServiceTeamDTO.getPhone());
        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();