mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-04-20 11:05:18 +08:00
打印日志
This commit is contained in:
@@ -247,6 +247,15 @@ public interface OrderBasicInfoMapper {
|
||||
*/
|
||||
SendMessageVO selectOrderInfoByOrderCode(@Param("orderCode") String orderCode);
|
||||
|
||||
/**
|
||||
* 查询时间段内订单列表
|
||||
* TODO 慢sql需要优化
|
||||
* @param startTime
|
||||
* @param endTime
|
||||
* @param orderStatus
|
||||
* @param payStatus
|
||||
* @return
|
||||
*/
|
||||
List<OrderBasicInfo> selectOrderListByTimeRangeAndStatus(@Param("startTime") String startTime,
|
||||
@Param("endTime") String endTime,
|
||||
@Param("orderStatus") String orderStatus,
|
||||
|
||||
@@ -151,9 +151,9 @@ public class YKCPushCommandServiceImpl implements YKCPushCommandService {
|
||||
public byte[] supplySend(byte[] msg, String pileSn, Enum<YKCFrameTypeCode> frameTypeCode, long timeout, TimeUnit unit) throws Exception {
|
||||
// 通过桩编号获取channel
|
||||
ChannelHandlerContext ctx = PileChannelEntity.getChannelByPileSn(pileSn);
|
||||
String value = ((YKCFrameTypeCode) frameTypeCode).getValue(); // 帧类型名称
|
||||
String frameTypeName = ((YKCFrameTypeCode) frameTypeCode).getValue(); // 帧类型名称
|
||||
if (Objects.isNull(ctx)) {
|
||||
log.error("push命令[{}]失败, 桩号:{}无法获取到长连接, 请检查充电桩连接状态!", value, pileSn);
|
||||
log.error("push命令[{}]失败, 桩号:{}无法获取到长连接, 请检查充电桩连接状态!", frameTypeName, pileSn);
|
||||
throw new NullPointerException("channel");
|
||||
}
|
||||
if(msg == null) {
|
||||
@@ -206,12 +206,12 @@ public class YKCPushCommandServiceImpl implements YKCPushCommandService {
|
||||
// 检查操作的状态
|
||||
if (channelFutureListener.isSuccess()) {
|
||||
log.info("【push结果===>成功】, pileSn:{}, remoteAddress:{}, channelId:{}, 帧类型:{}, 报文:{}",
|
||||
pileSn, ctx.channel().remoteAddress(), ctx.channel().id(), value, wholeMsg);
|
||||
pileSn, ctx.channel().remoteAddress(), ctx.channel().id(), frameTypeName, wholeMsg);
|
||||
} else {
|
||||
// 如果发生错误,则访问描述原因的Throwable
|
||||
Throwable cause = channelFutureListener.cause();
|
||||
log.info("【push结果===>失败】, pileSn:{}, remoteAddress:{}, channelId:{}, 帧类型:{}, 报文:{}",
|
||||
pileSn, ctx.channel().remoteAddress(), ctx.channel().id(), value, wholeMsg);
|
||||
pileSn, ctx.channel().remoteAddress(), ctx.channel().id(), frameTypeName, wholeMsg);
|
||||
log.error("push发送命令失败, pileSn:{}", pileSn, cause);
|
||||
}
|
||||
});
|
||||
@@ -221,9 +221,9 @@ public class YKCPushCommandServiceImpl implements YKCPushCommandService {
|
||||
if(rpcResponse == null) {
|
||||
if(syncPromise.isTimeout()) {
|
||||
// throw new TimeoutException("等待响应结果超时");
|
||||
log.error("发送[{}]指令后, 等待响应结果超时", value);
|
||||
log.error("pileSn:{}, 发送[{}]指令后, 等待响应结果超时", pileSn, frameTypeName);
|
||||
} else{
|
||||
log.error("发送[{}]指令后, 发生其他异常", value);
|
||||
log.error("pileSn:{}, 发送[{}]指令后, 发生其他异常", pileSn, frameTypeName);
|
||||
}
|
||||
}
|
||||
// 移除容器
|
||||
|
||||
Reference in New Issue
Block a user