From 9b16fecd94fa5248eba825d81050c7de8eca77e3 Mon Sep 17 00:00:00 2001
From: liuxiaolong <736321739@qq.com>
Date: 星期五, 28 二月 2020 18:59:58 +0800
Subject: [PATCH] add page and size

---
 dbpersonApi.go |   40 +++++++++++++++++++++++++++++++++++++++-
 1 files changed, 39 insertions(+), 1 deletions(-)

diff --git a/dbpersonApi.go b/dbpersonApi.go
index ec8359a..84256f5 100644
--- a/dbpersonApi.go
+++ b/dbpersonApi.go
@@ -236,7 +236,7 @@
 }
 
 func (api DbPersonApi) JoinDbTable (tableIds  []string,faceFeature string, personPicUrl string) (bool,interface{}) {
-	url := api.getBasicUrl() + DATA_URL_PREFIX + "/dbperson/findLikePersonIds"
+	url := api.getBasicUrl() + DATA_URL_PREFIX + "/dbperson/joinDbTable"
 	client := NewClient()
 	paramBody := map[string]interface{}{
 		"tableIds": tableIds,
@@ -253,4 +253,42 @@
 		return false,nil
 	}
 	return res.Success,res.Data
+}
+
+func (api DbPersonApi) Move (personId string,tableIds []string) (bool,interface{}) {
+	url := api.getBasicUrl() + DATA_URL_PREFIX + "/dbperson/move"
+	client := NewClient()
+	paramBody := map[string]interface{}{
+		"personId": personId,
+		"tableIds": tableIds,
+	}
+	body,err := client.DoPostRequest(url,CONTENT_TYPE_JSON, paramBody,nil,nil)
+	if err != nil {
+		return false,nil
+	}
+
+	var res Result
+	if err = json.Unmarshal(body, &res); err != nil {
+		return false,nil
+	}
+	return res.Success,res.Data
+}
+
+func (api DbPersonApi) Copy (personId string,tableIds []string) (bool,interface{}) {
+	url := api.getBasicUrl() + DATA_URL_PREFIX + "/dbperson/copy"
+	client := NewClient()
+	paramBody := map[string]interface{}{
+		"personId": personId,
+		"tableIds": tableIds,
+	}
+	body,err := client.DoPostRequest(url,CONTENT_TYPE_JSON, paramBody,nil,nil)
+	if err != nil {
+		return false,nil
+	}
+
+	var res Result
+	if err = json.Unmarshal(body, &res); err != nil {
+		return false,nil
+	}
+	return res.Success,res.Data
 }
\ No newline at end of file

--
Gitblit v1.8.0