update 打印日志

This commit is contained in:
2024-02-28 15:22:38 +08:00
parent 32a5daeeac
commit 50777ea07a
4 changed files with 24 additions and 17 deletions

View File

@@ -33,6 +33,7 @@ import java.text.ParseException;
import java.util.Date;
import java.util.HashMap;
import java.util.Map;
import java.util.Objects;
@Service
public class WxAppletRemoteService {
@@ -210,7 +211,10 @@ public class WxAppletRemoteService {
// 通过orderCode查询到充电站点和开始时间并set
String orderCode = dto.getOrderCode();
SendMessageVO sendMessageVO = orderBasicInfoService.selectOrderInfoByOrderCode(orderCode);
if (Objects.isNull(sendMessageVO)) {
log.error("开始充电发送消息, 通过orderCode:{}, 查询SendMessageVO为null", dto.getOrderCode());
return null;
}
AppletTemplateMessageSendDTO.StartChargingMessage startChargingMessage = new AppletTemplateMessageSendDTO.StartChargingMessage();
msgInfo.setStartChargingMessage(startChargingMessage);
if (StringUtils.isBlank(sendMessageVO.getChargeStartTime())) {
@@ -241,7 +245,10 @@ public class WxAppletRemoteService {
// 通过订单号查询订单金额
AppletTemplateMessageSendDTO msgInfo = new AppletTemplateMessageSendDTO();
SendMessageVO sendMessageVO = orderBasicInfoService.selectOrderInfoByOrderCode(dto.getOrderCode());
if (Objects.isNull(sendMessageVO)) {
log.error("停止充电发送消息, 通过orderCode:{}, 查询SendMessageVO为null", dto.getOrderCode());
return null;
}
msgInfo.setType("2"); // 2-结束充电推送消息
msgInfo.setTouser(sendMessageVO.getOpenId());
// 封装对象并调用发送消息的方法