feat(国际化): 新增国际化

This commit is contained in:
gx_ma
2026-03-24 11:41:41 +08:00
parent abe46baf18
commit e70c198071
97 changed files with 10802 additions and 5302 deletions

View File

@@ -2,6 +2,7 @@ package com.fastbee.common;
import com.fastbee.common.core.iot.response.DeCodeBo;
import com.fastbee.common.exception.ServiceException;
import com.fastbee.common.utils.MessageUtils;
import com.fastbee.common.utils.gateway.CRC16Utils;
import io.netty.buffer.ByteBufUtil;
import lombok.extern.slf4j.Slf4j;
@@ -21,7 +22,7 @@ public class ProtocolDeCodeService {
public String protocolDeCode(DeCodeBo bo) {
if (null == bo) {
throw new ServiceException("输入内容为空");
throw new ServiceException(MessageUtils.message("protocol.input.content.is.empty"));
}
String payload = bo.getPayload();
/*1-解析 2-读指令 3-写指令 4-CRC生成 5-CRC校验*/

View File

@@ -10,6 +10,7 @@ import com.fastbee.common.core.thingsModel.ThingsModelSimpleItem;
import com.fastbee.common.core.thingsModel.ThingsModelValuesInput;
import com.fastbee.common.exception.ServiceException;
import com.fastbee.common.utils.DateUtils;
import com.fastbee.common.utils.MessageUtils;
import com.fastbee.iot.model.ThingsModels.ValueItem;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;
@@ -45,7 +46,7 @@ public class JsonProtocolService {
reportMessage.setSerialNumber(clientId);
return reportMessage;
}catch (Exception e){
throw new ServiceException("数据解析异常"+e.getMessage());
throw new ServiceException(MessageUtils.message("protocol.data.parse.exception", e));
}
}