Commit d8b17df7 by guojx

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

Feature 2024 11 05 add store status filter

See merge request !2256
parents ea7b2f50 898b8726
......@@ -1568,15 +1568,33 @@ public class WxStaffController extends WebBaseController {
* @return
*/
@RequestMapping(value = "/getCountHaoBanStoreIdsByClerkId", method = RequestMethod.GET)
public RestResponse<StoreRoleVO> getCountHaoBanStoreIdsByClerkId(String clerkId, String wxEnterpriseId) {
StoreRoleDTO storeRoleDTO = staffApiService.getCountHaoBanStoreIdsByClerkId(clerkId, wxEnterpriseId);
public RestResponse<StoreRoleVO> getCountHaoBanStoreIdsByClerkId(String clerkId, String wxEnterpriseId, Integer storeStatusFilter) {
// StoreRoleDTO storeRoleDTO = staffApiService.getCountHaoBanStoreIdsByClerkId(clerkId, wxEnterpriseId);
// StoreRoleVO storeRoleVO = new StoreRoleVO();
// storeRoleVO.setStoreCount(storeRoleDTO.getStoreCount());
// storeRoleVO.setStoreDTO(storeService.getStore(storeRoleDTO.getStoreId()));
StoreRoleVO storeRoleVO = new StoreRoleVO();
storeRoleVO.setStoreCount(storeRoleDTO.getStoreCount());
storeRoleVO.setStoreDTO(storeService.getStore(storeRoleDTO.getStoreId()));
List<String> list = staffApiService.getNotEmptyHaobanStoreIdsRolesByClerkIdAndStoreStatus(clerkId, wxEnterpriseId,
StoreStatusFilterUtils.getStoreStatusList(storeStatusFilter), null);
storeRoleVO.setStoreCount(list.contains("no_store") ? 0 : list.size());
storeRoleVO.setStoreDTO(list.contains("no_store") ? null : storeService.getStore(list.get(0)));
return RestResponse.successResult(storeRoleVO);
}
/**
* 是否所有门店权限
* @param clerkId
* @param wxEnterpriseId
* @return true :是 false:否
*/
@RequestMapping(value = "/isAllStoreAuth", method = RequestMethod.GET)
public RestResponse<Boolean> isAllStoreAuth(String clerkId, String wxEnterpriseId) {
List<String> list = staffApiService.getHaobanStoreIdsRolesByClerkIdAndStoreStatus(clerkId, wxEnterpriseId,
null, null);
return RestResponse.successResult(CollectionUtils.isEmpty(list) ? true : false);
}
/**
* 导购gic门店和好办企业门店交集
*
* @param clerkId
......
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