From 1abf528d608c49f6a78636cd200464040a6cd5c6 Mon Sep 17 00:00:00 2001 From: 18650502300 <18650502300@163.com> Date: Tue, 28 May 2024 17:33:11 +0800 Subject: [PATCH] =?UTF-8?q?1.=E4=BD=8E=E7=94=B5=E9=87=8F=E4=B8=8D=E5=BE=97?= =?UTF-8?q?=E9=AA=91=E8=A1=8C=E5=88=A4=E6=96=AD=202.=E4=BD=8E=E7=94=B5?= =?UTF-8?q?=E9=87=8F=E8=87=AA=E5=8A=A8=E7=94=9F=E6=88=90=E6=8D=A2=E7=94=B5?= =?UTF-8?q?=E5=B7=A5=E5=8D=95=EF=BC=8C=E9=80=BB=E8=BE=91=E7=A7=BB=E5=88=B0?= =?UTF-8?q?=E5=BF=83=E8=B7=B3=E9=80=BB=E8=BE=91=E4=B8=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/app/AppVerifyController.java | 4 + .../iot/receive/ReceiveController.java | 57 ++++++++++++-- .../ruoyi/common/utils/SendAliSmsUtil.java | 1 - .../system/service/IAsDeviceService.java | 5 ++ .../service/impl/AsDeviceServiceImpl.java | 76 ++++--------------- 5 files changed, 75 insertions(+), 68 deletions(-) diff --git a/electripper-admin/src/main/java/com/ruoyi/web/controller/app/AppVerifyController.java b/electripper-admin/src/main/java/com/ruoyi/web/controller/app/AppVerifyController.java index 9a9b4ed..be2f67f 100644 --- a/electripper-admin/src/main/java/com/ruoyi/web/controller/app/AppVerifyController.java +++ b/electripper-admin/src/main/java/com/ruoyi/web/controller/app/AppVerifyController.java @@ -148,6 +148,10 @@ public class AppVerifyController extends BaseController if(!asUserService.checkIsDeposit(order.getUserId())){ return error("您还未充值押金,请先充值押金"); } + //低电量不得骑行判断 + if(asDeviceService.isLowBattery(order.getSn())){ + return error("低电量不得骑行"); + } OrderResponse orderResponse =asDeviceService.snSwitch(order); return success(orderResponse); } diff --git a/electripper-admin/src/main/java/com/ruoyi/web/controller/iot/receive/ReceiveController.java b/electripper-admin/src/main/java/com/ruoyi/web/controller/iot/receive/ReceiveController.java index 5fcc438..f1dabff 100644 --- a/electripper-admin/src/main/java/com/ruoyi/web/controller/iot/receive/ReceiveController.java +++ b/electripper-admin/src/main/java/com/ruoyi/web/controller/iot/receive/ReceiveController.java @@ -4,16 +4,17 @@ import cn.hutool.core.util.ObjectUtil; import com.alibaba.fastjson2.JSON; import com.alibaba.fastjson2.JSONObject; import com.ruoyi.common.constant.IotConstants; +import com.ruoyi.common.constant.ServiceConstants; +import com.ruoyi.common.core.domain.entity.SysUser; import com.ruoyi.common.exception.ServiceException; import com.ruoyi.common.utils.CommonUtil; import com.ruoyi.common.utils.onenet.Token; +import com.ruoyi.common.utils.uuid.IdUtils; import com.ruoyi.system.domain.AsDevice; +import com.ruoyi.system.domain.EtAdminOrder; import com.ruoyi.system.domain.EtModel; import com.ruoyi.system.domain.EtOperatingArea; -import com.ruoyi.system.mapper.AsDeviceMapper; -import com.ruoyi.system.service.IAsDeviceService; -import com.ruoyi.system.service.IEtModelService; -import com.ruoyi.system.service.IEtOperatingAreaService; +import com.ruoyi.system.service.*; import com.ruoyi.web.controller.iot.domain.BodyObj; import com.ruoyi.web.controller.iot.domain.LogEntry; import com.ruoyi.web.controller.iot.util.Util; @@ -52,6 +53,13 @@ public class ReceiveController { @Resource private IEtOperatingAreaService etOperatingAreaService; + @Autowired + private IEtAdminOrderService etAdminOrderService; + + @Autowired + private ISysUserService sysUserService; + + /** * 功能描述:第三方平台数据接收。

*