From 2831568cfe3e53c56fa10ee9652b9efa0d75c880 Mon Sep 17 00:00:00 2001
From: houxiao <houxiao@454eff88-639b-444f-9e54-f578c98de674>
Date: 星期二, 14 三月 2017 18:36:50 +0800
Subject: [PATCH] 添加接口描述 sql

---
 VisitFace/document/erdb api接口描述.txt |   18 ++++++++++++++++--
 1 files changed, 16 insertions(+), 2 deletions(-)

diff --git "a/VisitFace/document/erdb api\346\216\245\345\217\243\346\217\217\350\277\260.txt" "b/VisitFace/document/erdb api\346\216\245\345\217\243\346\217\217\350\277\260.txt"
index 16edc37..310fe51 100644
--- "a/VisitFace/document/erdb api\346\216\245\345\217\243\346\217\217\350\277\260.txt"
+++ "b/VisitFace/document/erdb api\346\216\245\345\217\243\346\217\217\350\277\260.txt"
@@ -241,7 +241,6 @@
 	name : "",
 	companyName : "",
 	// ...
-	imgIdentity : "image base64"
 }
 Response:
 {
@@ -249,17 +248,30 @@
 	personID : 123
 }
 
-2.4. 娉ㄥ唽浜鸿劯
+a) find by name, (IdentityTypeID, identity), phone ... from Person
+b) if Person exists return error
+c) else insert into Person
+d) companyID = (select * from or insert Company where name = "$companyName")
+
+2.4. 娉ㄥ唽璁垮浜鸿劯(visit face register)
 Request:
 {
 	registerCompanyID : 123,
 	personID : 123,
 	imgs : [ "image base64" ] // 瀵瑰簲涓�涓汉鐨勮嫢骞蹭釜浜鸿劯鍥惧儚
+	imgIdentity : "image base64"
 }
 Response:
 {
 	faceIDs : [ 123 ]
 }
+
+a)select exists(*) from person where id="$personID"
+b)if not exists return error
+c)淇濆瓨imgIdentity鍒版枃浠跺瓨鍌紝骞舵彃鍏mage琛�
+d)VisitFace.imagePath = 淇濆瓨imgs鍒版枃浠跺瓨鍌�
+e)璋冪敤浜鸿劯璇嗗埆鏈嶅姟[faceids]=(registerCompanyID, dbid=0, img)
+f)瀵逛簬姣忎竴涓猣aceid锛宨nsert into VisitFace ("$FaceID", $PersonID, "$VisitFace.imagePath")
 
 3. 鏉ヨ鐧昏
 3.1. 鑾峰緱鏉ヨ浜哄憳鍒楄〃
@@ -343,6 +355,8 @@
 Response:
 鎴愬姛/閿欒缁撴灉
 
+insert or update VisitStat
+
 3.5. 鑾峰緱鎷滆浜嬬敱閫夐」鍒楄〃
 Request:
 {

--
Gitblit v1.8.0