return identityService.getListInfo(identityQuery); | return identityService.getListInfo(identityQuery); | ||||
} | } | ||||
/** | |||||
* 获取最新一条身份申请 | |||||
* | |||||
* @param identityQuery 查询条件 | |||||
* @return | |||||
*/ | |||||
@GetMapping("/getApplyLast") | |||||
public JsonResult getApplyLast(IdentityQuery identityQuery) { | |||||
return identityService.getApplyLast(identityQuery); | |||||
} | |||||
/** | /** | ||||
* 申请身份-提交 | * 申请身份-提交 | ||||
* | * |
*/ | */ | ||||
private Integer tenantId; | private Integer tenantId; | ||||
/** | |||||
* 用户openid | |||||
*/ | |||||
private String openid; | |||||
} | } |
JsonResult submit(IdentityApply identityApply); | JsonResult submit(IdentityApply identityApply); | ||||
JsonResult queryPage(IdentityQuery identityQuery); | JsonResult queryPage(IdentityQuery identityQuery); | ||||
JsonResult getApplyLast(IdentityQuery identityQuery); | |||||
} | } |
return JsonResult.success(pageData); | return JsonResult.success(pageData); | ||||
} | } | ||||
@Override | |||||
public JsonResult getApplyLast(IdentityQuery identityQuery) { | |||||
if(null == identityQuery.getTenantId() || StringUtils.isEmpty(identityQuery.getOpenid())){ | |||||
return JsonResult.error("参数为空!"); | |||||
} | |||||
IdentityApply identityApply = identityApplyMapper.selectOne(new LambdaQueryWrapper<IdentityApply>() | |||||
.eq(IdentityApply::getTenantId, identityQuery.getTenantId()) | |||||
.eq(IdentityApply::getApplyOpenid, identityQuery.getOpenid()) | |||||
.eq(IdentityApply::getMark, 1) | |||||
.orderByDesc(IdentityApply::getCreateTime) | |||||
.last("limit 1")); | |||||
return JsonResult.success(identityApply); | |||||
} | |||||
} | } |