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:
@@ -27,7 +27,7 @@ public interface PileMerchantInfoMapper {
|
||||
* @param appId
|
||||
* @return
|
||||
*/
|
||||
PileMerchantInfo selectPileMerchantInfoByAppId(String appId);
|
||||
List<PileMerchantInfo> selectPileMerchantInfoByAppId(String appId);
|
||||
|
||||
/**
|
||||
* 查询充电桩运营商信息列表
|
||||
|
||||
@@ -73,7 +73,7 @@ public interface IMemberBasicInfoService {
|
||||
* @param merchantId 运营商id
|
||||
* @return 会员信息
|
||||
*/
|
||||
MemberBasicInfo selectInfoByMobileNumberAndMerchantId(String phone, String merchantId);
|
||||
MemberBasicInfo selectInfoByMobileNumber(String phone, String merchantId);
|
||||
|
||||
/**
|
||||
* 根据手机号查询会员信息
|
||||
|
||||
@@ -64,6 +64,8 @@ public interface IPileMerchantInfoService {
|
||||
|
||||
String getMerchantIdByAppId(String appId);
|
||||
|
||||
List<String> getMerchantIdsByAppId(String appId);
|
||||
|
||||
MerchantInfoVO getMerchantInfo(String merchantId);
|
||||
|
||||
/**
|
||||
|
||||
@@ -137,13 +137,14 @@ public class MemberBasicInfoServiceImpl implements IMemberBasicInfoService {
|
||||
* @param merchantId 运营商id
|
||||
* @return 会员信息
|
||||
*/
|
||||
public MemberBasicInfo selectInfoByMobileNumberAndMerchantId(String mobileNumber, String merchantId) {
|
||||
@Override
|
||||
public MemberBasicInfo selectInfoByMobileNumber(String mobileNumber, String merchantId) {
|
||||
return memberBasicInfoMapper.selectInfoByMobileNumberAndMerchantId(mobileNumber, merchantId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public MemberBasicInfo selectInfoByMobileNumber(String mobileNumber) {
|
||||
return selectInfoByMobileNumberAndMerchantId(mobileNumber, null);
|
||||
return selectInfoByMobileNumber(mobileNumber, null);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -26,6 +26,7 @@ import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* 充电桩运营商信息Service业务层处理
|
||||
@@ -248,9 +249,9 @@ public class PileMerchantInfoServiceImpl implements IPileMerchantInfoService {
|
||||
return null;
|
||||
}
|
||||
try {
|
||||
PileMerchantInfo pileMerchantInfo = pileMerchantInfoMapper.selectPileMerchantInfoByAppId(appId);
|
||||
if (pileMerchantInfo != null) {
|
||||
return pileMerchantInfo.getId().toString();
|
||||
List<PileMerchantInfo> pileMerchantInfos = pileMerchantInfoMapper.selectPileMerchantInfoByAppId(appId);
|
||||
if (CollectionUtils.isNotEmpty(pileMerchantInfos)) {
|
||||
return pileMerchantInfos.get(0).getId().toString();
|
||||
}
|
||||
} catch (Exception e) {
|
||||
log.error("通过appid获取运营商id error", e);
|
||||
@@ -258,6 +259,23 @@ public class PileMerchantInfoServiceImpl implements IPileMerchantInfoService {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getMerchantIdsByAppId(String appId) {
|
||||
if (StringUtils.isBlank(appId)) {
|
||||
return null;
|
||||
}
|
||||
List<String> resultList = Lists.newArrayList();
|
||||
try {
|
||||
List<PileMerchantInfo> pileMerchantInfos = pileMerchantInfoMapper.selectPileMerchantInfoByAppId(appId);
|
||||
if (CollectionUtils.isNotEmpty(pileMerchantInfos)) {
|
||||
resultList = pileMerchantInfos.stream().map(x -> String.valueOf(x.getId())).collect(Collectors.toList());
|
||||
}
|
||||
} catch (Exception e) {
|
||||
log.error("通过appid获取运营商ids error", e);
|
||||
}
|
||||
return resultList;
|
||||
}
|
||||
|
||||
@Override
|
||||
public MerchantInfoVO getMerchantInfo(String merchantId) {
|
||||
PileMerchantInfo pileMerchantInfo = selectPileMerchantInfoById(Long.parseLong(merchantId));
|
||||
|
||||
Reference in New Issue
Block a user