package com.cloud.user.service;
|
|
import com.alibaba.fastjson.JSONArray;
|
import com.alibaba.fastjson.JSONObject;
|
import com.cloud.user.model.*;
|
|
import java.io.UnsupportedEncodingException;
|
import java.util.List;
|
import java.util.Map;
|
import java.util.Set;
|
|
public interface BbPersonToDevService {
|
|
/**
|
* 获取所有 集群名称
|
*
|
* @return
|
*/
|
JSONArray getAllCluListData();
|
/**
|
* 获取集群下所有底库
|
* [{
|
* "cluId": "",
|
* "cluName": "",
|
* "cluIPList": [{
|
* "uuid": "317026e2-6df8-5bac-aea4-166d2ee250fb",
|
* "node_ip": ""
|
* },
|
* {
|
* "uuid": "317026e2-6df8-5bac-aea4-166d2ee250fb",
|
* "node_ip": ""
|
* }
|
* ],
|
* "syncDataBase": [{
|
* "uuid": "e92a005e-fc19-56b5-8a23-53570bc270ae", //表uuid
|
* "tableName": "test", //表名
|
* "tableType": "person", //表类型
|
* "bwType": "1" //黑白名单* }]
|
* }]
|
*
|
* @return
|
*/
|
List<DBaseCluster> getAllCluDataBaseList();
|
/**
|
* 人员添加-----c服务
|
* ip:port/addPersons
|
* {"uuid":"", // tableName的uuid
|
* "personList":[{"personId":"","idcard":"","personPic":"url"},
|
* {"personId":"","idcard":"","personPic":"url"}]}
|
* // 人员添加 id 存在则更新,不存在则 添加
|
*/
|
List<PerInDBStatus> addSyncPersons(List<CServerPerson> persons, List<IpTable> ipInfos);
|
|
/**
|
* 依据personsIds 获取 多人返回数据 需要判断 personIds sizes 不能为 0
|
* @param personIds
|
* @return
|
*/
|
List<CServerPerson> findByPersonIds(List<String> personIds);
|
|
/**
|
* 依据personsIds 获取 多人返回数据 需要判断 personIds sizes 不能为 0
|
* @param personIds
|
* @return
|
*/
|
List<JSONObject> addPersonsToEs(List<String> personIds);
|
/**
|
* 人员查询状态--c服务
|
* 接收:{"personId":""}
|
* 返回:{"result":"true/false",
|
* "data":"exist/notexist","msg":"success/error"}
|
* // result "true" 执行成功 false 失败
|
* // true 时 data 给定 1 exist/0 notexist false -1
|
* // msg 给定判定执行信息
|
*/
|
List<CSerResult> isExists(String personId, List<String> ip) throws UnsupportedEncodingException;
|
|
/**
|
* 人员更新-----c服务
|
* ip:port/updatePersonByOldId
|
* 接收:{"newPerId":"","idcard":"","perPicUrl":"","oldId",""}
|
* 返回:{"result":"true/false",
|
* "data":"exist/notexist","msg":"success/error"}
|
* // 存在则更新,不存在则不执行 返回不存在
|
* // result "true" 执行成功 false 失败
|
* // true 时 data 给定 1 exist/0 notexist false -1
|
* // msg 给定判定执行信息 Map<String,CSerResult> 改为 Map<String,List<CSerResult>>
|
*/
|
Map<String,List<UpdatePerToViewResult>> updateSyncPersons(List<String> personIds, List<String> ips) throws UnsupportedEncodingException;
|
|
/**
|
* 查询待更新人员
|
* @return
|
*/
|
List<MergePersonView> queryUpdatingPerson(String personLike);
|
/**
|
* 查询待更新人员总数
|
* @return
|
*/
|
Integer queryUpdatingPersonCount();
|
/**
|
* 删除更新人员
|
* @return
|
*/
|
Integer deleteMergePersonByPersonId(String personId);
|
/**
|
*
|
*/
|
Integer updatePersonForCluInfo(Set<String> cluInfos, String personId);
|
}
|