Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(企业微信):OA-打卡-录入打卡人员人脸信息接口 #2622

Merged
merged 1 commit into from
Apr 27, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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