From 83752b2f11ff06d2ab9ee2b5c04d079b3e1f664f Mon Sep 17 00:00:00 2001 From: chenyouting <514333061@qq.com> Date: Thu, 19 Mar 2026 13:25:11 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8Dbug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/fuyuanshen/app/controller/AppVideoController.java | 4 ++++ .../mqtt/receiver/RegisEquipReceiverMessageHandler.java | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/fys-admin/src/main/java/com/fuyuanshen/app/controller/AppVideoController.java b/fys-admin/src/main/java/com/fuyuanshen/app/controller/AppVideoController.java index 71d7ced7..b536c2ef 100644 --- a/fys-admin/src/main/java/com/fuyuanshen/app/controller/AppVideoController.java +++ b/fys-admin/src/main/java/com/fuyuanshen/app/controller/AppVideoController.java @@ -8,6 +8,7 @@ import com.fuyuanshen.app.domain.dto.TextToSpeechRequest; import com.fuyuanshen.app.service.AudioProcessService; import com.fuyuanshen.app.service.VideoProcessService; import com.fuyuanshen.common.core.domain.R; +import com.fuyuanshen.common.core.utils.StringUtils; import com.fuyuanshen.common.idempotent.annotation.RepeatSubmit; import com.fuyuanshen.common.web.core.BaseController; import com.fuyuanshen.equipment.domain.vo.AppFileVo; @@ -100,6 +101,9 @@ public class AppVideoController extends BaseController { if (request.getDeviceId() == null) { return R.fail("设备ID不能为空"); } + if (StringUtils.isBlank(request.getText())) { + return R.fail("文本不能为空"); + } String result = audioProcessService.textToSpeech( request.getDeviceId(), diff --git a/fys-admin/src/main/java/com/fuyuanshen/global/mqtt/receiver/RegisEquipReceiverMessageHandler.java b/fys-admin/src/main/java/com/fuyuanshen/global/mqtt/receiver/RegisEquipReceiverMessageHandler.java index 660ebfa8..487f9cd5 100644 --- a/fys-admin/src/main/java/com/fuyuanshen/global/mqtt/receiver/RegisEquipReceiverMessageHandler.java +++ b/fys-admin/src/main/java/com/fuyuanshen/global/mqtt/receiver/RegisEquipReceiverMessageHandler.java @@ -111,7 +111,7 @@ public class RegisEquipReceiverMessageHandler implements MessageHandler { log.warn("Device already exists for IMEI: {}", imei); String redisKey = GlobalConstants.GLOBAL_REDIS_KEY + DEVICE_KEY_PREFIX + imei + ":regis"; - String value = RedisUtils.getCacheObject(redisKey); + Object value = RedisUtils.getCacheObject(redisKey); if (value != null) { log.warn("regis/imei发送次数频率过快: {}", imei); return;