示例#1
0
        /// <summary>
        /// 删除人脸
        /// </summary>
        /// <param name="reqData"></param>
        /// <returns></returns>
        public XAIResDeleteFace DeleteFace(XAIReqDeleteFace reqData)
        {
            LogModule.Info("XAI->BIDU:DeleteFace--->入参:" + reqData.ToJson());
            string resJson;

            try
            {
                resJson = client.FaceDelete(reqData.GroupId, reqData.UserId, reqData.FaceToken).ToJson();
            }
            catch (Exception ex)
            {
                throw new XAIException(7100, "请求人脸识别服务异常,请重试!" + ex.Message);
            }
            LogModule.Info("XAI->BIDU:DeleteFace--->出参:" + resJson);
            var res = resJson.ToEntity <BIDUResponse>();

            if (res.error_code != 0)
            {
                throw new XAIException(7100, typeof(BIDUErrorCodeEnum).GetEnumName(res.error_code.ToInt()));
            }
            return(new XAIResDeleteFace()
            {
            });
        }