From a1c8dfd525e7c365e46e3205b289b211b499fbb7 Mon Sep 17 00:00:00 2001 From: Lemon Date: Fri, 7 Jul 2023 14:40:19 +0800 Subject: [PATCH] station_setting_relation ----> thirdparty_station_relation --- .../pile/PileStationInfoController.java | 15 ++- .../netty/handler/ChargeEndHandler.java | 13 +-- .../TransactionRecordsRequestHandler.java | 8 +- .../handler/UploadRealTimeMonitorHandler.java | 12 +- ...on.java => ThirdPartyStationRelation.java} | 2 +- ...a => ThirdPartyStationRelationMapper.java} | 28 ++--- ...=> IThirdPartyStationRelationService.java} | 28 ++--- .../StationSettingRelationServiceImpl.java | 104 ------------------ .../ThirdPartyStationRelationServiceImpl.java | 102 +++++++++++++++++ ....java => ThirdPartyStationRelationVO.java} | 2 +- ...ml => ThirdPartyStationRelationMapper.xml} | 36 +++--- .../service/impl/LianLianServiceImpl.java | 48 ++++---- 12 files changed, 196 insertions(+), 202 deletions(-) rename jsowell-pile/src/main/java/com/jsowell/pile/domain/{StationSettingRelation.java => ThirdPartyStationRelation.java} (96%) rename jsowell-pile/src/main/java/com/jsowell/pile/mapper/{StationSettingRelationMapper.java => ThirdPartyStationRelationMapper.java} (51%) rename jsowell-pile/src/main/java/com/jsowell/pile/service/{IStationSettingRelationService.java => IThirdPartyStationRelationService.java} (51%) delete mode 100644 jsowell-pile/src/main/java/com/jsowell/pile/service/impl/StationSettingRelationServiceImpl.java create mode 100644 jsowell-pile/src/main/java/com/jsowell/pile/service/impl/ThirdPartyStationRelationServiceImpl.java rename jsowell-pile/src/main/java/com/jsowell/pile/vo/base/{StationSettingRelationVO.java => ThirdPartyStationRelationVO.java} (90%) rename jsowell-pile/src/main/resources/mapper/pile/{StationSettingRelationMapper.xml => ThirdPartyStationRelationMapper.xml} (71%) diff --git a/jsowell-admin/src/main/java/com/jsowell/web/controller/pile/PileStationInfoController.java b/jsowell-admin/src/main/java/com/jsowell/web/controller/pile/PileStationInfoController.java index a21ac4ec3..5c3fb688d 100644 --- a/jsowell-admin/src/main/java/com/jsowell/web/controller/pile/PileStationInfoController.java +++ b/jsowell-admin/src/main/java/com/jsowell/web/controller/pile/PileStationInfoController.java @@ -12,15 +12,14 @@ import com.jsowell.common.response.RestApiResponse; import com.jsowell.common.util.StringUtils; import com.jsowell.common.util.poi.ExcelUtil; import com.jsowell.pile.domain.PileStationInfo; -import com.jsowell.pile.domain.StationSettingRelation; +import com.jsowell.pile.domain.ThirdPartyStationRelation; import com.jsowell.pile.domain.ThirdPartySettingInfo; import com.jsowell.pile.dto.FastCreateStationDTO; import com.jsowell.pile.dto.LianLianPushStationInfoDTO; import com.jsowell.pile.dto.QueryStationDTO; import com.jsowell.pile.service.IPileStationInfoService; -import com.jsowell.pile.service.IStationSettingRelationService; +import com.jsowell.pile.service.IThirdPartyStationRelationService; import com.jsowell.pile.service.IThirdPartySettingInfoService; -import com.jsowell.pile.vo.base.StationSettingRelationVO; import com.jsowell.pile.vo.web.PileStationVO; import com.jsowell.service.PileService; import com.jsowell.thirdparty.lianlian.service.LianLianService; @@ -53,7 +52,7 @@ public class PileStationInfoController extends BaseController { private LianLianService lianLianService; @Autowired - private IStationSettingRelationService stationSettingRelationService; + private IThirdPartyStationRelationService thirdPartyStationRelationService; /** @@ -192,9 +191,9 @@ public class PileStationInfoController extends BaseController { @PreAuthorize("@ss.hasPermi('pile:station:query')") @GetMapping("/getSettingByStationId/{stationId}") public AjaxResult getSettingByStationId(@PathVariable("stationId") Long id) { - StationSettingRelation info = new StationSettingRelation(); + ThirdPartyStationRelation info = new ThirdPartyStationRelation(); info.setStationId(id); - return AjaxResult.success(stationSettingRelationService.selectRelationInfo(info)); + return AjaxResult.success(thirdPartyStationRelationService.selectRelationInfo(info)); } /** @@ -259,10 +258,10 @@ public class PileStationInfoController extends BaseController { logger.error("推送联联平台充电站信息 error", e); response = new RestApiResponse<>("推送失败,请联系管理员"); // 删除对应配置信息 - StationSettingRelation relation = new StationSettingRelation(); + ThirdPartyStationRelation relation = new ThirdPartyStationRelation(); relation.setStationId(dto.getStationId()); relation.setDelFlag("1"); - stationSettingRelationService.updateStationSettingRelation(relation); + thirdPartyStationRelationService.updateThirdPartyStationRelation(relation); } logger.info("推送联联平台充电站信息 result:{}", response); return response; diff --git a/jsowell-netty/src/main/java/com/jsowell/netty/handler/ChargeEndHandler.java b/jsowell-netty/src/main/java/com/jsowell/netty/handler/ChargeEndHandler.java index 579c850a7..ee9137752 100644 --- a/jsowell-netty/src/main/java/com/jsowell/netty/handler/ChargeEndHandler.java +++ b/jsowell-netty/src/main/java/com/jsowell/netty/handler/ChargeEndHandler.java @@ -9,12 +9,11 @@ import com.jsowell.common.util.StringUtils; import com.jsowell.common.util.YKCUtils; import com.jsowell.netty.factory.YKCOperateFactory; import com.jsowell.pile.domain.OrderBasicInfo; -import com.jsowell.pile.domain.StationSettingRelation; -import com.jsowell.pile.domain.ThirdPartySettingInfo; +import com.jsowell.pile.domain.ThirdPartyStationRelation; import com.jsowell.pile.service.IOrderBasicInfoService; -import com.jsowell.pile.service.IStationSettingRelationService; +import com.jsowell.pile.service.IThirdPartyStationRelationService; import com.jsowell.pile.service.IThirdPartySettingInfoService; -import com.jsowell.pile.vo.base.StationSettingRelationVO; +import com.jsowell.pile.vo.base.ThirdPartyStationRelationVO; import com.jsowell.thirdparty.lianlian.service.LianLianService; import io.netty.channel.Channel; import lombok.extern.slf4j.Slf4j; @@ -46,7 +45,7 @@ public class ChargeEndHandler extends AbstractHandler{ private LianLianService lianLianService; @Autowired - private IStationSettingRelationService stationSettingRelationService; + private IThirdPartyStationRelationService thirdPartyStationRelationService; @Override public void afterPropertiesSet() throws Exception { @@ -134,9 +133,9 @@ public class ChargeEndHandler extends AbstractHandler{ try { // 查询该站点是否已对接互联互通平台,如果对接则发送充电结束 // 通过站点id查询相关配置信息 - StationSettingRelation relation = new StationSettingRelation(); + ThirdPartyStationRelation relation = new ThirdPartyStationRelation(); relation.setStationId(Long.parseLong(orderInfo.getStationId())); - StationSettingRelationVO relationInfo = stationSettingRelationService.selectRelationInfo(relation); + ThirdPartyStationRelationVO relationInfo = thirdPartyStationRelationService.selectRelationInfo(relation); // ThirdPartySettingInfo info = thirdPartySettingInfoService.getInfoByStationId(Long.parseLong(orderInfo.getStationId())); if (Objects.nonNull(relationInfo)) { // 推送停止充电结果 diff --git a/jsowell-netty/src/main/java/com/jsowell/netty/handler/TransactionRecordsRequestHandler.java b/jsowell-netty/src/main/java/com/jsowell/netty/handler/TransactionRecordsRequestHandler.java index 7d46d6a73..d25d3439b 100644 --- a/jsowell-netty/src/main/java/com/jsowell/netty/handler/TransactionRecordsRequestHandler.java +++ b/jsowell-netty/src/main/java/com/jsowell/netty/handler/TransactionRecordsRequestHandler.java @@ -19,7 +19,7 @@ import com.jsowell.common.util.id.IdUtils; import com.jsowell.netty.factory.YKCOperateFactory; import com.jsowell.pile.domain.*; import com.jsowell.pile.service.*; -import com.jsowell.pile.vo.base.StationSettingRelationVO; +import com.jsowell.pile.vo.base.ThirdPartyStationRelationVO; import com.jsowell.thirdparty.lianlian.service.LianLianService; import io.netty.channel.Channel; import lombok.extern.slf4j.Slf4j; @@ -69,7 +69,7 @@ public class TransactionRecordsRequestHandler extends AbstractHandler { private LianLianService lianLianService; @Autowired - private IStationSettingRelationService stationSettingRelationService; + private IThirdPartyStationRelationService thirdPartyStationRelationService; @Autowired private IMemberPlateNumberRelationService memberPlateNumberRelationService; @@ -630,9 +630,9 @@ public class TransactionRecordsRequestHandler extends AbstractHandler { try { // 联联平台 推送订单信息 notification_orderInfo // 查询该站点是否推送联联平台 - StationSettingRelation relation = new StationSettingRelation(); + ThirdPartyStationRelation relation = new ThirdPartyStationRelation(); relation.setStationId(Long.parseLong(orderBasicInfo.getStationId())); - StationSettingRelationVO relationInfo = stationSettingRelationService.selectRelationInfo(relation); + ThirdPartyStationRelationVO relationInfo = thirdPartyStationRelationService.selectRelationInfo(relation); // ThirdPartySettingInfo infoByStationId = thirdPartySettingInfoService.getInfoByStationId(Long.parseLong(stationId)); if (Objects.nonNull(relationInfo)) { // 推送订单信息 diff --git a/jsowell-netty/src/main/java/com/jsowell/netty/handler/UploadRealTimeMonitorHandler.java b/jsowell-netty/src/main/java/com/jsowell/netty/handler/UploadRealTimeMonitorHandler.java index 2d14fea27..29f37d483 100644 --- a/jsowell-netty/src/main/java/com/jsowell/netty/handler/UploadRealTimeMonitorHandler.java +++ b/jsowell-netty/src/main/java/com/jsowell/netty/handler/UploadRealTimeMonitorHandler.java @@ -13,11 +13,9 @@ import com.jsowell.common.util.StringUtils; import com.jsowell.common.util.YKCUtils; import com.jsowell.netty.factory.YKCOperateFactory; import com.jsowell.pile.domain.OrderBasicInfo; -import com.jsowell.pile.domain.PileBasicInfo; -import com.jsowell.pile.domain.StationSettingRelation; -import com.jsowell.pile.domain.ThirdPartySettingInfo; +import com.jsowell.pile.domain.ThirdPartyStationRelation; import com.jsowell.pile.service.*; -import com.jsowell.pile.vo.base.StationSettingRelationVO; +import com.jsowell.pile.vo.base.ThirdPartyStationRelationVO; import com.jsowell.thirdparty.lianlian.service.LianLianService; import io.netty.channel.Channel; import lombok.extern.slf4j.Slf4j; @@ -62,7 +60,7 @@ public class UploadRealTimeMonitorHandler extends AbstractHandler { private LianLianService lianLianService; @Autowired - private IStationSettingRelationService stationSettingRelationService; + private IThirdPartyStationRelationService thirdPartyStationRelationService; @Override public byte[] supplyProcess(YKCDataProtocol ykcDataProtocol, Channel channel) { @@ -295,12 +293,12 @@ public class UploadRealTimeMonitorHandler extends AbstractHandler { } // 状态不一样,传给联联 // 查询该站点是否推送联联平台 - StationSettingRelation relation = new StationSettingRelation(); + ThirdPartyStationRelation relation = new ThirdPartyStationRelation(); if (StringUtils.isBlank(orderInfo.getStationId())) { return null; } relation.setStationId(Long.parseLong(orderInfo.getStationId())); - StationSettingRelationVO relationInfo = stationSettingRelationService.selectRelationInfo(relation); + ThirdPartyStationRelationVO relationInfo = thirdPartyStationRelationService.selectRelationInfo(relation); // ThirdPartySettingInfo thirdPartySettingInfo = thirdPartySettingInfoService.getInfoByStationId(pileBasicInfo.getStationId()); if (Objects.nonNull(relationInfo)) { String pileConnectorCode = pileSn + connectorCode; diff --git a/jsowell-pile/src/main/java/com/jsowell/pile/domain/StationSettingRelation.java b/jsowell-pile/src/main/java/com/jsowell/pile/domain/ThirdPartyStationRelation.java similarity index 96% rename from jsowell-pile/src/main/java/com/jsowell/pile/domain/StationSettingRelation.java rename to jsowell-pile/src/main/java/com/jsowell/pile/domain/ThirdPartyStationRelation.java index 0908bc2cf..15c6ab61d 100644 --- a/jsowell-pile/src/main/java/com/jsowell/pile/domain/StationSettingRelation.java +++ b/jsowell-pile/src/main/java/com/jsowell/pile/domain/ThirdPartyStationRelation.java @@ -11,7 +11,7 @@ import org.apache.commons.lang3.builder.ToStringStyle; * @author jsowell * @date 2023-06-06 */ -public class StationSettingRelation extends BaseEntity { +public class ThirdPartyStationRelation extends BaseEntity { private static final long serialVersionUID = 1L; /** diff --git a/jsowell-pile/src/main/java/com/jsowell/pile/mapper/StationSettingRelationMapper.java b/jsowell-pile/src/main/java/com/jsowell/pile/mapper/ThirdPartyStationRelationMapper.java similarity index 51% rename from jsowell-pile/src/main/java/com/jsowell/pile/mapper/StationSettingRelationMapper.java rename to jsowell-pile/src/main/java/com/jsowell/pile/mapper/ThirdPartyStationRelationMapper.java index 172248bb3..78d893a30 100644 --- a/jsowell-pile/src/main/java/com/jsowell/pile/mapper/StationSettingRelationMapper.java +++ b/jsowell-pile/src/main/java/com/jsowell/pile/mapper/ThirdPartyStationRelationMapper.java @@ -2,8 +2,8 @@ package com.jsowell.pile.mapper; import java.util.List; -import com.jsowell.pile.domain.StationSettingRelation; -import com.jsowell.pile.vo.base.StationSettingRelationVO; +import com.jsowell.pile.domain.ThirdPartyStationRelation; +import com.jsowell.pile.vo.base.ThirdPartyStationRelationVO; import org.springframework.stereotype.Component; /** @@ -13,45 +13,45 @@ import org.springframework.stereotype.Component; * @date 2023-06-06 */ @Component -public interface StationSettingRelationMapper { +public interface ThirdPartyStationRelationMapper { /** * 查询站点、第三方推送平台配置对应 * * @param id 站点、第三方推送平台配置对应主键 * @return 站点、第三方推送平台配置对应 */ - public StationSettingRelation selectStationSettingRelationById(Long id); + public ThirdPartyStationRelation selectThirdPartyStationRelationById(Long id); /** * 查询站点、第三方推送平台配置对应列表 * - * @param stationSettingRelation 站点、第三方推送平台配置对应 + * @param thirdPartyStationRelation 站点、第三方推送平台配置对应 * @return 站点、第三方推送平台配置对应集合 */ - public List selectStationSettingRelationList(StationSettingRelation stationSettingRelation); + public List selectThirdPartyStationRelationList(ThirdPartyStationRelation thirdPartyStationRelation); /** * 查询站点、第三方推送平台配置 - * @param stationSettingRelation + * @param thirdPartyStationRelation * @return */ - StationSettingRelationVO selectRelationInfo(StationSettingRelation stationSettingRelation); + ThirdPartyStationRelationVO selectRelationInfo(ThirdPartyStationRelation thirdPartyStationRelation); /** * 新增站点、第三方推送平台配置对应 * - * @param stationSettingRelation 站点、第三方推送平台配置对应 + * @param thirdPartyStationRelation 站点、第三方推送平台配置对应 * @return 结果 */ - public int insertStationSettingRelation(StationSettingRelation stationSettingRelation); + public int insertThirdPartyStationRelation(ThirdPartyStationRelation thirdPartyStationRelation); /** * 修改站点、第三方推送平台配置对应 * - * @param stationSettingRelation 站点、第三方推送平台配置对应 + * @param thirdPartyStationRelation 站点、第三方推送平台配置对应 * @return 结果 */ - public int updateStationSettingRelation(StationSettingRelation stationSettingRelation); + public int updateThirdPartyStationRelation(ThirdPartyStationRelation thirdPartyStationRelation); /** * 删除站点、第三方推送平台配置对应 @@ -59,7 +59,7 @@ public interface StationSettingRelationMapper { * @param id 站点、第三方推送平台配置对应主键 * @return 结果 */ - public int deleteStationSettingRelationById(Long id); + public int deleteThirdPartyStationRelationById(Long id); /** * 批量删除站点、第三方推送平台配置对应 @@ -67,5 +67,5 @@ public interface StationSettingRelationMapper { * @param ids 需要删除的数据主键集合 * @return 结果 */ - public int deleteStationSettingRelationByIds(Long[] ids); + public int deleteThirdPartyStationRelationByIds(Long[] ids); } diff --git a/jsowell-pile/src/main/java/com/jsowell/pile/service/IStationSettingRelationService.java b/jsowell-pile/src/main/java/com/jsowell/pile/service/IThirdPartyStationRelationService.java similarity index 51% rename from jsowell-pile/src/main/java/com/jsowell/pile/service/IStationSettingRelationService.java rename to jsowell-pile/src/main/java/com/jsowell/pile/service/IThirdPartyStationRelationService.java index ec815ebf7..d2ecd3564 100644 --- a/jsowell-pile/src/main/java/com/jsowell/pile/service/IStationSettingRelationService.java +++ b/jsowell-pile/src/main/java/com/jsowell/pile/service/IThirdPartyStationRelationService.java @@ -2,8 +2,8 @@ package com.jsowell.pile.service; import java.util.List; -import com.jsowell.pile.domain.StationSettingRelation; -import com.jsowell.pile.vo.base.StationSettingRelationVO; +import com.jsowell.pile.domain.ThirdPartyStationRelation; +import com.jsowell.pile.vo.base.ThirdPartyStationRelationVO; /** * 站点、第三方推送平台配置对应Service接口 @@ -11,45 +11,45 @@ import com.jsowell.pile.vo.base.StationSettingRelationVO; * @author jsowell * @date 2023-06-06 */ -public interface IStationSettingRelationService { +public interface IThirdPartyStationRelationService { /** * 查询站点、第三方推送平台配置对应 * * @param id 站点、第三方推送平台配置对应主键 * @return 站点、第三方推送平台配置对应 */ - public StationSettingRelation selectStationSettingRelationById(Long id); + public ThirdPartyStationRelation selectThirdPartyStationRelationById(Long id); /** * 查询站点、第三方推送平台配置对应列表 * - * @param stationSettingRelation 站点、第三方推送平台配置对应 + * @param thirdPartyStationRelation 站点、第三方推送平台配置对应 * @return 站点、第三方推送平台配置对应集合 */ - public List selectStationSettingRelationList(StationSettingRelation stationSettingRelation); + public List selectThirdPartyStationRelationList(ThirdPartyStationRelation thirdPartyStationRelation); /** * 查询站点、第三方推送平台配置 - * @param stationSettingRelation + * @param thirdPartyStationRelation * @return */ - StationSettingRelationVO selectRelationInfo(StationSettingRelation stationSettingRelation); + ThirdPartyStationRelationVO selectRelationInfo(ThirdPartyStationRelation thirdPartyStationRelation); /** * 新增站点、第三方推送平台配置对应 * - * @param stationSettingRelation 站点、第三方推送平台配置对应 + * @param thirdPartyStationRelation 站点、第三方推送平台配置对应 * @return 结果 */ - public int insertStationSettingRelation(StationSettingRelation stationSettingRelation); + public int insertThirdPartyStationRelation(ThirdPartyStationRelation thirdPartyStationRelation); /** * 修改站点、第三方推送平台配置对应 * - * @param stationSettingRelation 站点、第三方推送平台配置对应 + * @param thirdPartyStationRelation 站点、第三方推送平台配置对应 * @return 结果 */ - public int updateStationSettingRelation(StationSettingRelation stationSettingRelation); + public int updateThirdPartyStationRelation(ThirdPartyStationRelation thirdPartyStationRelation); /** * 批量删除站点、第三方推送平台配置对应 @@ -57,7 +57,7 @@ public interface IStationSettingRelationService { * @param ids 需要删除的站点、第三方推送平台配置对应主键集合 * @return 结果 */ - public int deleteStationSettingRelationByIds(Long[] ids); + public int deleteThirdPartyStationRelationByIds(Long[] ids); /** * 删除站点、第三方推送平台配置对应信息 @@ -65,5 +65,5 @@ public interface IStationSettingRelationService { * @param id 站点、第三方推送平台配置对应主键 * @return 结果 */ - public int deleteStationSettingRelationById(Long id); + public int deleteThirdPartyStationRelationById(Long id); } diff --git a/jsowell-pile/src/main/java/com/jsowell/pile/service/impl/StationSettingRelationServiceImpl.java b/jsowell-pile/src/main/java/com/jsowell/pile/service/impl/StationSettingRelationServiceImpl.java deleted file mode 100644 index 23b82e25b..000000000 --- a/jsowell-pile/src/main/java/com/jsowell/pile/service/impl/StationSettingRelationServiceImpl.java +++ /dev/null @@ -1,104 +0,0 @@ -package com.jsowell.pile.service.impl; - -import java.util.List; - -import com.jsowell.common.util.DateUtils; -import com.jsowell.common.util.SecurityUtils; -import com.jsowell.framework.web.domain.server.Sys; -import com.jsowell.pile.vo.base.StationSettingRelationVO; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Service; -import com.jsowell.pile.mapper.StationSettingRelationMapper; -import com.jsowell.pile.domain.StationSettingRelation; -import com.jsowell.pile.service.IStationSettingRelationService; - -/** - * 站点、第三方推送平台配置对应Service业务层处理 - * - * @author jsowell - * @date 2023-06-06 - */ -@Service -public class StationSettingRelationServiceImpl implements IStationSettingRelationService { - @Autowired - private StationSettingRelationMapper stationSettingRelationMapper; - - /** - * 查询站点、第三方推送平台配置对应 - * - * @param id 站点、第三方推送平台配置对应主键 - * @return 站点、第三方推送平台配置对应 - */ - @Override - public StationSettingRelation selectStationSettingRelationById(Long id) { - return stationSettingRelationMapper.selectStationSettingRelationById(id); - } - - /** - * 查询站点、第三方推送平台配置对应列表 - * - * @param stationSettingRelation 站点、第三方推送平台配置对应 - * @return 站点、第三方推送平台配置对应 - */ - @Override - public List selectStationSettingRelationList(StationSettingRelation stationSettingRelation) { - return stationSettingRelationMapper.selectStationSettingRelationList(stationSettingRelation); - } - - /** - * 查询站点、第三方推送平台配置 - * @param stationSettingRelation - * @return - */ - @Override - public StationSettingRelationVO selectRelationInfo(StationSettingRelation stationSettingRelation) { - return stationSettingRelationMapper.selectRelationInfo(stationSettingRelation); - } - - /** - * 新增站点、第三方推送平台配置对应 - * - * @param stationSettingRelation 站点、第三方推送平台配置对应 - * @return 结果 - */ - @Override - public int insertStationSettingRelation(StationSettingRelation stationSettingRelation) { - // stationSettingRelation.setCreateTime(DateUtils.getNowDate()); - stationSettingRelation.setCreateBy(SecurityUtils.getUsername()); - return stationSettingRelationMapper.insertStationSettingRelation(stationSettingRelation); - } - - /** - * 修改站点、第三方推送平台配置对应 - * - * @param stationSettingRelation 站点、第三方推送平台配置对应 - * @return 结果 - */ - @Override - public int updateStationSettingRelation(StationSettingRelation stationSettingRelation) { - // stationSettingRelation.setUpdateTime(DateUtils.getNowDate()); - return stationSettingRelationMapper.updateStationSettingRelation(stationSettingRelation); - } - - /** - * 批量删除站点、第三方推送平台配置对应 - * - * @param ids 需要删除的站点、第三方推送平台配置对应主键 - * @return 结果 - */ - @Override - public int deleteStationSettingRelationByIds(Long[] ids) { - return stationSettingRelationMapper.deleteStationSettingRelationByIds(ids); - } - - /** - * 删除站点、第三方推送平台配置对应信息 - * - * @param id 站点、第三方推送平台配置对应主键 - * @return 结果 - */ - @Override - public int deleteStationSettingRelationById(Long id) { - return stationSettingRelationMapper.deleteStationSettingRelationById(id); - } -} diff --git a/jsowell-pile/src/main/java/com/jsowell/pile/service/impl/ThirdPartyStationRelationServiceImpl.java b/jsowell-pile/src/main/java/com/jsowell/pile/service/impl/ThirdPartyStationRelationServiceImpl.java new file mode 100644 index 000000000..1f1b29959 --- /dev/null +++ b/jsowell-pile/src/main/java/com/jsowell/pile/service/impl/ThirdPartyStationRelationServiceImpl.java @@ -0,0 +1,102 @@ +package com.jsowell.pile.service.impl; + +import java.util.List; + +import com.jsowell.common.util.SecurityUtils; +import com.jsowell.pile.vo.base.ThirdPartyStationRelationVO; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import com.jsowell.pile.mapper.ThirdPartyStationRelationMapper; +import com.jsowell.pile.domain.ThirdPartyStationRelation; +import com.jsowell.pile.service.IThirdPartyStationRelationService; + +/** + * 站点、第三方推送平台配置对应Service业务层处理 + * + * @author jsowell + * @date 2023-06-06 + */ +@Service +public class ThirdPartyStationRelationServiceImpl implements IThirdPartyStationRelationService { + @Autowired + private ThirdPartyStationRelationMapper thirdPartyStationRelationMapper; + + /** + * 查询站点、第三方推送平台配置对应 + * + * @param id 站点、第三方推送平台配置对应主键 + * @return 站点、第三方推送平台配置对应 + */ + @Override + public ThirdPartyStationRelation selectThirdPartyStationRelationById(Long id) { + return thirdPartyStationRelationMapper.selectThirdPartyStationRelationById(id); + } + + /** + * 查询站点、第三方推送平台配置对应列表 + * + * @param thirdPartyStationRelation 站点、第三方推送平台配置对应 + * @return 站点、第三方推送平台配置对应 + */ + @Override + public List selectThirdPartyStationRelationList(ThirdPartyStationRelation thirdPartyStationRelation) { + return thirdPartyStationRelationMapper.selectThirdPartyStationRelationList(thirdPartyStationRelation); + } + + /** + * 查询站点、第三方推送平台配置 + * @param thirdPartyStationRelation + * @return + */ + @Override + public ThirdPartyStationRelationVO selectRelationInfo(ThirdPartyStationRelation thirdPartyStationRelation) { + return thirdPartyStationRelationMapper.selectRelationInfo(thirdPartyStationRelation); + } + + /** + * 新增站点、第三方推送平台配置对应 + * + * @param thirdPartyStationRelation 站点、第三方推送平台配置对应 + * @return 结果 + */ + @Override + public int insertThirdPartyStationRelation(ThirdPartyStationRelation thirdPartyStationRelation) { + // stationSettingRelation.setCreateTime(DateUtils.getNowDate()); + thirdPartyStationRelation.setCreateBy(SecurityUtils.getUsername()); + return thirdPartyStationRelationMapper.insertThirdPartyStationRelation(thirdPartyStationRelation); + } + + /** + * 修改站点、第三方推送平台配置对应 + * + * @param thirdPartyStationRelation 站点、第三方推送平台配置对应 + * @return 结果 + */ + @Override + public int updateThirdPartyStationRelation(ThirdPartyStationRelation thirdPartyStationRelation) { + // stationSettingRelation.setUpdateTime(DateUtils.getNowDate()); + return thirdPartyStationRelationMapper.updateThirdPartyStationRelation(thirdPartyStationRelation); + } + + /** + * 批量删除站点、第三方推送平台配置对应 + * + * @param ids 需要删除的站点、第三方推送平台配置对应主键 + * @return 结果 + */ + @Override + public int deleteThirdPartyStationRelationByIds(Long[] ids) { + return thirdPartyStationRelationMapper.deleteThirdPartyStationRelationByIds(ids); + } + + /** + * 删除站点、第三方推送平台配置对应信息 + * + * @param id 站点、第三方推送平台配置对应主键 + * @return 结果 + */ + @Override + public int deleteThirdPartyStationRelationById(Long id) { + return thirdPartyStationRelationMapper.deleteThirdPartyStationRelationById(id); + } +} diff --git a/jsowell-pile/src/main/java/com/jsowell/pile/vo/base/StationSettingRelationVO.java b/jsowell-pile/src/main/java/com/jsowell/pile/vo/base/ThirdPartyStationRelationVO.java similarity index 90% rename from jsowell-pile/src/main/java/com/jsowell/pile/vo/base/StationSettingRelationVO.java rename to jsowell-pile/src/main/java/com/jsowell/pile/vo/base/ThirdPartyStationRelationVO.java index baae4898f..b241ba341 100644 --- a/jsowell-pile/src/main/java/com/jsowell/pile/vo/base/StationSettingRelationVO.java +++ b/jsowell-pile/src/main/java/com/jsowell/pile/vo/base/ThirdPartyStationRelationVO.java @@ -9,7 +9,7 @@ import lombok.Data; * @date 2023/6/6 8:48 */ @Data -public class StationSettingRelationVO { +public class ThirdPartyStationRelationVO { private String stationId; private String thirdPartyType; diff --git a/jsowell-pile/src/main/resources/mapper/pile/StationSettingRelationMapper.xml b/jsowell-pile/src/main/resources/mapper/pile/ThirdPartyStationRelationMapper.xml similarity index 71% rename from jsowell-pile/src/main/resources/mapper/pile/StationSettingRelationMapper.xml rename to jsowell-pile/src/main/resources/mapper/pile/ThirdPartyStationRelationMapper.xml index fffb1b459..5896d909a 100644 --- a/jsowell-pile/src/main/resources/mapper/pile/StationSettingRelationMapper.xml +++ b/jsowell-pile/src/main/resources/mapper/pile/ThirdPartyStationRelationMapper.xml @@ -2,9 +2,9 @@ - + - + @@ -15,29 +15,29 @@ - - select id, station_id, third_party_type, create_time, create_by, update_time, update_by, del_flag from station_setting_relation + + select id, station_id, third_party_type, create_time, create_by, update_time, update_by, del_flag from thirdparty_station_relation id, station_id, third_party_type, create_time, create_by, update_time, update_by, del_flag - + and station_id = #{stationId} and third_party_type = #{thirdPartyType} - + where id = #{id} - - insert into station_setting_relation + + insert into thirdparty_station_relation station_id, third_party_type, @@ -58,8 +58,8 @@ - - update station_setting_relation + + update thirdparty_station_relation station_id = #{stationId}, third_party_type = #{thirdPartyType}, @@ -72,18 +72,18 @@ where station_id = #{stationId,jdbcType=BIGINT} - - delete from station_setting_relation where id = #{id} + + delete from thirdparty_station_relation where id = #{id} - - delete from station_setting_relation where id in + + delete from thirdparty_station_relation where id in #{id} - select t1.station_id as stationId, t1.third_party_type as thirdPartyType, @@ -93,7 +93,7 @@ t2.sign_secret as signSecret, t2.data_secret as dataSecret, t2.data_secret_IV as dataSecretIv - from station_setting_relation t1 join thirdparty_setting_info t2 on t1.third_party_type = t2.type + from thirdparty_station_relation t1 join thirdparty_setting_info t2 on t1.third_party_type = t2.type where t1.del_flag = '0' and t1.station_id = #{stationId,jdbcType=BIGINT} diff --git a/jsowell-thirdparty/src/main/java/com/jsowell/thirdparty/lianlian/service/impl/LianLianServiceImpl.java b/jsowell-thirdparty/src/main/java/com/jsowell/thirdparty/lianlian/service/impl/LianLianServiceImpl.java index 11fd4f67c..b5899ff8b 100644 --- a/jsowell-thirdparty/src/main/java/com/jsowell/thirdparty/lianlian/service/impl/LianLianServiceImpl.java +++ b/jsowell-thirdparty/src/main/java/com/jsowell/thirdparty/lianlian/service/impl/LianLianServiceImpl.java @@ -28,7 +28,7 @@ import com.jsowell.pile.dto.*; import com.jsowell.pile.service.*; import com.jsowell.pile.vo.base.ConnectorInfoVO; import com.jsowell.pile.vo.base.MerchantInfoVO; -import com.jsowell.pile.vo.base.StationSettingRelationVO; +import com.jsowell.pile.vo.base.ThirdPartyStationRelationVO; import com.jsowell.pile.vo.lianlian.AccumulativeInfoVO; import com.jsowell.pile.vo.uniapp.BillingPriceVO; import com.jsowell.pile.vo.web.PileConnectorInfoVO; @@ -93,7 +93,7 @@ public class LianLianServiceImpl implements LianLianService { private IThirdPartyPlatformConfigService thirdPartyPlatformConfigService; @Autowired - private IStationSettingRelationService stationSettingRelationService; + private IThirdPartyStationRelationService thirdPartyStationRelationService; @Override public void pushMerchantInfo(Long merchantId) { @@ -126,16 +126,16 @@ public class LianLianServiceImpl implements LianLianService { // 通过id查询站点相关信息 PileStationInfo pileStationInfo = pileStationInfoService.selectPileStationInfoById(dto.getStationId()); // 通过站点id查询相关配置信息 - StationSettingRelation relation = new StationSettingRelation(); + ThirdPartyStationRelation relation = new ThirdPartyStationRelation(); relation.setStationId(dto.getStationId()); - StationSettingRelationVO relationInfo = stationSettingRelationService.selectRelationInfo(relation); + ThirdPartyStationRelationVO relationInfo = thirdPartyStationRelationService.selectRelationInfo(relation); // ThirdPartySettingInfo settingInfo = thirdPartySettingInfoService.getInfoByStationId(dto.getStationId()); if (relationInfo == null) { // 新增 relation.setThirdPartyType(dto.getThirdPartyType()); - stationSettingRelationService.insertStationSettingRelation(relation); + thirdPartyStationRelationService.insertThirdPartyStationRelation(relation); - relationInfo = stationSettingRelationService.selectRelationInfo(relation); + relationInfo = thirdPartyStationRelationService.selectRelationInfo(relation); } String operatorId = relationInfo.getOperatorId(); String operatorSecret = relationInfo.getOperatorSecret(); @@ -802,9 +802,9 @@ public class LianLianServiceImpl implements LianLianService { String pileSn = StringUtils.substring(pileConnectorCode, 0, 14); PileStationVO stationVO = pileStationInfoService.getStationInfoByPileSn(pileSn); // 通过站点id查询相关配置信息 - StationSettingRelation relation = new StationSettingRelation(); + ThirdPartyStationRelation relation = new ThirdPartyStationRelation(); relation.setStationId(Long.parseLong(stationVO.getId())); - StationSettingRelationVO relationInfo = stationSettingRelationService.selectRelationInfo(relation); + ThirdPartyStationRelationVO relationInfo = thirdPartyStationRelationService.selectRelationInfo(relation); // ThirdPartySettingInfo settingInfo = thirdPartySettingInfoService.getInfoByStationId(Long.parseLong(stationVO.getId())); if (relationInfo == null) { return null; @@ -851,9 +851,9 @@ public class LianLianServiceImpl implements LianLianService { OrderDetail orderDetail = orderBasicInfoService.getOrderDetailByOrderCode(orderCode); // 通过站点id查询相关配置信息 - StationSettingRelation relation = new StationSettingRelation(); + ThirdPartyStationRelation relation = new ThirdPartyStationRelation(); relation.setStationId(Long.parseLong(orderBasicInfo.getStationId())); - StationSettingRelationVO relationInfo = stationSettingRelationService.selectRelationInfo(relation); + ThirdPartyStationRelationVO relationInfo = thirdPartyStationRelationService.selectRelationInfo(relation); // ThirdPartySettingInfo settingInfo = thirdPartySettingInfoService.getInfoByStationId(Long.parseLong(orderBasicInfo.getStationId())); if (relationInfo == null) { return null; @@ -978,9 +978,9 @@ public class LianLianServiceImpl implements LianLianService { return null; } // 通过站点id查询相关配置信息 - StationSettingRelation relation = new StationSettingRelation(); + ThirdPartyStationRelation relation = new ThirdPartyStationRelation(); relation.setStationId(Long.parseLong(orderInfo.getStationId())); - StationSettingRelationVO relationInfo = stationSettingRelationService.selectRelationInfo(relation); + ThirdPartyStationRelationVO relationInfo = thirdPartyStationRelationService.selectRelationInfo(relation); // ThirdPartySettingInfo settingInfo = thirdPartySettingInfoService.getInfoByStationId(Long.parseLong(orderBasicInfo.getStationId())); if (relationInfo == null) { return null; @@ -1036,9 +1036,9 @@ public class LianLianServiceImpl implements LianLianService { // 根据订单号查询订单信息 OrderBasicInfo orderInfo = orderBasicInfoService.getOrderInfoByOrderCode(orderCode); // 通过站点id查询相关配置信息 - StationSettingRelation relation = new StationSettingRelation(); + ThirdPartyStationRelation relation = new ThirdPartyStationRelation(); relation.setStationId(Long.parseLong(orderInfo.getStationId())); - StationSettingRelationVO relationInfo = stationSettingRelationService.selectRelationInfo(relation); + ThirdPartyStationRelationVO relationInfo = thirdPartyStationRelationService.selectRelationInfo(relation); // ThirdPartySettingInfo settingInfo = thirdPartySettingInfoService.getInfoByStationId(Long.parseLong(orderInfo.getStationId())); if (relationInfo == null) { return null; @@ -1093,9 +1093,9 @@ public class LianLianServiceImpl implements LianLianService { return null; } // 通过站点id查询相关配置信息 - StationSettingRelation relation = new StationSettingRelation(); + ThirdPartyStationRelation relation = new ThirdPartyStationRelation(); relation.setStationId(Long.parseLong(orderInfo.getStationId())); - StationSettingRelationVO relationInfo = stationSettingRelationService.selectRelationInfo(relation); + ThirdPartyStationRelationVO relationInfo = thirdPartyStationRelationService.selectRelationInfo(relation); // ThirdPartySettingInfo settingInfo = thirdPartySettingInfoService.getInfoByStationId(Long.parseLong(orderInfo.getStationId())); if (relationInfo == null) { return null; @@ -1156,9 +1156,9 @@ public class LianLianServiceImpl implements LianLianService { OrderDetail orderDetail = orderBasicInfoService.getOrderDetailByOrderCode(orderCode); // 通过站点id查询相关配置信息 - StationSettingRelation relation = new StationSettingRelation(); + ThirdPartyStationRelation relation = new ThirdPartyStationRelation(); relation.setStationId(Long.parseLong(orderBasicInfo.getStationId())); - StationSettingRelationVO relationInfo = stationSettingRelationService.selectRelationInfo(relation); + ThirdPartyStationRelationVO relationInfo = thirdPartyStationRelationService.selectRelationInfo(relation); // ThirdPartySettingInfo settingInfo = thirdPartySettingInfoService.getInfoByStationId(Long.parseLong(orderBasicInfo.getStationId())); if (relationInfo == null) { return null; @@ -1257,9 +1257,9 @@ public class LianLianServiceImpl implements LianLianService { OrderBasicInfo orderBasicInfo = orderBasicInfoService.getOrderInfoByOrderCode(orderCode); // 通过站点id查询相关配置信息 - StationSettingRelation relation = new StationSettingRelation(); + ThirdPartyStationRelation relation = new ThirdPartyStationRelation(); relation.setStationId(Long.parseLong(orderBasicInfo.getStationId())); - StationSettingRelationVO relationInfo = stationSettingRelationService.selectRelationInfo(relation); + ThirdPartyStationRelationVO relationInfo = thirdPartyStationRelationService.selectRelationInfo(relation); // ThirdPartySettingInfo settingInfo = thirdPartySettingInfoService.getInfoByStationId(Long.parseLong(orderBasicInfo.getStationId())); if (relationInfo == null) { return null; @@ -1302,9 +1302,9 @@ public class LianLianServiceImpl implements LianLianService { } // 通过站点id查询相关配置信息 - StationSettingRelation relation = new StationSettingRelation(); + ThirdPartyStationRelation relation = new ThirdPartyStationRelation(); relation.setStationId(Long.parseLong(orderInfo.getStationId())); - StationSettingRelationVO relationInfo = stationSettingRelationService.selectRelationInfo(relation); + ThirdPartyStationRelationVO relationInfo = thirdPartyStationRelationService.selectRelationInfo(relation); // ThirdPartySettingInfo settingInfo = thirdPartySettingInfoService.getInfoByStationId(Long.parseLong(orderInfo.getStationId())); if (relationInfo == null) { return null; @@ -1378,9 +1378,9 @@ public class LianLianServiceImpl implements LianLianService { .build(); // 通过站点id查询相关配置信息 - StationSettingRelation relation = new StationSettingRelation(); + ThirdPartyStationRelation relation = new ThirdPartyStationRelation(); relation.setStationId(Long.parseLong(orderInfo.getStationId())); - StationSettingRelationVO relationInfo = stationSettingRelationService.selectRelationInfo(relation); + ThirdPartyStationRelationVO relationInfo = thirdPartyStationRelationService.selectRelationInfo(relation); // ThirdPartySettingInfo settingInfo = thirdPartySettingInfoService.getInfoByStationId(Long.parseLong(orderBasicInfo.getStationId())); if (relationInfo == null) { return null;