要注意,create is deprecated in maven 3.0.5 and beyond,在maven3.0.5以上版本舍弃了create,使用generate生成项目
2016-11-13
oracle代替mysql limit的语句:
select * from
(select rownum r,t.* from
(select seckill_id, name, quantity, start_time, end_time, create_time
from seckill
order by create_time desc) t where rownum <![CDATA[<=]]> (#{offset}+#{limit}))
where r <![CDATA[>=]]> #{offset}
test前还在想这样会不会报错,结果发现这条可以用,哈。
select * from
(select rownum r,t.* from
(select seckill_id, name, quantity, start_time, end_time, create_time
from seckill
order by create_time desc) t where rownum <![CDATA[<=]]> (#{offset}+#{limit}))
where r <![CDATA[>=]]> #{offset}
test前还在想这样会不会报错,结果发现这条可以用,哈。
2016-11-10
queryByIdWithSeckill(long seckillId)这个接口少参数,数据库联合主键seckill_Id和user_phone唯一,要是返回一个对象,需要两个参数。要不一旦多个用户秒杀同一个商品,这个方法就炸了。返回的应该是多个对象
2016-11-10