Esempio n. 1
0
 @Test
 public void testReduceNumber() throws Exception {
   //      Java没有保存形参的记录:QueryAll(int offset,int limit)->QueryAll(arg0,arg1);
   //      因为java形参的问题,多个基本类型参数的时候需要用@Param("seckillId")注解区分开来
   List<Seckill> seckills = seckillDao.queryAll(0, 100);
   for (Seckill seckill : seckills) {
     System.out.println(seckill);
   }
 }
Esempio n. 2
0
 @Test
 public void testQueryAll() throws Exception {
   Date killTime = new Date();
   int updateCount = seckillDao.reduceNumber(1000L, killTime);
   System.out.println("updateCount:  " + updateCount);
 }
Esempio n. 3
0
 @Test
 public void testQueryById() throws Exception {
   long id = 1000;
   Seckill seckill = seckillDao.queryById(id);
   System.out.println(seckill);
 }