Skip to content

Commit

Permalink
🆕 #2622 【企业微信】OA打卡模块增加录入打卡人员人脸信息的接口
Browse files Browse the repository at this point in the history
  • Loading branch information
zhongjun96 authored Apr 27, 2022
1 parent e9e7afd commit 5227c45
Show file tree
Hide file tree
Showing 4 changed files with 43 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1096,6 +1096,26 @@ public enum WxCpErrorMsgEnum {
* 通用错误码,提交审批单内部接口失败
*/
CODE_301057(301057, "通用错误码,提交审批单内部接口失败"),
/**
* 输入userid无对应成员
*/
CODE_301069(301069,"输入userid无对应成员"),
/**
* 系统错误,请稍后再试
*/
CODE_301070(301070,"系统错误,请稍后再试"),
/**
* 企业内有其他人员有相似人脸,此情况下人脸仍然会录入成功
*/
CODE_301071(301071,"企业内有其他人员有相似人脸,此情况下人脸仍然会录入成功"),
/**
* 人脸图像数据错误请更换图片
*/
CODE_301072(301072,"企业内有其他人员有相似人脸,此情况下人脸仍然会录入成功"),
/**
* 输入参数错误
*/
CODE_301075(301075,"输入参数错误"),
/**
* 批量导入任务的文件中userid有重复.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -255,4 +255,17 @@ List<WxCpDialRecord> getDialRecord(Date startTime, Date endTime, Integer offset,
* @throws WxErrorException the wx error exception
*/
void setCheckinScheduleList(WxCpSetCheckinSchedule wxCpSetCheckinSchedule) throws WxErrorException;
/**
* <pre>
* 录入打卡人员人脸信息
* 企业可通过打卡应用Secret调用本接口,为企业打卡人员录入人脸信息,人脸信息仅用于人脸打卡。
* 上传图片大小限制:图片数据不超过1M
* 请求方式:POST(HTTPS)
* 请求地址:<a href="https://qyapi.weixin.qq.com/cgi-bin/checkin/addcheckinuserface?access_token=ACCESS_TOKEN">https://qyapi.weixin.qq.com/cgi-bin/checkin/addcheckinuserface?access_token=ACCESS_TOKEN</a>
* 文档地址:<a href="https://developer.work.weixin.qq.com/document/path/93378">https://developer.work.weixin.qq.com/document/path/93378</a>
* <pre>
* @param userId 需要录入的用户id
* @param userFace 需要录入的人脸图片数据,需要将图片数据base64处理后填入,对已录入的人脸会进行更新处理
*/
void addCheckInUserFace(String userId, String userFace) throws WxErrorException;
}
Original file line number Diff line number Diff line change
Expand Up @@ -354,4 +354,13 @@ public void setCheckinScheduleList(WxCpSetCheckinSchedule wxCpSetCheckinSchedule
final String url = this.mainService.getWxCpConfigStorage().getApiUrl(SET_CHECKIN_SCHEDULE_DATA);
this.mainService.post(url, WxCpGsonBuilder.create().toJson(wxCpSetCheckinSchedule));
}

@Override
public void addCheckInUserFace(String userId, String userFace) throws WxErrorException {
JsonObject jsonObject = new JsonObject();
jsonObject.addProperty("userid", userId);
jsonObject.addProperty("userface", userFace);
String url = this.mainService.getWxCpConfigStorage().getApiUrl(ADD_CHECK_IN_USER_FACE);
this.mainService.post(url, jsonObject.toString());
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ interface Oa {
String GET_CHECKIN_MONTH_DATA = "/cgi-bin/checkin/getcheckin_monthdata";
String GET_CHECKIN_SCHEDULE_DATA = "/cgi-bin/checkin/getcheckinschedulist";
String SET_CHECKIN_SCHEDULE_DATA = "/cgi-bin/checkin/setcheckinschedulist";
String ADD_CHECK_IN_USER_FACE = "/cgi-bin/checkin/addcheckinuserface";

/**
* 审批
Expand Down

0 comments on commit 5227c45

Please sign in to comment.