|
@@ -2,8 +2,11 @@ package cn.com.ty.lift.ud.pay.service.impl;
|
|
|
|
|
|
import java.math.BigDecimal;
|
|
|
import java.time.LocalDateTime;
|
|
|
+import java.time.ZoneOffset;
|
|
|
import java.util.*;
|
|
|
|
|
|
+import cn.com.ty.lift.common.model.PushMessage;
|
|
|
+import cn.com.ty.lift.common.model.PushUserInfo;
|
|
|
import cn.com.ty.lift.ud.chat.mapper.entity.ChatSessionEntity;
|
|
|
import cn.com.ty.lift.ud.chat.mapper.entity.LiftCaseEntity;
|
|
|
import cn.com.ty.lift.ud.chat.service.IChatSessionService;
|
|
@@ -54,6 +57,7 @@ import org.apache.commons.lang3.StringUtils;
|
|
|
import org.slf4j.Logger;
|
|
|
import org.slf4j.LoggerFactory;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
+import org.springframework.jms.core.JmsMessagingTemplate;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
|
|
@@ -81,6 +85,9 @@ public class AlipayServiceImpl implements AlipayService {
|
|
|
|
|
|
private final Logger logger = LoggerFactory.getLogger(AlipayServiceImpl.class);
|
|
|
|
|
|
+ @Autowired
|
|
|
+ private JmsMessagingTemplate jmsMessagingTemplate;
|
|
|
+
|
|
|
private @Autowired AlipayClient alipayClient;
|
|
|
|
|
|
private @Autowired AlipayConfig alipayConfig;
|
|
@@ -506,7 +513,7 @@ public class AlipayServiceImpl implements AlipayService {
|
|
|
RoomInfo roomInfo = new RoomInfo();
|
|
|
roomInfo.setSessionid(entity.getSessionid());
|
|
|
roomInfo.setDataTable(entity.getDataTable());
|
|
|
- roomInfo.setLastTime(entity.getCreateTime());
|
|
|
+ roomInfo.setLastTime(entity.getCreateTime().toInstant(ZoneOffset.of("+8")).toEpochMilli());
|
|
|
UserInfo userInfo1 = new UserInfo();
|
|
|
userInfo1.setUserId(entity.getUserId());
|
|
|
List<UserInfo> userList = new ArrayList<>();
|
|
@@ -643,7 +650,7 @@ public class AlipayServiceImpl implements AlipayService {
|
|
|
RoomInfo roomInfo = new RoomInfo();
|
|
|
roomInfo.setSessionid(entity.getSessionid());
|
|
|
roomInfo.setDataTable(entity.getDataTable());
|
|
|
- roomInfo.setLastTime(entity.getCreateTime());
|
|
|
+ roomInfo.setLastTime(entity.getCreateTime().toInstant(ZoneOffset.of("+8")).toEpochMilli());
|
|
|
UserInfo userInfo1 = new UserInfo();
|
|
|
userInfo1.setUserId(entity.getUserId());
|
|
|
List<UserInfo> userList = new ArrayList<>();
|
|
@@ -704,6 +711,10 @@ public class AlipayServiceImpl implements AlipayService {
|
|
|
billUpEntity.setBalance(latestBalance);
|
|
|
iUserBillService.save(billUpEntity);
|
|
|
|
|
|
+ PushUserInfo pushUserInfo =
|
|
|
+ iUserAccountService.getPushUserInfoByUserId(caseEntity.getChargerId().toString());
|
|
|
+ PushMessage pushMessage = PushMessage.orderChargeStatus("用戶已付款");
|
|
|
+ pushMessage.sendTokenOnPlatform(jmsMessagingTemplate, pushUserInfo);
|
|
|
// log.info("开始记录专家流水信息");
|
|
|
// //专家新增流水信息
|
|
|
// BigDecimal fee = new BigDecimal("0");
|
|
@@ -781,7 +792,7 @@ public class AlipayServiceImpl implements AlipayService {
|
|
|
RoomInfo roomInfo = new RoomInfo();
|
|
|
roomInfo.setSessionid(entity.getSessionid());
|
|
|
roomInfo.setDataTable(entity.getDataTable());
|
|
|
- roomInfo.setLastTime(entity.getCreateTime());
|
|
|
+ roomInfo.setLastTime(entity.getCreateTime().toInstant(ZoneOffset.of("+8")).toEpochMilli());
|
|
|
UserInfo userInfo1 = new UserInfo();
|
|
|
userInfo1.setUserId(entity.getUserId());
|
|
|
List<UserInfo> userList = new ArrayList<>();
|
|
@@ -910,7 +921,7 @@ public class AlipayServiceImpl implements AlipayService {
|
|
|
RoomInfo roomInfo = new RoomInfo();
|
|
|
roomInfo.setSessionid(entity.getSessionid());
|
|
|
roomInfo.setDataTable(entity.getDataTable());
|
|
|
- roomInfo.setLastTime(entity.getCreateTime());
|
|
|
+ roomInfo.setLastTime(entity.getCreateTime().toInstant(ZoneOffset.of("+8")).toEpochMilli());
|
|
|
UserInfo userInfo1 = new UserInfo();
|
|
|
userInfo1.setUserId(entity.getUserId());
|
|
|
List<UserInfo> userList = new ArrayList<>();
|