/// <summary> /// 新增用户组 /// </summary> /// <param name="reqData"></param> /// <returns></returns> public XAIResAddGroup AddGroup(XAIReqAddGroup reqData) { LogModule.Info("XAI->BIDU:AddGroup--->入参:" + reqData.ToJson()); string resJson; try { resJson = client.GroupAdd(reqData.GroupId).ToJson(); } catch (Exception ex) { throw new XAIException(7100, "请求人脸识别服务异常,请重试!" + ex.Message); } LogModule.Info("XAI->BIDU:AddGroup--->出参:" + resJson); var res = resJson.ToEntity <BIDUResponse>(); if (res.error_code != 0) { throw new XAIException(7100, typeof(BIDUErrorCodeEnum).GetEnumName(res.error_code.ToInt())); } return(new XAIResAddGroup() { }); }
public static BaseResponse AddGroup(string groupId) { return(Execute(client.GroupAdd(groupId))); }