Parameter type JsonElement is not supported 返回
版本:5.1.4.169
表结构:
public class sys_lang
{
[SugarColumn(IsPrimaryKey = true, Length = 36)]
public string vc_id { get; set; }
/// <summary>
/// zh(简体中文):zh-TW(繁体中文)、en(英语)、ja(日语)、ko(韩语)、fr(法语)、es(西班牙语)、it(意大利语)、de(德语)、tr(土耳其语)
/// ru(俄语)、pt(葡萄牙语)、vi(越南语)、id(印尼语)、th(泰语)、ms(马来语)
/// </summary>
[SugarColumn(IsPrimaryKey = true, Length = 3)]
public string vc_lang { get; set; }
/// <summary>
/// 隶属于哪个编号,公有用0标识,查询的时候优先使用他自身的的数据
/// </summary>
[SugarColumn(IsPrimaryKey = true, Length = 5, DefaultValue = "0")]
public string? vc_company { get; set; }
/// <summary>
/// 属于哪个模块,对用户上传有效
/// </summary>
[SugarColumn(Length = 20, DefaultValue = "common")]
public string vc_type { get; set; }
[SugarColumn(ColumnDataType = "text")]
public string vc_zh { get; set; }
[SugarColumn(ColumnDataType = "text")]
public string? vc_ex { get; set; }
///<summary>
/// 首次提交为1 后续每修改一次加1
///</summary>
[SugarColumn(Length = 11, DefaultValue = "0", IsOnlyIgnoreInsert = true)]
public int i_dataver { get; set; }
/// <summary>
/// 加入时间
/// </summary>
public DateTime? dt_create { get; set; }
}
dic 内容:
{
"vc_id": "0022ce5c90deb4f4ddb2441ad32e9f17",
"vc_lang": "en",
"vc_company": "30000",
"vc_type": "房态",
"vc_zh": "按房型",
"vc_ex": "siyou"
}
db.Updateable(cmdinfo.dic).AS("sys_lang").WhereColumns("vc_id","vc_lang","vc_company").ExecuteCommand();
控制台输出:
[Sql]:UPDATE `sys_lang` SET
`vc_ex`=@vc_ex,`vc_type`=@vc_type,`vc_zh`=@vc_zh WHERE `vc_id`=@vc_id AND `vc_lang`=@vc_lang AND `vc_company
`=@vc_company
[Pars]:
[Name]:@vc_company [Value]:30000 [Type]:AnsiString
[Name]:@vc_ex [Value]:siyou [Type]:AnsiString
[Name]:@vc_id [Value]:0022ce5c90deb4f4ddb2441ad32e9f17 [Type]:AnsiString
[Name]:@vc_lang [Value]:en [Type]:AnsiString
[Name]:@vc_type [Value]:房态 [Type]:AnsiString
[Name]:@vc_zh [Value]:按房型 [Type]:AnsiString
报错内容:
Parameter type JsonElement is not supported; see https://fl.vu/mysql-param-type. Value: siyou
热忱回答(2)
-
fate sta VIP01周前
cmdinfo.dic 这个字典的value有问题
0 回复 -
fate sta VIP01周前
你可能用的序列化把value变成了jsonelemet
0 回复