为了账号安全,请及时绑定邮箱和手机立即绑定

哪位大神帮我看看 下面代码那有错误

<?xml version="1.0" encoding="UTF-8"?>

<!DOCTYPE mapper

PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"

"http://mybatis.org/dtd/mybatis-3-mapper.dtd">

<mapper namespace="org.seckill.dao.SeckillDao">

<!-- 目的:为dao接口方法提供sql语句配置 -->

<update id="reduceNumber">

<!-- 具体sql -->

update

seckillId

set

number = number - 1

where seckill_id = #{seckillId}

and start_time <![CDATA[ <= ]] #{killTime},

and end_time >= #{killTime}

and number > 0;

</update>

<select id="queryById" resultType="Seckill" parameterType="long">

select seckill_id,name,number,start_time,end_time,create_time

from seckill

where seckill_id =#{seckillId}

</select>

<select id ="querAll" resultType="Seckill">

select seckill_id,name,number,start_time,end_time,create_time

from seckill

oder by create_time desc

limit #{offset},#{limit}

</select>

</mapper>


正在回答

2 回答

and start_time <![CDATA[ <= ]] #{killTime},

这个应该是and start_time <![CDATA[ <= ]]> #{killTime}

3 回复 有任何疑惑可以回复我~

and start_time <![CDATA[ <= ]] #{killTime},  后面不要加逗号,有 and连接符的

2 回复 有任何疑惑可以回复我~

举报

0/150
提交
取消

哪位大神帮我看看 下面代码那有错误

我要回答 关注问题
意见反馈 帮助中心 APP下载
官方微信