You've already forked FrameTour-BE
2
This commit is contained in:
@@ -18,6 +18,7 @@ import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Optional;
|
||||
import java.util.concurrent.atomic.AtomicInteger;
|
||||
@@ -39,8 +40,12 @@ public class DeviceServiceImpl implements DeviceService {
|
||||
for (DeviceRespVO deviceRespVO : list) {
|
||||
DeviceEntity onlineStatus = deviceRepository.getOnlineStatus(deviceRespVO.getId());
|
||||
if (onlineStatus != null) {
|
||||
deviceRespVO.setOnline(onlineStatus.getOnline());
|
||||
deviceRespVO.setKeepaliveAt(onlineStatus.getKeepaliveAt());
|
||||
if (new Date().getTime() - onlineStatus.getKeepaliveAt().getTime() > 300000) {
|
||||
deviceRespVO.setOnline(0);
|
||||
} else {
|
||||
deviceRespVO.setOnline(onlineStatus.getOnline());
|
||||
}
|
||||
} else {
|
||||
deviceRespVO.setOnline(0);
|
||||
deviceRespVO.setKeepaliveAt(null);
|
||||
|
||||
@@ -152,7 +152,7 @@ public class OrderServiceImpl implements OrderService {
|
||||
WXPayOrderReqVO wxPayOrderReqVO = new WXPayOrderReqVO();
|
||||
String goodsName = null;
|
||||
if (orderItems.size() > 1) {
|
||||
goodsName = "多项景区Vloh商品";
|
||||
goodsName = "多项景区Vlog商品";
|
||||
} else {
|
||||
int type = orderItems.get(NumberConstant.ZERO).getGoodsType();
|
||||
if (type == NumberConstant.ZERO) {
|
||||
|
||||
Reference in New Issue
Block a user