mysql 1364 hy000_mysql SQL Error: 1364, SQLState: HY000 保存错误
发布日期:2021-06-24 16:40:15 浏览次数:5 分类:技术文章

本文共 1429 字,大约阅读时间需要 4 分钟。

OrderForm orderForm = new OrderForm();

orderForm.setAddIp((String) map.get("ip"));// ip

orderForm.setAddTime(new Date());// 日期

orderForm.setOrderStatus(10);// 订单状态

orderForm.setAddUserId((long) map.get("addUserId"));

orderForm.setOrderType((byte) 0);// 下单方式

orderForm.setInvoiceType(0);

SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMddHHmmssSSS"); // 时间格式精确到毫秒

String code = sdf.format(System.currentTimeMillis()); // 获得时间戳(毫秒)

orderForm.setOrderCode(map.get("userId") + code);// 订单号

orderForm.setMsg(storeAndGoodsVos.get(i).getMsg());

orderForm.setUserId((Long) map.get("userId"));

orderForm.setStoreId(storeAndGoodsVos.get(i).getStoreId());

orderForm.setTotalPrice((BigDecimal) map.get("totalPrice"));

orderForm.setOriginalPrice((BigDecimal) map.get("originalPrice"));

Address address = addressDao.findById((Long) map.get("addrId"));

Area area = new Area();

if (null != address) {

if (null != address.getArea()) {

area = address.getArea().getAreaByParentId();

}

}

orderForm.setAddress(address);

orderForm.setShopEvaluate(0);

orderForm.setIsDelete(false);

orderFormDao.save(orderForm);

if (orderForm.getOrderId() > 0) {

保存后报错 Field 'select TABLE_NAME

from information_schema.COLUMNS

is_delete' doesn't have a default value 但是我数据库表有is_delete字段 默认为0 实体类注解配置好了@Column(name = "is_delete")

public Boolean getIsDelete() {

return this.isDelete;

}

public void setIsDelete(Boolean isDelete) {

this.isDelete = isDelete;

}

之前好用 突然不好用了

转载地址:https://blog.csdn.net/weixin_33910305/article/details/113259026 如侵犯您的版权,请留言回复原文章的地址,我们会给您删除此文章,给您带来不便请您谅解!

上一篇:mysqli拓展还能用mysql_最近在学习php,其中使用了MYSQLi扩展,注意是MYSQLi不是MYSQL(因PHP7已经不支持MYSQL扩展了)。...
下一篇:mysql 阿里云 添加磁盘空间_rds mysql磁盘空间包含

发表评论

最新留言

路过,博主的博客真漂亮。。
[***.116.15.85]2024年03月30日 00时12分48秒

关于作者

    喝酒易醉,品茶养心,人生如梦,品茶悟道,何以解忧?唯有杜康!
-- 愿君每日到此一游!

推荐文章

【汇编语言与计算机系统结构笔记13】简单的上机过程示例 2019-04-28
【李宏毅2020 ML/DL】P15 Why Deep- 2019-04-28
【Computer Organization笔记06】浮点数的数据表示,浮点数加减运算 2019-04-28
【李宏毅2020 ML/DL】P16 PyTorch Tutorial | 最后提及了 apex.amp 2019-04-28
【李宏毅2020 ML/DL】P17 Convolutional Neural Network 2019-04-28
【编译原理笔记06】语法分析,移入-归约分析:自底向上的分析,LR(0)分析法,LR(0)分析表的构建(基于自动机) 2019-04-28
【李宏毅2020 ML/DL】P18-19 Graph Neural Network | NN4G, DCNN, MoNet, GraphSAGE, GAT, GIN, ChedNet, GCN 2019-04-28
【李宏毅2020 ML/DL】P20-21 Recurrent Neural Network | “Deep and structure is future.“ 2019-04-28
【Computer Organization笔记07】实验课:可编程逻辑器件介绍,硬件编程方法与原则,硬件编程流程 2019-04-28
【李宏毅2020 ML/DL】P22 Unsupervised Learning - Word Embedding 2019-04-28
【李宏毅2020 ML/DL】P23 Transformer | Self-attention, Multi-head Self-attention 2019-04-28
【编译原理笔记07】语法分析:SLR、LR(1)、LALR、二义性分析与错误处理 2019-04-28
【李宏毅2020 ML/DL】P24 Semi-supervised 2019-04-28
【Computer Organization笔记08】指令系统概述,指令格式,寻址方式 2019-04-28
【李宏毅2020 ML/DL】P25 ELMO, BERT, GPT 2019-04-28
【Computer Organization笔记09】x86 / Pentium 指令系统,MIPS 指令系统,数据通路的设计,CPU设计思路 2019-04-28
【李宏毅2020 ML/DL】P26-33 Explainable ML 2019-04-28
【李宏毅2020 ML/DL】P34 More about explainable AI | Attribution, Heatmap, explainable model 2019-04-28
【Computer Organization笔记10】单周期CPU设计:基于7条MIPS指令的数据通路 2019-04-28
【李宏毅2020 ML/DL】P35-42 Attack ML Models 2019-04-28