Commit 9236f7c1 by guojx

Merge branch 'feature-2024-11-05-add-store-status-filter' into 'master'

Feature 2024 11 05 add store status filter

See merge request !2302
parents d5293e51 7f6d8705
...@@ -13,6 +13,7 @@ import com.gic.clerk.api.service.PowerService; ...@@ -13,6 +13,7 @@ import com.gic.clerk.api.service.PowerService;
import com.gic.commons.util.DateUtil; import com.gic.commons.util.DateUtil;
import com.gic.commons.util.EntityUtil; import com.gic.commons.util.EntityUtil;
import com.gic.commons.util.ImageUtil; import com.gic.commons.util.ImageUtil;
import com.gic.commons.webapi.reponse.RestResponse;
import com.gic.enterprise.api.dto.*; import com.gic.enterprise.api.dto.*;
import com.gic.enterprise.api.service.EnterpriseService; import com.gic.enterprise.api.service.EnterpriseService;
import com.gic.enterprise.api.service.StoreGroupService; import com.gic.enterprise.api.service.StoreGroupService;
...@@ -913,6 +914,21 @@ public class StaffApiServiceImpl implements StaffApiService { ...@@ -913,6 +914,21 @@ public class StaffApiServiceImpl implements StaffApiService {
private List<String> getHaobanStoreIdsRolesByClerkIdAndStoreStatusCommon(String clerkId, String wxEnterpriseId, List<String> storeStatusList, private List<String> getHaobanStoreIdsRolesByClerkIdAndStoreStatusCommon(String clerkId, String wxEnterpriseId, List<String> storeStatusList,
boolean isMustReturnStoreIdWhenSuperAdmin, Boolean addUnassignedStore) { boolean isMustReturnStoreIdWhenSuperAdmin, Boolean addUnassignedStore) {
//兼容店长和店员登陆
ClerkDTO clerkDTO = clerkService.getClerkByClerkId(clerkId);
if (clerkDTO != null) {
if (clerkDTO.getClerkType() == null || clerkDTO.getClerkType() == 0 || clerkDTO.getClerkType() == 1) {
StoreDTO storeDTO = storeService.getStore(clerkDTO.getStoreId());
if (storeDTO != null) {
List<String> storeList = new ArrayList<>();
storeList.add(storeDTO.getStoreId());
return storeList;
} else {
return Collections.singletonList("no_store");
}
}
}
if (addUnassignedStore == null) { if (addUnassignedStore == null) {
addUnassignedStore = false; addUnassignedStore = false;
} }
...@@ -935,7 +951,7 @@ public class StaffApiServiceImpl implements StaffApiService { ...@@ -935,7 +951,7 @@ public class StaffApiServiceImpl implements StaffApiService {
if (!needQueryStore) { if (!needQueryStore) {
return storeIds; return storeIds;
} }
ClerkDTO clerkDTO = clerkService.getClerkByClerkId(clerkId);
StoreSearchDTO storeSearchDTO = new StoreSearchDTO() ; StoreSearchDTO storeSearchDTO = new StoreSearchDTO() ;
storeSearchDTO.setEnterpriseId(clerkDTO.getEnterpriseId()); storeSearchDTO.setEnterpriseId(clerkDTO.getEnterpriseId());
if (isSuperAdminStore) { if (isSuperAdminStore) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment