|
|
@ -24,8 +24,7 @@ import com.huoran.users.entity.req.*; |
|
|
|
import com.huoran.users.entity.res.*; |
|
|
|
import com.huoran.users.entity.res.*; |
|
|
|
import com.huoran.users.entity.vo.CheckVo; |
|
|
|
import com.huoran.users.entity.vo.CheckVo; |
|
|
|
import com.huoran.users.mapper.*; |
|
|
|
import com.huoran.users.mapper.*; |
|
|
|
import com.huoran.users.service.IHrUserAccountService; |
|
|
|
import com.huoran.users.service.*; |
|
|
|
import com.huoran.users.service.PlatformLoginService; |
|
|
|
|
|
|
|
import org.apache.commons.lang3.StringUtils; |
|
|
|
import org.apache.commons.lang3.StringUtils; |
|
|
|
import org.springframework.beans.BeanUtils; |
|
|
|
import org.springframework.beans.BeanUtils; |
|
|
|
import org.springframework.beans.factory.BeanFactory; |
|
|
|
import org.springframework.beans.factory.BeanFactory; |
|
|
@ -59,9 +58,8 @@ public class HrUserAccountServiceImpl extends ServiceImpl<HrUserAccountMapper, H |
|
|
|
|
|
|
|
|
|
|
|
@Autowired |
|
|
|
@Autowired |
|
|
|
private UserAuthenticationInformationMapper userAuthenticationInformationMapper; |
|
|
|
private UserAuthenticationInformationMapper userAuthenticationInformationMapper; |
|
|
|
|
|
|
|
|
|
|
|
@Autowired |
|
|
|
@Autowired |
|
|
|
private EnterpriseCertificationMapper enterpriseCertificationMapper; |
|
|
|
public EnterpriseCertificationService enterpriseCertificationService; |
|
|
|
@Autowired |
|
|
|
@Autowired |
|
|
|
private HrPersonalFileMapper hrPersonalFileMapper; |
|
|
|
private HrPersonalFileMapper hrPersonalFileMapper; |
|
|
|
@Autowired |
|
|
|
@Autowired |
|
|
@ -127,13 +125,24 @@ public class HrUserAccountServiceImpl extends ServiceImpl<HrUserAccountMapper, H |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
@Override |
|
|
|
public int delUserAccounts(List<Integer> ids) { |
|
|
|
public R delUserAccounts(List<String> ids) { |
|
|
|
//删除用户表
|
|
|
|
List<HrUserAccount> accountList = hrUserAccountMapper.selectList(new QueryWrapper<HrUserAccount>().in("app_open_id", ids)); |
|
|
|
boolean i = hrUserInfoMapper.delUserInfos(ids); |
|
|
|
List<Integer> userIds = accountList.stream().map(HrUserAccount::getUserId).collect(Collectors.toList()); |
|
|
|
|
|
|
|
//删除用户信息
|
|
|
|
|
|
|
|
hrUserInfoMapper.deleteBatchIds(userIds); |
|
|
|
//删除账号表
|
|
|
|
//删除账号表
|
|
|
|
boolean n = hrUserAccountMapper.delUserAccounts(ids); |
|
|
|
int delete = hrUserAccountMapper.delete(new QueryWrapper<HrUserAccount>().in("app_open_id", ids)); |
|
|
|
return i & n == true ? 1 : 0; |
|
|
|
//删除平台全部认证信息
|
|
|
|
|
|
|
|
ids.forEach(openId -> { |
|
|
|
|
|
|
|
QueryWrapper<UserAuthenticationInformation> queryWrapper = new QueryWrapper<>(); |
|
|
|
|
|
|
|
queryWrapper.eq("open_id", openId); |
|
|
|
|
|
|
|
userAuthenticationInformationMapper.delete(queryWrapper); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
QueryWrapper<EnterpriseCertification> queryWrapper1 = new QueryWrapper<>(); |
|
|
|
|
|
|
|
queryWrapper1.eq("open_id", openId); |
|
|
|
|
|
|
|
enterpriseCertificationService.remove(queryWrapper1); |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
return delete > 0 ? R.ok("删除成功!") : R.error(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
@Override |
|
|
@ -439,10 +448,10 @@ public class HrUserAccountServiceImpl extends ServiceImpl<HrUserAccountMapper, H |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
@Override |
|
|
|
public R updateAvatars(String openId, String url, String userName) { |
|
|
|
public R updateAvatars(String openId, String url, String userName,String platformId) { |
|
|
|
//查询账号详情
|
|
|
|
//查询账号详情
|
|
|
|
HrUserAccount hrUserAccount = hrUserAccountMapper.selectOne(new QueryWrapper<HrUserAccount>() |
|
|
|
HrUserAccount hrUserAccount = hrUserAccountMapper.selectOne(new QueryWrapper<HrUserAccount>() |
|
|
|
.eq("app_open_id", openId).eq("platform_id", 7)); |
|
|
|
.eq("app_open_id", openId).eq("platform_id", platformId)); |
|
|
|
|
|
|
|
|
|
|
|
//查询用户信息
|
|
|
|
//查询用户信息
|
|
|
|
HrUserInfo hrUserInfo = hrUserInfoMapper.selectByUserId(hrUserAccount.getUserId()); |
|
|
|
HrUserInfo hrUserInfo = hrUserInfoMapper.selectByUserId(hrUserAccount.getUserId()); |
|
|
@ -451,6 +460,8 @@ public class HrUserAccountServiceImpl extends ServiceImpl<HrUserAccountMapper, H |
|
|
|
} |
|
|
|
} |
|
|
|
if (StringUtils.isNotBlank(userName)){ |
|
|
|
if (StringUtils.isNotBlank(userName)){ |
|
|
|
hrUserInfo.setUserName(userName); |
|
|
|
hrUserInfo.setUserName(userName); |
|
|
|
|
|
|
|
hrUserAccount.setAccount(userName); |
|
|
|
|
|
|
|
hrUserAccountMapper.updateById(hrUserAccount); |
|
|
|
} |
|
|
|
} |
|
|
|
int update = hrUserInfoMapper.updateById(hrUserInfo); |
|
|
|
int update = hrUserInfoMapper.updateById(hrUserInfo); |
|
|
|
return update>0 ? R.ok():R.error(); |
|
|
|
return update>0 ? R.ok():R.error(); |
|
|
|