From 923aaa3537d2ff628f86d80b9b855c1b3c7ced85 Mon Sep 17 00:00:00 2001 From: "autumn.g@foxmail.com" Date: Fri, 15 Sep 2023 11:30:30 +0800 Subject: [PATCH] =?UTF-8?q?update=20=E6=B7=BB=E5=8A=A0=E6=B3=A8=E9=87=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../impl/YKCPushCommandServiceImpl.java | 25 +++++++------------ 1 file changed, 9 insertions(+), 16 deletions(-) diff --git a/jsowell-pile/src/main/java/com/jsowell/pile/service/impl/YKCPushCommandServiceImpl.java b/jsowell-pile/src/main/java/com/jsowell/pile/service/impl/YKCPushCommandServiceImpl.java index f5a89191e..3ba4b18f4 100644 --- a/jsowell-pile/src/main/java/com/jsowell/pile/service/impl/YKCPushCommandServiceImpl.java +++ b/jsowell-pile/src/main/java/com/jsowell/pile/service/impl/YKCPushCommandServiceImpl.java @@ -4,24 +4,13 @@ import com.google.common.collect.Lists; import com.google.common.primitives.Bytes; import com.jsowell.common.constant.Constants; import com.jsowell.common.core.domain.ykc.YKCFrameTypeCode; -import com.jsowell.common.core.redis.RedisCache; import com.jsowell.common.enums.ykc.PileChannelEntity; import com.jsowell.common.enums.ykc.ReturnCodeEnum; import com.jsowell.common.exception.BusinessException; -import com.jsowell.common.util.BytesUtil; -import com.jsowell.common.util.CRC16Util; +import com.jsowell.common.util.*; import com.jsowell.common.util.Cp56Time2a.Cp56Time2aUtil; -import com.jsowell.common.util.DateUtils; -import com.jsowell.common.util.StringUtils; -import com.jsowell.common.util.YKCUtils; import com.jsowell.pile.domain.ykcCommond.*; -import com.jsowell.pile.service.YKCPushCommandService; -import com.jsowell.pile.service.IPileBasicInfoService; -import com.jsowell.pile.service.IPileBillingTemplateService; -import com.jsowell.pile.service.IPileConnectorInfoService; -import com.jsowell.pile.service.IPileModelInfoService; -import com.jsowell.pile.service.IPileMsgRecordService; -import com.jsowell.pile.service.IPileStationInfoService; +import com.jsowell.pile.service.*; import com.jsowell.pile.vo.web.BillingTemplateVO; import com.jsowell.pile.vo.web.PileModelInfoVO; import com.jsowell.pile.vo.web.PileStationVO; @@ -57,9 +46,6 @@ public class YKCPushCommandServiceImpl implements YKCPushCommandService { @Autowired private IPileStationInfoService pileStationInfoService; - @Autowired - private RedisCache redisCache; - @Autowired private IPileMsgRecordService pileMsgRecordService; @@ -73,6 +59,13 @@ public class YKCPushCommandServiceImpl implements YKCPushCommandService { YKCUtils.frameType2Str(YKCFrameTypeCode.REMOTE_STOP_CHARGING_CODE.getBytes()) ); + /** + * 发送push消息 + * @param msg + * @param pileSn + * @param frameTypeCode + * @return + */ public boolean push(byte[] msg, String pileSn, Enum frameTypeCode) { // 通过桩编号获取channel Channel channel = PileChannelEntity.getChannelByPileSn(pileSn);