liuxiaolong
2019-05-06 f99bc8c6a1d10610373738edd7d0aa0181c81d99
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
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);
}