thx / rap2-dolores

MIT License
610 stars 255 forks source link

接口导入 JSON 当值存在 null 的时候 type 是空的, 要重新选一遍才能传值给后端. #44

Closed MJorcen closed 6 years ago

MJorcen commented 6 years ago

示例数据: { "content": null, "message": "交易费率过低", "properties": {}, "status": 9002, "success": false }

"content": null 异常 sql

INSERT INTO Properties (id,scope,type,name,rule,value,parentId,priority,interfaceId,moduleId,repositoryId,createdAt,updatedAt) VALUES (DEFAULT,'response','Null','content','','123',-1,1524735754315,140,49,19,'2018-04-26 09:42:34','2018-04-26 09:42:34'); xxx POST /properties/update?itf=140 500 9ms -

SequelizeDatabaseError: Data truncated for column 'type' at row 1

Bosn commented 6 years ago

是预期的效果,因为类型定义暂时不支持null,所以自然就是空的。