添加企业和岗位同步365联系方式
This commit is contained in:
@@ -39,4 +39,9 @@ public class JobCron {
|
|||||||
public void updateJobContactEncrypt(){SpringUtils.getBean(JobContactService.class).updateJobContactEncrypt();}
|
public void updateJobContactEncrypt(){SpringUtils.getBean(JobContactService.class).updateJobContactEncrypt();}
|
||||||
//批量更新sys系统用户身份证和手机号
|
//批量更新sys系统用户身份证和手机号
|
||||||
public void updateSysUserEncrypt(){SpringUtils.getBean(IAppUserService.class).updateSysUserEncrypt();}
|
public void updateSysUserEncrypt(){SpringUtils.getBean(IAppUserService.class).updateSysUserEncrypt();}
|
||||||
|
|
||||||
|
//批量更新企业联系人
|
||||||
|
public void updateCronCompanyContactEncrypt(){SpringUtils.getBean(CompanyContactService.class).updateCronCompanyContactEncrypt();}
|
||||||
|
//批量更新岗位联系人
|
||||||
|
public void updateCronJobContactEncrypt(){SpringUtils.getBean(JobContactService.class).updateCronJobContactEncrypt();}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -19,4 +19,6 @@ public interface CompanyContactMapper extends BaseMapper<CompanyContact> {
|
|||||||
int batchInsert(List<CompanyContact> list);
|
int batchInsert(List<CompanyContact> list);
|
||||||
|
|
||||||
int batchUpdate(List<CompanyContact> list);
|
int batchUpdate(List<CompanyContact> list);
|
||||||
|
|
||||||
|
List<CompanyContact> getCronSelectList(CompanyContact companyContact);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -22,4 +22,6 @@ public interface JobContactMapper extends BaseMapper<JobContact> {
|
|||||||
List<JobContact> selectByJobIds(@Param("jobIds") List<Long> longs);
|
List<JobContact> selectByJobIds(@Param("jobIds") List<Long> longs);
|
||||||
|
|
||||||
void batchUpdateEncrypt(List<JobContact> list);
|
void batchUpdateEncrypt(List<JobContact> list);
|
||||||
|
|
||||||
|
List<JobContact> getCronSelectList(JobContact jobContact);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -20,5 +20,7 @@ public interface CompanyContactService {
|
|||||||
int insertContact(CompanyContact contact);
|
int insertContact(CompanyContact contact);
|
||||||
|
|
||||||
void updateCompanyContactEncrypt();
|
void updateCompanyContactEncrypt();
|
||||||
|
|
||||||
|
void updateCronCompanyContactEncrypt();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -18,5 +18,7 @@ public interface JobContactService{
|
|||||||
int batchInsert(List<JobContact> list);
|
int batchInsert(List<JobContact> list);
|
||||||
|
|
||||||
void updateJobContactEncrypt();
|
void updateJobContactEncrypt();
|
||||||
|
|
||||||
|
void updateCronJobContactEncrypt();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -60,4 +60,16 @@ public class CompanyContactServiceImpl extends ServiceImpl<CompanyContactMapper,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Transactional(rollbackFor = Exception.class)
|
||||||
|
public void updateCronCompanyContactEncrypt(){
|
||||||
|
List<CompanyContact> list=companyContactMapper.getCronSelectList(new CompanyContact());
|
||||||
|
List<CompanyContact> encryptList=list.stream().peek(QuickValidUtils::saveCompanyContactPhoneSm4).collect(Collectors.toList());
|
||||||
|
if(!encryptList.isEmpty()){
|
||||||
|
List<List<CompanyContact>> batches = StringUtil.splitList(encryptList, StringUtil.BATCH_SIZE);
|
||||||
|
for (List<CompanyContact> batch : batches) {
|
||||||
|
companyContactMapper.batchUpdate(batch);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -40,4 +40,16 @@ public class JobContactServiceImpl extends ServiceImpl<JobContactMapper, JobCont
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Transactional(rollbackFor = Exception.class)
|
||||||
|
public void updateCronJobContactEncrypt(){
|
||||||
|
List<JobContact> list=jobContactMapper.getCronSelectList(new JobContact());
|
||||||
|
List<JobContact> encryptList=list.stream().peek(QuickValidUtils::savePhoneSm4).collect(Collectors.toList());
|
||||||
|
if(!encryptList.isEmpty()){
|
||||||
|
List<List<JobContact>> batches = StringUtil.splitList(encryptList, StringUtil.BATCH_SIZE);
|
||||||
|
for (List<JobContact> batch : batches) {
|
||||||
|
jobContactMapper.batchUpdateEncrypt(batch);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -103,4 +103,11 @@
|
|||||||
</foreach>
|
</foreach>
|
||||||
</update>
|
</update>
|
||||||
|
|
||||||
|
<select id="getCronSelectList" resultMap="CompanyContactResult" parameterType="CompanyContact">
|
||||||
|
<include refid="selectCompanyContactVo"/>
|
||||||
|
<where> del_flag = '0' and nullif(contact_Person_Phone, '') is not null
|
||||||
|
and contact_Person_Phone_Encrypt is null
|
||||||
|
</where>
|
||||||
|
</select>
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|||||||
@@ -100,4 +100,11 @@
|
|||||||
</foreach>
|
</foreach>
|
||||||
</update>
|
</update>
|
||||||
|
|
||||||
|
<select id="getCronSelectList" resultMap="jobContactResult" parameterType="JobContact">
|
||||||
|
<include refid="JobContactVo"/>
|
||||||
|
<where> del_flag = '0' and nullif(contact_Person_Phone, '') is not null
|
||||||
|
and contact_Person_Phone_Encrypt is null
|
||||||
|
</where>
|
||||||
|
</select>
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|||||||
Reference in New Issue
Block a user