mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-04-20 11:05:18 +08:00
update
This commit is contained in:
@@ -42,8 +42,8 @@ public class PileMerchantInfoController extends BaseController {
|
||||
@PreAuthorize("@ss.hasPermi('pile:merchant:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(PileMerchantInfo pileMerchantInfo) {
|
||||
// startPage();
|
||||
List<PileMerchantInfo> list = pileMerchantInfoService.selectPileMerchantInfoListWithAuth(pileMerchantInfo);
|
||||
startPage();
|
||||
List<PileMerchantInfo> list = pileMerchantInfoService.pagePileMerchantInfoListWithAuth(pileMerchantInfo);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
@@ -65,9 +65,9 @@ public class PileMerchantInfoController extends BaseController {
|
||||
*/
|
||||
// @PreAuthorize("@ss.hasPermi('pile:merchant:list')")
|
||||
@GetMapping("/getMerchantList")
|
||||
public TableDataInfo getMerchantList(PileMerchantInfo pileMerchantInfo) {
|
||||
public AjaxResult getMerchantList(PileMerchantInfo pileMerchantInfo) {
|
||||
List<PileMerchantInfo> list = pileMerchantInfoService.selectPileMerchantInfoListWithAuth(pileMerchantInfo);
|
||||
return getDataTable(list);
|
||||
return AjaxResult.success(list);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -34,7 +34,9 @@ public interface PileMerchantInfoService {
|
||||
*/
|
||||
List<PileMerchantInfo> selectPileMerchantInfoListWithAuth(PileMerchantInfo pileMerchantInfo);
|
||||
|
||||
List<PileMerchantInfo> selectPileMerchantInfoList(PileMerchantInfo pileMerchantInfo);
|
||||
List<PileMerchantInfo> pagePileMerchantInfoListWithAuth(PileMerchantInfo pileMerchantInfo);
|
||||
|
||||
List<PileMerchantInfo> selectPileMerchantInfoList(PileMerchantInfo pileMerchantInfo);
|
||||
|
||||
List<PileMerchantInfo> selectPileMerchantInfoListByIdList(List<String> merchantIdList);
|
||||
|
||||
|
||||
@@ -78,13 +78,23 @@ 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());
|
||||
// 当前登录用户的运营商权限列表
|
||||
List<MerchantInfoVO> list = UserUtils.getMerchantInfoVOList();
|
||||
if (CollectionUtils.isNotEmpty(list)) {
|
||||
List<String> collect = list.stream().map(MerchantInfoVO::getDeptId).collect(Collectors.toList());
|
||||
pileMerchantInfo.setMerchantDeptIds(collect);
|
||||
}
|
||||
return selectPileMerchantInfoList(pileMerchantInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页查询充电桩运营商信息列表
|
||||
* 带权限校验
|
||||
* @param pileMerchantInfo 充电桩运营商信息
|
||||
* @return 充电桩运营商信息
|
||||
*/
|
||||
@Override
|
||||
public List<PileMerchantInfo> pagePileMerchantInfoListWithAuth(PileMerchantInfo pileMerchantInfo) {
|
||||
// 当前登录用户的运营商权限列表
|
||||
List<MerchantInfoVO> list = UserUtils.getMerchantInfoVOList();
|
||||
if (CollectionUtils.isNotEmpty(list)) {
|
||||
|
||||
Reference in New Issue
Block a user