测试用例udpdate 这部分跑不出来,不知道是什么原因
<update id="reduceNumber">
update
seckill
set
number = number -1
and
where seckill_id = #{seckillId}
and start_time <![CDATA[ <= ]]> #{killTime}
and end_time >= #{killTime}
and number > 0;
</update>
接口:int reduceNumber(@Param("seckillId")long seckillId,@Param("killTime")Date killTime);
测试:
@Test
public void testReduceNumber() {
Date killTime = new Date();
int updateCount = seckillDao.reduceNumber(4, killTime);
System.out.println("updateCount: " + updateCount);
}
报错:
Milkyway0
慕无忌5301941
相关分类