debug
This commit is contained in:
parent
4ab271acc9
commit
0b2b551653
|
@ -109,7 +109,7 @@ public class DeviceIotServiceImpl implements DeviceIotService {
|
||||||
query.setStatusList(DeviceStatus.canBackUnlock());
|
query.setStatusList(DeviceStatus.canBackUnlock());
|
||||||
}
|
}
|
||||||
|
|
||||||
Integer result = transactionTemplate.execute(status -> {
|
transactionTemplate.execute(status -> {
|
||||||
// 更新数据库
|
// 更新数据库
|
||||||
int rows = deviceMapper.updateByQuery(data, query);
|
int rows = deviceMapper.updateByQuery(data, query);
|
||||||
vo.setDb(rows);
|
vo.setDb(rows);
|
||||||
|
|
|
@ -486,10 +486,12 @@ public class OrderServiceImpl implements OrderService {
|
||||||
LogParamHolder.set(LogParamHolder.PARAM_LAT, lat);
|
LogParamHolder.set(LogParamHolder.PARAM_LAT, lat);
|
||||||
if (device != null) {
|
if (device != null) {
|
||||||
LogParamHolder.set(LogParamHolder.DEVICE_ID, device.getId());
|
LogParamHolder.set(LogParamHolder.DEVICE_ID, device.getId());
|
||||||
|
if (DeviceLocationType.DEVICE.getCode().equals(device.getLocationType())) {
|
||||||
LogParamHolder.set(LogParamHolder.DEVICE_LON, device.getLongitude());
|
LogParamHolder.set(LogParamHolder.DEVICE_LON, device.getLongitude());
|
||||||
LogParamHolder.set(LogParamHolder.DEVICE_LAT, device.getLatitude());
|
LogParamHolder.set(LogParamHolder.DEVICE_LAT, device.getLatitude());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// 异步使用手机定位更新设备定位
|
// 异步使用手机定位更新设备定位
|
||||||
private void handleDeviceLocationAsync(DeviceVO device, BigDecimal lon, BigDecimal lat) {
|
private void handleDeviceLocationAsync(DeviceVO device, BigDecimal lon, BigDecimal lat) {
|
||||||
|
@ -498,6 +500,7 @@ public class OrderServiceImpl implements OrderService {
|
||||||
device.setLongitude(lon);
|
device.setLongitude(lon);
|
||||||
device.setLatitude(lat);
|
device.setLatitude(lat);
|
||||||
device.setLocationType(DeviceLocationType.PHONE.getCode());
|
device.setLocationType(DeviceLocationType.PHONE.getCode());
|
||||||
|
device.setLastLocationTime(LocalDateTime.now());
|
||||||
|
|
||||||
// 更新设备定位
|
// 更新设备定位
|
||||||
Device data = new Device();
|
Device data = new Device();
|
||||||
|
@ -505,6 +508,7 @@ public class OrderServiceImpl implements OrderService {
|
||||||
data.setLongitude(device.getLongitude());
|
data.setLongitude(device.getLongitude());
|
||||||
data.setLatitude(device.getLatitude());
|
data.setLatitude(device.getLatitude());
|
||||||
data.setLocationType(device.getLocationType());
|
data.setLocationType(device.getLocationType());
|
||||||
|
data.setLastLocationTime(LocalDateTime.now());
|
||||||
int rows = deviceService.updateDevice(data);
|
int rows = deviceService.updateDevice(data);
|
||||||
if (rows != 1) {
|
if (rows != 1) {
|
||||||
log.error("通过手机定位修改设备定位失败deviceId={}", device.getId());
|
log.error("通过手机定位修改设备定位失败deviceId={}", device.getId());
|
||||||
|
@ -651,6 +655,7 @@ public class OrderServiceImpl implements OrderService {
|
||||||
if (device == null) {
|
if (device == null) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
this.setLogParam(dto.getLon(), dto.getLat(), device);
|
||||||
|
|
||||||
// 查询运营区
|
// 查询运营区
|
||||||
AreaVO area = areaService.selectAreaById(order.getAreaId());
|
AreaVO area = areaService.selectAreaById(order.getAreaId());
|
||||||
|
|
|
@ -98,9 +98,9 @@ public class RevenueStatQuery {
|
||||||
// 平台分成查询
|
// 平台分成查询
|
||||||
public BonusQuery toPlatformBonusQuery() {
|
public BonusQuery toPlatformBonusQuery() {
|
||||||
BonusQuery query = new BonusQuery();
|
BonusQuery query = new BonusQuery();
|
||||||
query.setCreateDateRange(dateRange);
|
query.setWaitDateRange(dateRange);
|
||||||
query.setArrivalTypes(BonusArrivalType.platformList());
|
query.setArrivalTypes(BonusArrivalType.platformList());
|
||||||
query.setStatusList(BonusStatus.valid());
|
query.setStatusList(BonusStatus.settle());
|
||||||
return query;
|
return query;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -94,7 +94,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
</insert>
|
</insert>
|
||||||
|
|
||||||
|
|
||||||
<insert id="batchInsert" parameterType="SysOperLog" useGeneratedKeys="true" keyProperty="operId">
|
<insert id="batchInsert" parameterType="OperLog" useGeneratedKeys="true" keyProperty="operId">
|
||||||
insert into sys_oper_log
|
insert into sys_oper_log
|
||||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||||
title,
|
title,
|
||||||
|
|
|
@ -5,6 +5,7 @@ import java.util.List;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import com.ruoyi.common.utils.collection.CollectionUtils;
|
||||||
import com.ruoyi.system.operLog.domain.OperLog;
|
import com.ruoyi.system.operLog.domain.OperLog;
|
||||||
import com.ruoyi.system.operLog.domain.OperLogQuery;
|
import com.ruoyi.system.operLog.domain.OperLogQuery;
|
||||||
import com.ruoyi.system.operLog.domain.OperLogVO;
|
import com.ruoyi.system.operLog.domain.OperLogVO;
|
||||||
|
@ -80,6 +81,9 @@ public class OperLogServiceImpl implements OperLogService
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int batchInsert(List<OperLog> list) {
|
public int batchInsert(List<OperLog> list) {
|
||||||
|
if (CollectionUtils.isEmptyElement(list)) {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
return operLogMapper.batchInsert(list);
|
return operLogMapper.batchInsert(list);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user