Commit f367f073 by 墨竹

feat:查询权限修改

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