diff --git a/jsowell-pile/src/main/java/com/jsowell/pile/rpc/WccServiceImpl.java b/jsowell-pile/src/main/java/com/jsowell/pile/rpc/WccServiceImpl.java index 478f445a4..875565295 100644 --- a/jsowell-pile/src/main/java/com/jsowell/pile/rpc/WccServiceImpl.java +++ b/jsowell-pile/src/main/java/com/jsowell/pile/rpc/WccServiceImpl.java @@ -27,15 +27,18 @@ import com.jsowell.pile.vo.web.PileModelInfoVO; import com.jsowell.pile.vo.web.PileStationVO; import com.jsowell.thirdparty.service.ThirdpartySecretInfoService; import lombok.extern.slf4j.Slf4j; +import org.apache.commons.collections4.CollectionUtils; import org.apache.dubbo.config.annotation.DubboService; import org.springframework.beans.BeanUtils; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; import java.util.ArrayList; import java.util.Collections; import java.util.List; import java.util.Map; +@Service @DubboService(group = "thirdparty" , version = "1.0.0") @Slf4j public class WccServiceImpl implements WccService { @@ -76,6 +79,9 @@ public class WccServiceImpl implements WccService { @Autowired private OrderDetailMapper orderDetailMapper; + @Autowired + private ThirdPartyStationRelationService thirdPartyStationRelationService; + /** * 测试接口 * @param name @@ -577,4 +583,45 @@ public class WccServiceImpl implements WccService { return orderBasicInfoService.updateOrderDetail(orderDetail1); } + /** + * 根据站点idList批量查询枪口数据 + * + * @param stationIds + * @return + */ + @Override + public List batchSelectConnectorList(List stationIds) { + List resultList = new ArrayList<>(); + List connectorInfoVOS = pileConnectorInfoService.batchSelectConnectorList(stationIds); + if (CollectionUtils.isNotEmpty(connectorInfoVOS)) { + for (ConnectorInfoVO connectorInfoVO : connectorInfoVOS) { + // connectorInfoVO复制到JCTConnectorInfoVO + JCTConnectorInfoVO jctConnectorInfoVO = new JCTConnectorInfoVO(); + BeanUtils.copyProperties(connectorInfoVO, jctConnectorInfoVO); + resultList.add(jctConnectorInfoVO); + } + } + return resultList; + } + + /** + * 根据第三方平台类型查询对接第三方平台的运营商列表 + * + * @param thirdPlatformType + * @return + */ + @Override + public List selectMerchantList(String thirdPlatformType) { + List merchantInfoVOS = thirdPartyStationRelationService.selectMerchantList(thirdPlatformType); + List jctMerchantInfoVOS = new ArrayList<>(); + if (CollectionUtils.isNotEmpty(merchantInfoVOS)) { + for (MerchantInfoVO merchantInfoVO : merchantInfoVOS) { + JCTMerchantInfoVO jctMerchantInfoVO = new JCTMerchantInfoVO(); + BeanUtils.copyProperties(merchantInfoVO, jctMerchantInfoVO); + jctMerchantInfoVOS.add(jctMerchantInfoVO); + } + } + return jctMerchantInfoVOS; + } + } diff --git a/pom.xml b/pom.xml index 50ba2cd7b..ad1565845 100644 --- a/pom.xml +++ b/pom.xml @@ -46,7 +46,7 @@ 3.3.0 2.0.3 - 0.0.4 + 0.0.7