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;

}

相关推荐
于眠牧北3 天前
MySQL的锁类型,表锁,行锁,MVCC中所使用的临键锁
mysql
Turnip12024 天前
深度解析:为什么简单的数据库"写操作"会在 MySQL 中卡住?
后端·mysql
加号35 天前
windows系统下mysql多源数据库同步部署
数据库·windows·mysql
シ風箏5 天前
MySQL【部署 04】Docker部署 MySQL8.0.32 版本(网盘镜像及启动命令分享)
数据库·mysql·docker
WeiXin_DZbishe5 天前
基于django在线音乐数据采集的设计与实现-计算机毕设 附源码 22647
javascript·spring boot·mysql·django·node.js·php·html5
爱可生开源社区5 天前
MySQL 性能优化:真正重要的变量
数据库·mysql
小马爱打代码5 天前
MySQL性能优化核心:InnoDB Buffer Pool 详解
数据库·mysql·性能优化
风流 少年5 天前
mysql mcp
数据库·mysql·adb
西门吹雪分身5 天前
mysql之数据离线迁移
数据库·mysql
轩情吖5 天前
MySQL初识
android·数据库·sql·mysql·adb·存储引擎