Pārlūkot izejas kodu

查询最新一条身份申请 接口

tags/V1.7.0
wanghaoran pirms 1 gada
vecāks
revīzija
6d78641b30
4 mainītis faili ar 35 papildinājumiem un 0 dzēšanām
  1. +12
    -0
      tuoheng-api/src/main/java/com/tuoheng/api/controller/IdentityController.java
  2. +5
    -0
      tuoheng-api/src/main/java/com/tuoheng/api/entity/request/IdentityQuery.java
  3. +2
    -0
      tuoheng-api/src/main/java/com/tuoheng/api/service/IIdentityService.java
  4. +16
    -0
      tuoheng-api/src/main/java/com/tuoheng/api/service/impl/IdentityServiceImpl.java

+ 12
- 0
tuoheng-api/src/main/java/com/tuoheng/api/controller/IdentityController.java Parādīt failu

@@ -37,6 +37,18 @@ public class IdentityController {
return identityService.getListInfo(identityQuery);
}

/**
* 获取最新一条身份申请
*
* @param identityQuery 查询条件
* @return
*/
@GetMapping("/getApplyLast")
public JsonResult getApplyLast(IdentityQuery identityQuery) {
return identityService.getApplyLast(identityQuery);
}


/**
* 申请身份-提交
*

+ 5
- 0
tuoheng-api/src/main/java/com/tuoheng/api/entity/request/IdentityQuery.java Parādīt failu

@@ -11,4 +11,9 @@ public class IdentityQuery extends BaseQuery {
*/
private Integer tenantId;

/**
* 用户openid
*/
private String openid;

}

+ 2
- 0
tuoheng-api/src/main/java/com/tuoheng/api/service/IIdentityService.java Parādīt failu

@@ -18,4 +18,6 @@ public interface IIdentityService extends IBaseService<Identity> {
JsonResult submit(IdentityApply identityApply);

JsonResult queryPage(IdentityQuery identityQuery);

JsonResult getApplyLast(IdentityQuery identityQuery);
}

+ 16
- 0
tuoheng-api/src/main/java/com/tuoheng/api/service/impl/IdentityServiceImpl.java Parādīt failu

@@ -122,4 +122,20 @@ public class IdentityServiceImpl extends BaseServiceImpl<IdentityMapper, Identit

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);
}
}

Notiek ielāde…
Atcelt
Saglabāt