06 2017 档案

摘要:mybatis 中 insertSelective(example) 语句默认返回并不是 插入记录的主键。 我们可以考虑插入记录主键不直接作为 函数的返回值, 而是体现在改变函数参数 "example", 使其主键等于插入记录的主键。 在insertSelective xml定义中,加入以下代码: 阅读全文
posted @ 2017-06-29 08:58 glorythesky 阅读(1548) 评论(0) 推荐(0)
摘要:1. 表名和属性名 按照 规范 应该加反引号``(就是键盘上esc键下面,"1"键左边的那一个), 否则如果字段中出现某些关键字, 会引起歧义并报错。 例如: insert into `onlineshop_transferorder` ( from, to, relateId, total, pr 阅读全文
posted @ 2017-06-28 15:09 glorythesky 阅读(373) 评论(0) 推荐(0)
只有注册用户登录后才能阅读该文。
posted @ 2017-06-28 13:28 glorythesky 阅读(3) 评论(0) 推荐(0)
摘要:网上搜索了一下,方法集中在两种: 1. Window->Preferences->Java->Editor->Hovers 将[Variable Values]选择即可,如果[Combined Hover]已经勾选,取消并勾选[Variable Values] 2. 右击工程->properties 阅读全文
posted @ 2017-06-15 21:24 glorythesky 阅读(7150) 评论(0) 推荐(0)
摘要:前些天在做一个数据统计的项目,其中需要取得某特定日(天)的数据,语句大致如下: select * from 表1 where from_unixtime(某时间戳) between '2017-01-01' and '2017-01-01' 查询结果为空,但实际登录mysql服务器查看记录发现,20 阅读全文
posted @ 2017-06-15 16:06 glorythesky 阅读(1833) 评论(0) 推荐(0)