mybatis-plus icon indicating copy to clipboard operation
mybatis-plus copied to clipboard

JSON字段分页查询出错

Open btbox opened this issue 2 years ago • 5 comments

版本:3.5.1

MySQL字段是 json字段,分页查询的时候出错

image

image

image

报错信息

Error instantiating class com.ht.mediacenter.work.chat.entity.MediaTaskImGroupMessage with invalid types (String,String,String,String,Integer,Integer,JSONObject,String,Date,String,Date) or values (1539061596989444097,e9ca23d68d884d4ebb19d07889727dae,1,null,4,0,{"fileName": "", "filePath": "", "fileSize": 96545798, "fileSuffix": "mp4"},admin,Tue Jun 21 09:44:14 CST 2022,null,null). Cause: java.lang.IllegalArgumentException: argument type mismatch

btbox avatar Jun 23 '22 02:06 btbox

代码呢?

miemieYaho avatar Jun 23 '22 06:06 miemieYaho

@miemieYaho image

btbox avatar Jun 23 '22 06:06 btbox

jsontypehandler是认的数据库字段类型为 varchar

miemieYaho avatar Jun 23 '22 07:06 miemieYaho

@miemieYaho 那我数据库字段为json应该如何操作呢

btbox avatar Jun 23 '22 07:06 btbox

自己写typehandler

miemieYaho avatar Jun 23 '22 08:06 miemieYaho

up

qmdx avatar Dec 23 '22 07:12 qmdx