增加浙政钉接口日志

This commit is contained in:
zjf committed 2026-09-14 17:43:45 +08:00
1 parent e587cbc7cd
commit dd0c661223
2 files changed
+15 -4

No files matched your search

@@ -132,10 +132,13 @@ public class ThirdPartyOAth2Cotroller {
var boundOpt = thirdPartyZzdSmsBindService.findBound(employeeCode, zzdOpenId);
if (boundOpt.isPresent()) {
ThirdPartyZzdPhoneBindEntity bound = boundOpt.get();
reqParam = reqParam + ",bindHit=1,bindPhone=" + StringUtils.defaultString(bound.getVerifiedPhone())
+ ",bindEmp=" + StringUtils.defaultString(bound.getEmployeeCode());
R result = buildZzdSsoTokenResult(bound.getEmployeeCode(), bound.getVerifiedPhone());
recordZzdSsoControllerLog("/thirdPartyOAth2/zzdsso", reqParam, result, startMs, "boundUser");
return result;
}
reqParam = reqParam + ",bindHit=0";
try {
ZzdUserSnapshot snap = ThirdPartyZzdSmsBindService.snapshotOf(zzdUserDTO);
if (StringUtils.isBlank(snap.getEmployeeCode()) && StringUtils.isBlank(snap.getOpenid())) {
@@ -163,6 +166,7 @@ public class ThirdPartyOAth2Cotroller {
}
}
reqParam = reqParam + ",smsBindEnabled=0";
R result = buildZzdSsoTokenResult(employeeCode, mobile);
recordZzdSsoControllerLog("/thirdPartyOAth2/zzdsso", reqParam, result, startMs, "directToken");
return result;
@@ -294,10 +298,12 @@ public class ThirdPartyOAth2Cotroller {
}
private R buildZzdSsoTokenResult(String employeeCode, String mobileForLookup) {
R<List<SysUser>> userByMobileOrEmployeeCode = remoteUserService.getUserByMobileOrEmployeeCode(
StringUtils.defaultString(employeeCode),
StringUtils.defaultString(mobileForLookup));
String emp = StringUtils.defaultString(employeeCode);
String mobile = StringUtils.defaultString(mobileForLookup);
R<List<SysUser>> userByMobileOrEmployeeCode = remoteUserService.getUserByMobileOrEmployeeCode(emp, mobile);
List<SysUser> sysUserList = userByMobileOrEmployeeCode.getData();
int match = sysUserList == null ? 0 : sysUserList.size();
log.warn("[zzdsso][localUserLookup] employeeCode={} mobile={} matchCount={}", emp, mobile, match);
if (CollectionUtils.isEmpty(sysUserList)) {
return R.failed("系统中没有当前用户信息,请联系管理员进行申请!");
}
@@ -498,7 +498,12 @@ public class SysUserController {
@GetMapping("/getUserByMobileOrEmployeeCode")
@Inner
public R<List<SysUser>> getUserByMobileOrEmployeeCode(@RequestParam(value = "employeeCode", required = false) String employeeCode, @RequestParam("mobile") String mobile) {
return R.ok(userService.list(Wrappers.<SysUser>lambdaQuery().eq(StringUtils.isNotBlank(employeeCode), SysUser::getDingtalkEmployeeCode, employeeCode).or().eq(SysUser::getPhone, mobile)));
if (StringUtils.isBlank(employeeCode) && StringUtils.isBlank(mobile)) {
return R.ok(java.util.Collections.emptyList());
}
return R.ok(userService.list(Wrappers.<SysUser>lambdaQuery()
.eq(StringUtils.isNotBlank(employeeCode), SysUser::getDingtalkEmployeeCode, employeeCode)
.or(StringUtils.isNotBlank(mobile), w -> w.eq(SysUser::getPhone, mobile))));
}
@GetMapping("/getUserByMobile")