mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-04-21 19:45:09 +08:00
update 查询所属运营商,带权限校验
This commit is contained in:
@@ -25,6 +25,13 @@ public interface PileMerchantInfoMapper {
|
||||
*/
|
||||
public PileMerchantInfo selectPileMerchantInfoById(Long id);
|
||||
|
||||
/**
|
||||
* 查询运营商列表
|
||||
* @param merchantIdList
|
||||
* @return
|
||||
*/
|
||||
List<PileMerchantInfo> selectPileMerchantInfoListByIdList(@Param("merchantIdList") List<String> merchantIdList);
|
||||
|
||||
/**
|
||||
* 通过appid查询充电桩运营商信息
|
||||
* @param appId
|
||||
@@ -127,4 +134,5 @@ public interface PileMerchantInfoMapper {
|
||||
* @return
|
||||
*/
|
||||
PileMerchantInfoVO queryMerchantInfoByStationId(String stationId);
|
||||
|
||||
}
|
||||
|
||||
@@ -36,6 +36,8 @@ public interface PileMerchantInfoService {
|
||||
|
||||
List<PileMerchantInfo> selectPileMerchantInfoList(PileMerchantInfo pileMerchantInfo);
|
||||
|
||||
List<PileMerchantInfo> selectPileMerchantInfoListByIdList(List<String> merchantIdList);
|
||||
|
||||
/**
|
||||
* 新增充电桩运营商信息
|
||||
*
|
||||
@@ -72,11 +74,16 @@ public interface PileMerchantInfoService {
|
||||
|
||||
/**
|
||||
* 通过微信小程序appId查询一级运营商merchantId
|
||||
* @param appId 微信小程序appId
|
||||
* @param wechatAppId 微信小程序appId
|
||||
* @return 一级运营商merchantId
|
||||
*/
|
||||
String getFirstLevelMerchantIdByWxAppId(String wechatAppId);
|
||||
|
||||
/**
|
||||
* 通过支付宝小程序appId查询一级运营商merchantId
|
||||
* @param alipayAppId 微信小程序appId
|
||||
* @return 一级运营商merchantId
|
||||
*/
|
||||
String getFirstLevelMerchantIdByAliAppId(String alipayAppId);
|
||||
|
||||
MerchantInfoVO getMerchantInfoVO(String merchantId);
|
||||
|
||||
@@ -32,6 +32,7 @@ import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
import java.util.concurrent.CompletableFuture;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* 充电桩运营商信息Service业务层处理
|
||||
@@ -81,7 +82,13 @@ public class PileMerchantInfoServiceImpl implements PileMerchantInfoService {
|
||||
return Lists.newArrayList();
|
||||
}
|
||||
pileMerchantInfo.setStationDeptIds(authorizedMap.getStationDeptIds());
|
||||
pileMerchantInfo.setMerchantDeptIds(authorizedMap.getMerchantDeptIds());
|
||||
|
||||
// 当前登录用户的运营商权限列表
|
||||
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);
|
||||
}
|
||||
|
||||
@@ -104,6 +111,11 @@ public class PileMerchantInfoServiceImpl implements PileMerchantInfoService {
|
||||
return list;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<PileMerchantInfo> selectPileMerchantInfoListByIdList(List<String> merchantIdList) {
|
||||
return pileMerchantInfoMapper.selectPileMerchantInfoListByIdList(merchantIdList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增充电桩运营商信息
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user