yeg
2026-08-27 65ba1bb7615d5c900cff9c18995ad99e3a73d11a
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/TBatteryGroupFieldServiceImpl.java
@@ -2,6 +2,7 @@
import java.util.Date;
import java.util.List;
import java.util.Set;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
@@ -21,7 +22,7 @@
{
    private static final String NORMAL = "0";
    private static final String DISABLED = "1";
    private static final String TEXT = "text";
    private static final Set<String> SUPPORTED_FIELD_TYPES = Set.of("text", "number", "time", "remark");
    @Autowired
    private TBatteryGroupFieldMapper batteryGroupFieldMapper;
@@ -147,9 +148,9 @@
        {
            throw new ServiceException("字段类型不能为空");
        }
        if (!TEXT.equals(field.getFieldType()))
        if (!SUPPORTED_FIELD_TYPES.contains(field.getFieldType()))
        {
            throw new ServiceException("字段类型仅支持text(文字)");
            throw new ServiceException("字段类型仅支持text、number、time或remark");
        }
        if (field.getRemark() != null && field.getRemark().length() > 500)
        {