mysql 字段类型为json,后端用list接收

数据库

board` jsonDEFAULT NULL COMMENT '信息,格式[{"name":"net","chip":"esp32","hdVer":1}]'

接收-List

Mybatis

<resultMap id="productDeviceAndBrand" type="com.charg.product.domain.vo.ProductDeviceOperationsVo">

<result property="brandId" column="brand_id"/>

<result property="brandName" column="brand_name"/>

<result property="productName" column="product_name"/>

<result property="productCode" column="product_code"/>

<result property="deviceNum" column="device_num"/>

<result property="netFirmVer" column="net_firm_ver"/>

<result property="appFirmVer" column="app_firm_ver"/>

<result property="mcbFirmVer" column="mcb_firm_ver"/>

<result property="uiFirmVer" column="ui_firm_ver"/>
<result property="board" column="board" javaType="java.util.List"
typeHandler="com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler"/>

<result property="status" column="status"/>

<result property="productTime" column="product_time"/>

<result property="bindTime" column="bind_time"/>

</resultMap>

实体类

@Data

@EqualsAndHashCode(callSuper = false)

public class ProductDeviceOperationsVo extends BaseEntity {

private String brandId;

private String brandName;

private List<Map<String, Object>> board;

}

相关推荐
ZTLJQ5 小时前
序列化的艺术:Python JSON处理完全解析
开发语言·python·json
身如柳絮随风扬6 小时前
MySQL核心知识
数据库·mysql
551只玄猫6 小时前
【数据库原理 实验报告1】创建和管理数据库
数据库·sql·学习·mysql·课程设计·实验报告·数据库原理
q5431470877 小时前
MySQL SQL100道基础练习题
数据库·mysql
zhoupenghui1687 小时前
mysql 中如果条件where中有or,则要求or两边的字段都必须有索引,否则不能用到索引, 为什么?
数据库·mysql·索引
eggwyw8 小时前
完美解决phpstudy安装后mysql无法启动
数据库·mysql
java修仙传9 小时前
MySQL 事务隔离级别详解
数据库·mysql·oracle
Irissgwe9 小时前
MySQL存储过程和触发器专题
数据库·mysql·oracle
skiy11 小时前
MySQL Workbench菜单汉化为中文
android·数据库·mysql
创世宇图11 小时前
Alibaba Cloud Linux 安装生产环境-mysql
linux·mysql