更新子账号名称

This commit is contained in:
guoshengxiong 2024-07-22 17:02:53 +08:00
parent 3b2975bafe
commit 3bfa5e81c3
5 changed files with 34 additions and 1 deletions

View File

@ -240,4 +240,11 @@ public interface SystemUserMapper extends BaseMapper<SystemUser> {
* @return
*/
SystemUser queryById(@Param("param") Map<String, Object> map);
/**
* 更新子账号名称
* @param workerId
* @param workerName
*/
void updateRealNameFromWorker(@Param("workerId") Long workerId, @Param("workerName") String workerName);
}

View File

@ -317,4 +317,8 @@
</include>
</where>
</select>
<update id="updateRealNameFromWorker">
update system_user set real_name=#{workerName} where worker_id = #{workerId}
</update>
</mapper>

View File

@ -346,5 +346,21 @@ public interface ISystemUserService extends IService<SystemUser> {
* @param userId
* @return
*/
String getFrameUserName(Long userId);
String getFrameUserNames(String userIds);
/**
* 根据用户ids获取用户名称s
*
* @param userIds
* @return
*/
String getUserNamesByUserIds(List<String> userIds);
/**
* 更新子账号名称
*
* @param workerId
* @param workerName
*/
void updateRealNameFromWorker(Long workerId, String workerName);
}

View File

@ -1784,4 +1784,9 @@ public class SystemUserServiceImpl extends ServiceImpl<SystemUserMapper, SystemU
public List<SystemUser> getUsersByRegionId(Long id) {
return baseMapper.getUsersByRegionId(id);
}
@Override
public void updateRealNameFromWorker(Long workerId, String workerName) {
baseMapper.updateRealNameFromWorker(workerId, workerName);
}
}

View File

@ -534,6 +534,7 @@ public class WorkerInfoServiceImpl extends ServiceImpl<WorkerInfoMapper, WorkerI
workerInfo.setSafeScore(oldWorkerInfo.getExitSafeScore());
}
workerInfoMapper.updateById(workerInfo);
systemUserService.updateRealNameFromWorker(workerInfo.getId(), workerInfo.getWorkerName());
boolean hikvisionConfig = projectUfaceConfigService.isHikvisionConfig(workerInfo.getProjectSn());
if (hikvisionConfig) {
//同步海康