| | |
| | | public class FieldsUtils { |
| | | |
| | | /** |
| | | * @author Ryan |
| | | * @description 通过字段唯一标识获取动态字段对象key-value |
| | | * @param |
| | | * @return 扩展字段对象 |
| | | * @author Ryan |
| | | * @description 通过字段唯一标识获取动态字段对象key-value |
| | | * @time 2025/3/12 12:50 |
| | | */ |
| | | public static Map<String, String> getFields(String uuid) { |
| | |
| | | } |
| | | |
| | | /** |
| | | * @author Ryan |
| | | * @description 获取集合扩展字段key-value值 |
| | | * @param |
| | | * @return 包含扩展字段的集合对象 |
| | | * @author Ryan |
| | | * @description 获取集合扩展字段key-value值 |
| | | * @time 2025/3/15 15:05 |
| | | */ |
| | | public static List<Map<String, Object>> getExtendFields(List<Map<String, Object>> params) { |
| | |
| | | |
| | | /** |
| | | * 获取所有开启动态扩展字段 |
| | | * |
| | | * @return |
| | | */ |
| | | public static List<Fields> getFieldsSta() { |
| | |
| | | } |
| | | |
| | | /** |
| | | * @author Ryan |
| | | * @description 动态字段修改 |
| | | * @param |
| | | * @return |
| | | * @author Ryan |
| | | * @description 动态字段修改 |
| | | * @time 2025/4/7 15:28 |
| | | */ |
| | | @Synchronized |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public static void updateFieldsValue(Map<String, Object> params) throws Exception { |
| | | List<Fields> fields = getFieldsSta(); |
| | | if (fields.isEmpty()) { return; } |
| | | if (fields.isEmpty()) { |
| | | return; |
| | | } |
| | | Object fieldsIndex = params.get("fieldsIndex"); |
| | | if (!Objects.isNull(fieldsIndex) && StringUtils.isNotBlank(fieldsIndex.toString())) { |
| | | String index = fieldsIndex.toString(); |