Commit f367f073 by 墨竹

feat:查询权限修改

parent 4a2b0172
...@@ -251,12 +251,13 @@ public interface StaffApiService { ...@@ -251,12 +251,13 @@ public interface StaffApiService {
* 导购gic门店和好办企业门店交集 * 导购gic门店和好办企业门店交集
* 超管返回所有门店 * 超管返回所有门店
* *
* @param clerkId 职员id * @param clerkId 职员id
* @param wxEnterpriseId wx企业标识
* @return {@link List }<{@link String }> * @return {@link List }<{@link String }>
* @author mozhu * @author mozhu
* @date 2022-05-06 17:17:27 * @date 2022-05-25 15:37:24
*/ */
List<String> getHaoBanStoreRolesByClerkId(String clerkId); List<String> getHaoBanStoreRolesByClerkId(String clerkId,String wxEnterpriseId);
/** /**
......
...@@ -1299,23 +1299,14 @@ public class StaffApiServiceImpl implements StaffApiService { ...@@ -1299,23 +1299,14 @@ public class StaffApiServiceImpl implements StaffApiService {
} }
@Override @Override
public List<String> getHaoBanStoreRolesByClerkId(String clerkId) { public List<String> getHaoBanStoreRolesByClerkId(String clerkId,String wxEnterpriseId) {
StaffClerkRelationDTO staffClerkRelationDTO = staffClerkRelationService.getByClerkId(clerkId); ClerkDTO clerkDTO = clerkService.getClerkByClerkId(clerkId);
if (staffClerkRelationDTO == null) { if (clerkDTO == null) {
return Collections.emptyList(); logger.info("导购不存在:clerkId:{}",clerkId);
}
TabHaobanStaff staff = staffService.selectById(staffClerkRelationDTO.getStaffId());
if (staff == null) {
return Collections.emptyList(); return Collections.emptyList();
} }
List<String> enterpriseIdStoreIds = storeRangeService.listStoreIdByWxEnterpriseId(staffClerkRelationDTO.getEnterpriseId(), staffClerkRelationDTO.getWxEnterpriseId()); List<String> enterpriseIdStoreIds = storeRangeService.listStoreIdByWxEnterpriseId(clerkDTO.getEnterpriseId(), wxEnterpriseId);
logger.info("好办门店id:{}", JSON.toJSONString(enterpriseIdStoreIds)); logger.info("好办门店id:{}", JSON.toJSONString(enterpriseIdStoreIds));
Integer superManagerFlag = staff.getSuperManagerFlag();
//超管
if (superManagerFlag != null && superManagerFlag == 1) {
//超管返回好办企业
return enterpriseIdStoreIds;
}
List<String> gicStoreIds = getStoreIdList(clerkId); List<String> gicStoreIds = getStoreIdList(clerkId);
if (CollectionUtils.isEmpty(gicStoreIds)) { if (CollectionUtils.isEmpty(gicStoreIds)) {
return Collections.emptyList(); return Collections.emptyList();
......
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