deduplication.api 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. syntax = "v1"
  2. info(
  3. title: // TODO: add title
  4. desc: // TODO: add description
  5. author: "fuwencai"
  6. email: "fuwencai@topnet.net.cn"
  7. )
  8. type (
  9. Info {
  10. TotalCount int64 `json:"totalCount"` // 本次查询info_id总量
  11. ExistCount int64 `json:"existCount"` // 已存在的info_id的数量
  12. NewCount int64 `json:"newCount"` // 不存在的info_id的数量
  13. }
  14. DedupReq {
  15. PersonId string `form:"personId"` //人员id
  16. InfoId string `form:"infoId"` //信息id 逗号分隔
  17. EntId string `form:"entId"` // 企业id
  18. IsInsert bool `form:"isInsert"` // 是否插入不重复的数据
  19. IsEnt bool `form:"isEnt"` //是否按企业id判重
  20. }
  21. DedupResp {
  22. Code int64 `json:"code"`
  23. Msg string `json:"msg"`
  24. Data Info `json:"data"`
  25. }
  26. // 根据账户id判重
  27. DedupByAccountReq {
  28. PersonId string `form:"personId"` //人员id
  29. InfoId string `form:"infoId"` //信息id 逗号分隔
  30. AccountId string `form:"accountId"` // 账户id
  31. DataDesc int64 `form:"dataDesc"` // 字段包规格 1-高级字段包 2-标准字段包
  32. }
  33. )
  34. type (
  35. EntCountReq {
  36. EntId string `form:"entId"` // 企业id
  37. }
  38. EntCountResp {
  39. Code int64 `json:"code"`
  40. Msg string `json:"msg"`
  41. Data int64 `json:"data"`
  42. }
  43. )
  44. service deduplication-api {
  45. @handler Datadeduplication // 调用数据去重
  46. post /data/deduplication (DedupReq) returns (DedupResp)
  47. @handler GetEntCount // 调用数据去重
  48. post /data/getEntCount (EntCountReq) returns (EntCountResp)
  49. @handler dedupByAcount // 根据账户id判重
  50. post /data/dedupByAcount/:id (DedupByAccountReq) returns (DedupResp)
  51. @handler dedupAndSave // 根据账户id判重并存入数据
  52. post /data/dedupAndSave/:id (DedupByAccountReq) returns (DedupResp)
  53. }