數(shù)據庫
board` json DEFAULT 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>文章來源:http://www.zghlxwxcb.cn/news/detail-845864.html
實體類
@Data
@EqualsAndHashCode(callSuper = false)
public class ProductDeviceOperationsVo extends BaseEntity {
????????private String brandId;
????????private String brandName;
????????private List<Map<String, Object>> board;
}文章來源地址http://www.zghlxwxcb.cn/news/detail-845864.html
到了這里,關于mysql 字段類型為json,后端用list接收的文章就介紹完了。如果您還想了解更多內容,請在右上角搜索TOY模板網以前的文章或繼續(xù)瀏覽下面的相關文章,希望大家以后多多支持TOY模板網!