|
@@ -5,10 +5,12 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
|
import com.xy.collections.list.JArrayList;
|
|
|
import com.xy.collections.map.JMap;
|
|
|
import com.xy.dto.CommandMqtt;
|
|
|
+import com.xy.dto.DeviceChangeStatusDTO;
|
|
|
import com.xy.dto.MercMiniDeviceDto;
|
|
|
import com.xy.entity.DeviceInfo;
|
|
|
+import com.xy.service.AlipayDeviceService;
|
|
|
import com.xy.service.DeviceInfoServiceImpl;
|
|
|
-import com.xy.utils.FunctionUtils;
|
|
|
+import com.xy.utils.AuthorizeUtils;
|
|
|
import com.xy.utils.R;
|
|
|
import com.xy.utils.enums.DictSonEnum;
|
|
|
import lombok.AllArgsConstructor;
|
|
@@ -29,6 +31,8 @@ public class AliPayAspet {
|
|
|
|
|
|
private DeviceInfoServiceImpl deviceInfoService;
|
|
|
|
|
|
+ private AlipayDeviceService alipayDeviceService;
|
|
|
+
|
|
|
/**
|
|
|
* 支付宝设备
|
|
|
*
|
|
@@ -96,9 +100,9 @@ public class AliPayAspet {
|
|
|
result.add(commandMqtt);
|
|
|
return;
|
|
|
}
|
|
|
- //todo 发送支付宝设备重启请求
|
|
|
+ //发送支付宝设备重启请求
|
|
|
if (data.getStr("type").equals("app") && data.getStr("task").equals("restart")) {
|
|
|
- log.info("支付宝设备重启:{}", deviceInfo.getDeviceId());
|
|
|
+ alipayDeviceService.deviceReboot(deviceInfo.getDistrictId().toString());
|
|
|
}
|
|
|
});
|
|
|
return result;
|
|
@@ -126,8 +130,12 @@ public class AliPayAspet {
|
|
|
.setBusyState(busySate.getBusyState())
|
|
|
.setFreezeStatus(busySate.getBusyState());
|
|
|
deviceInfoService.updateById(updateDeviceInfo);
|
|
|
- //todo 发送支付宝设备修改运营状态请求
|
|
|
-
|
|
|
+ //发送支付宝设备修改运营状态请求
|
|
|
+ DeviceChangeStatusDTO deviceChangeStatusDTO = new DeviceChangeStatusDTO()
|
|
|
+ .setTerminalId(String.valueOf(deviceId))
|
|
|
+ .setOperatorId(AuthorizeUtils.getLoginId(String.class))
|
|
|
+ .setStatus(busySate.getBusyState());
|
|
|
+ alipayDeviceService.changeStatus(deviceChangeStatusDTO);
|
|
|
return false;
|
|
|
}
|
|
|
}
|