mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-04-21 11:35:12 +08:00
updateupdate 查询运营商列表
This commit is contained in:
@@ -76,7 +76,7 @@ public interface IPileMerchantInfoService {
|
||||
*/
|
||||
String getFirstLevelMerchantIdByAppId(String appId);
|
||||
|
||||
MerchantInfoVO getMerchantInfo(String merchantId);
|
||||
MerchantInfoVO getMerchantInfoVO(String merchantId);
|
||||
|
||||
/**
|
||||
* 根据运营商部门ids 查询所有站点id
|
||||
@@ -87,6 +87,8 @@ public interface IPileMerchantInfoService {
|
||||
|
||||
PileMerchantInfo queryInfoByDeptId(String deptId);
|
||||
|
||||
MerchantInfoVO queryMerchantInfoVOByDeptId(String deptId);
|
||||
|
||||
/**
|
||||
* 通过ids查询信息列表
|
||||
* @param dto
|
||||
|
||||
@@ -453,17 +453,29 @@ public class MemberBasicInfoServiceImpl implements IMemberBasicInfoService {
|
||||
return resultList;
|
||||
}
|
||||
String deptLevel = dept.getDeptLevel();
|
||||
String deptId = String.valueOf(dept.getDeptId());
|
||||
if (Constants.ZERO.equals(deptLevel)) {
|
||||
// 平台级权限 查询所有生效的运营商
|
||||
resultList = pileMerchantInfoService.selectAll();
|
||||
} else if (Constants.ONE.equals(deptLevel)) {
|
||||
// 一级运营商权限 查询该一级运营商下面的所有运营商
|
||||
PileMerchantInfo merchantInfo = pileMerchantInfoService.queryInfoByDeptId(String.valueOf(dept.getDeptId()));
|
||||
PileMerchantInfo merchantInfo = pileMerchantInfoService.queryInfoByDeptId(deptId);
|
||||
resultList = pileMerchantInfoService.selectListByFirstMerchant(merchantInfo.getId() + "");
|
||||
} else if (Constants.TWO.equals(deptLevel) ) {
|
||||
// 二级运营商权限 返回自身运营商
|
||||
MerchantInfoVO merchantInfoVO = pileMerchantInfoService.queryMerchantInfoVOByDeptId(deptId);
|
||||
if (Objects.nonNull(merchantInfoVO)) {
|
||||
resultList.add(merchantInfoVO);
|
||||
}
|
||||
} else if (Constants.THREE.equals(deptLevel)) {
|
||||
// 站点权限 返回自身运营商
|
||||
PileStationInfo stationInfo = pileStationInfoService.queryInfoByDeptId(deptId);
|
||||
if (Objects.nonNull(stationInfo)) {
|
||||
MerchantInfoVO merchantInfoVO = pileMerchantInfoService.getMerchantInfoVO(stationInfo.getMerchantId() + "");
|
||||
if (Objects.nonNull(merchantInfoVO)) {
|
||||
resultList.add(merchantInfoVO);
|
||||
}
|
||||
}
|
||||
}
|
||||
return resultList;
|
||||
}
|
||||
|
||||
@@ -422,7 +422,7 @@ public class PileBasicInfoServiceImpl implements IPileBasicInfoService {
|
||||
.merchantId(String.valueOf(basicInfo.getMerchantId()))
|
||||
.build();
|
||||
// 查站点信息
|
||||
MerchantInfoVO merchantInfo = pileMerchantInfoService.getMerchantInfo(String.valueOf(basicInfo.getMerchantId()));
|
||||
MerchantInfoVO merchantInfo = pileMerchantInfoService.getMerchantInfoVO(String.valueOf(basicInfo.getMerchantId()));
|
||||
if (merchantInfo != null) {
|
||||
pileInfoVO.setMerchantName(merchantInfo.getMerchantName());
|
||||
}
|
||||
|
||||
@@ -307,7 +307,7 @@ public class PileMerchantInfoServiceImpl implements IPileMerchantInfoService {
|
||||
}
|
||||
|
||||
@Override
|
||||
public MerchantInfoVO getMerchantInfo(String merchantId) {
|
||||
public MerchantInfoVO getMerchantInfoVO(String merchantId) {
|
||||
PileMerchantInfo pileMerchantInfo = selectPileMerchantInfoById(Long.parseLong(merchantId));
|
||||
if (pileMerchantInfo == null) {
|
||||
return null;
|
||||
@@ -351,6 +351,15 @@ public class PileMerchantInfoServiceImpl implements IPileMerchantInfoService {
|
||||
return pileMerchantInfoMapper.queryInfoByDeptId(deptId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public MerchantInfoVO queryMerchantInfoVOByDeptId(String deptId) {
|
||||
PileMerchantInfo merchantInfo = queryInfoByDeptId(deptId);
|
||||
if (Objects.isNull(merchantInfo)) {
|
||||
return null;
|
||||
}
|
||||
return conversion2MerchantInfoVO(merchantInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过ids查询信息列表
|
||||
* @param dto
|
||||
|
||||
@@ -251,7 +251,7 @@ public class PileStationInfoServiceImpl implements IPileStationInfoService {
|
||||
@Override
|
||||
@Transactional(readOnly = false, propagation = Propagation.REQUIRED)
|
||||
public int fastCreateStation(FastCreateStationDTO dto) {
|
||||
MerchantInfoVO merchantInfo = pileMerchantInfoService.getMerchantInfo(dto.getMerchantId());
|
||||
MerchantInfoVO merchantInfo = pileMerchantInfoService.getMerchantInfoVO(dto.getMerchantId());
|
||||
if (merchantInfo == null) {
|
||||
return 0;
|
||||
}
|
||||
@@ -345,7 +345,7 @@ public class PileStationInfoServiceImpl implements IPileStationInfoService {
|
||||
/*
|
||||
修改组织部门
|
||||
*/
|
||||
MerchantInfoVO merchantInfo = pileMerchantInfoService.getMerchantInfo(newMerchantId);
|
||||
MerchantInfoVO merchantInfo = pileMerchantInfoService.getMerchantInfoVO(newMerchantId);
|
||||
if (merchantInfo != null) {
|
||||
// 创建一个新的站点对应部门
|
||||
SysDept dept = sysDeptService.createStationDept(Long.valueOf(merchantInfo.getDeptId()),
|
||||
|
||||
Reference in New Issue
Block a user