This commit is contained in:
Guoqs
2024-07-01 10:56:46 +08:00
2 changed files with 9 additions and 7 deletions

View File

@@ -42,7 +42,7 @@ public class PileMerchantInfoController extends BaseController {
@PreAuthorize("@ss.hasPermi('pile:merchant:list')")
@GetMapping("/list")
public TableDataInfo list(PileMerchantInfo pileMerchantInfo) {
startPage();
// startPage();
List<PileMerchantInfo> list = pileMerchantInfoService.selectPileMerchantInfoListWithAuth(pileMerchantInfo);
return getDataTable(list);
}

View File

@@ -10,6 +10,7 @@ import com.jsowell.common.enums.ykc.ReturnCodeEnum;
import com.jsowell.common.exception.BusinessException;
import com.jsowell.common.util.DateUtils;
import com.jsowell.common.util.DictUtils;
import com.jsowell.common.util.PageUtils;
import com.jsowell.common.util.StringUtils;
import com.jsowell.pile.domain.PileMerchantInfo;
import com.jsowell.pile.dto.CreateMerchantDTO;
@@ -77,12 +78,12 @@ public class PileMerchantInfoServiceImpl implements PileMerchantInfoService {
*/
@Override
public List<PileMerchantInfo> selectPileMerchantInfoListWithAuth(PileMerchantInfo pileMerchantInfo) {
AuthorizedDeptVO authorizedMap = UserUtils.getAuthorizedMap();
if (authorizedMap == null) {
// 为空表示没有权限,返回空数组
return Lists.newArrayList();
}
pileMerchantInfo.setStationDeptIds(authorizedMap.getStationDeptIds());
// AuthorizedDeptVO authorizedMap = UserUtils.getAuthorizedMap();
// if (authorizedMap == null) {
// // 为空表示没有权限,返回空数组
// return Lists.newArrayList();
// }
// pileMerchantInfo.setStationDeptIds(authorizedMap.getStationDeptIds());
// 当前登录用户的运营商权限列表
List<MerchantInfoVO> list = UserUtils.getMerchantInfoVOList();
@@ -90,6 +91,7 @@ public class PileMerchantInfoServiceImpl implements PileMerchantInfoService {
List<String> collect = list.stream().map(MerchantInfoVO::getDeptId).collect(Collectors.toList());
pileMerchantInfo.setMerchantDeptIds(collect);
}
PageUtils.startPage();
return selectPileMerchantInfoList(pileMerchantInfo);
}