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

@@ -7,6 +7,7 @@ import com.fastbee.common.enums.ServerType;
import com.fastbee.common.enums.ThingsModelType;
import com.fastbee.common.enums.TopicType;
import com.fastbee.common.exception.ServiceException;
import com.fastbee.common.utils.MessageUtils;
import com.fastbee.common.utils.gateway.mq.TopicsUtils;
import com.fastbee.iot.domain.Device;
import com.fastbee.iot.service.IDeviceService;
@@ -81,7 +82,7 @@ public class DeviceReportMessageServiceImpl implements IDeviceReportMessageServi
public Device buildReport(DeviceReportBo bo) {
String serialNumber = topicsUtils.parseSerialNumber(bo.getTopicName());
Device device = deviceService.selectDeviceBySerialNumber(serialNumber);
Optional.ofNullable(device).orElseThrow(() -> new ServiceException("设备不存在"));
Optional.ofNullable(device).orElseThrow(() -> new ServiceException(MessageUtils.message("device.not.exist")));
//设置物模型
String thingsModel = topicsUtils.getThingsModel(bo.getTopicName());
ThingsModelType thingsModelType = ThingsModelType.getType(thingsModel);

View File

@@ -5,6 +5,7 @@ import com.fastbee.common.core.domain.entity.SysRole;
import com.fastbee.common.core.domain.entity.SysUser;
import com.fastbee.common.exception.ServiceException;
import com.fastbee.common.utils.DateUtils;
import com.fastbee.common.utils.MessageUtils;
import com.fastbee.iot.domain.Device;
import com.fastbee.iot.mapper.DeviceMapper;
import com.fastbee.sip.domain.MediaServer;
@@ -143,7 +144,7 @@ public class MediaServerServiceImpl implements IMediaServerService {
// }
// }
if (null == user.getDeptId()) {
throw new ServiceException("只允许租户配置");
throw new ServiceException(MessageUtils.message("only.allow.tenant.config"));
}
if (!isAdmin(user.getUserId())) {
mediaServer.setIsSys(0);