mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-04-20 02:55:04 +08:00
Merge branch 'dev' of http://192.168.2.2:8099/jsowell/jsowell-charger-web into dev
This commit is contained in:
@@ -89,4 +89,11 @@ public interface PileMerchantInfoMapper {
|
||||
* 查询一级运营商
|
||||
*/
|
||||
List<PileMerchantInfo> queryFirstLevelMerchant();
|
||||
|
||||
/**
|
||||
* 根据appid查询对应一级运营商id
|
||||
* @param appId
|
||||
* @return
|
||||
*/
|
||||
String getFirstLevelMerchantIdByAppId(String appId);
|
||||
}
|
||||
|
||||
@@ -64,9 +64,12 @@ public interface IPileMerchantInfoService {
|
||||
*/
|
||||
public int deletePileMerchantInfoById(Long id);
|
||||
|
||||
String getMerchantIdByAppId(String appId);
|
||||
|
||||
List<String> getMerchantIdsByAppId(String appId);
|
||||
/**
|
||||
* 获取一级运营商merchantId
|
||||
* @param appId
|
||||
* @return
|
||||
*/
|
||||
String getFirstLevelMerchantIdByAppId(String appId);
|
||||
|
||||
MerchantInfoVO getMerchantInfo(String merchantId);
|
||||
|
||||
|
||||
@@ -259,14 +259,14 @@ public class PileMerchantInfoServiceImpl implements IPileMerchantInfoService {
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getMerchantIdByAppId(String appId) {
|
||||
public String getFirstLevelMerchantIdByAppId(String appId) {
|
||||
if (StringUtils.isBlank(appId)) {
|
||||
return null;
|
||||
}
|
||||
try {
|
||||
List<PileMerchantInfo> pileMerchantInfos = pileMerchantInfoMapper.selectPileMerchantInfoByAppId(appId);
|
||||
if (CollectionUtils.isNotEmpty(pileMerchantInfos)) {
|
||||
return pileMerchantInfos.get(0).getId().toString();
|
||||
String merchantId = pileMerchantInfoMapper.getFirstLevelMerchantIdByAppId(appId);
|
||||
if (StringUtils.isNotBlank(merchantId)) {
|
||||
return merchantId;
|
||||
}
|
||||
} catch (Exception e) {
|
||||
log.error("通过appid获取运营商id error", e);
|
||||
@@ -274,23 +274,6 @@ 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));
|
||||
|
||||
@@ -44,6 +44,7 @@
|
||||
<if test="totalServiceAmount != null "> and total_service_amount = #{totalServiceAmount}</if>
|
||||
<if test="totalElecAmount != null "> and total_elec_amount = #{totalElecAmount}</if>
|
||||
</where>
|
||||
order by create_time desc
|
||||
</select>
|
||||
|
||||
<select id="selectOrderInvoiceRecordById" parameterType="Integer" resultMap="OrderInvoiceRecordResult">
|
||||
|
||||
@@ -333,4 +333,14 @@
|
||||
where del_flag = '0'
|
||||
and merchant_level = '1'
|
||||
</select>
|
||||
|
||||
<select id="getFirstLevelMerchantIdByAppId" resultType="java.lang.String">
|
||||
select
|
||||
id
|
||||
from
|
||||
pile_merchant_info
|
||||
where
|
||||
app_id = #{appId,jdbcType=VARCHAR}
|
||||
and merchant_level = '1'
|
||||
</select>
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user