Skip to content

Commit

Permalink
fix service list filter bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
cyjseagull committed Oct 30, 2024
1 parent f3a54eb commit 316ba7c
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ public void checkUpdateAuth(
updateAuthResult(applicant, authorizationDO, result.get(0), AuthResultStatus.Submit);
}
// the cancel case
if (authorizationDO.getAuthStatus().cancel()) {
if (authorizationDO.getAuthStatus() != null && authorizationDO.getAuthStatus().cancel()) {
logger.info("The auth {} canceled, record the result", authorizationDO.toString());
updateAuthResult(applicant, authorizationDO, result.get(0), AuthResultStatus.Cancel);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ public static enum ServiceAuthStatus {
protected List<ServiceAuthInfo> serviceAuthInfos = new ArrayList<>();

@JsonIgnore protected ServiceStatus serviceStatus;
@JsonIgnore protected String loginUser;

public PublishedServiceInfo(String serviceId) {
this.serviceId = serviceId;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,12 +61,12 @@
<if test="condition.status!= null and condition.status !=''">
and `status` = #{condition.status}
</if>
<if test="condition.owner!= null and condition.owner !='' and condition.nonOwnerUserFilter == false">
<if test="condition.owner!= null and condition.owner !=''">
and `owner` = #{condition.owner}
</if>
<if test="condition.nonOwnerUserFilter!= null and condition.nonOwnerUserFilter == true">
and case
when `owner` != #{condition.owner} then `status` not in
when `owner` != #{condition.loginUser} then `status` not in
<foreach item="filterStatus" collection="condition.filterStatusList" open="(" close=")" separator=",">
#{filterStatus}
</foreach>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ public WeDPRResponse listPublishService(
Arrays.asList(
ServiceStatus.Publishing.getStatus(),
ServiceStatus.PublishFailed.getStatus()));
request.getCondition().setOwner(user);
request.getCondition().setLoginUser(user);
// the auth setting
request.getCondition().setAccessibleAgency(agency);
request.getCondition().setAccessibleUser(user);
Expand Down

0 comments on commit 316ba7c

Please sign in to comment.