build/classes/com/yh/mapper/ProductMapper.xml
(完整代码) 1KB<?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="com.yh.mapper.ProductMapper">
<select id="selAll" resultType="product">
select * from t_product
</select>
<delete id="delAll" parameterType="ProductVo">
delete from t_product
<where>
<if test="ids != null">
<foreach collection="ids" open="and (" close=")" item="item_id" separator="or">
id = #{item_id}
</foreach>
</if>
</where>
</delete>
<insert id="insert" parameterType="product">
<selectKey keyProperty="id" order="AFTER" resultType="int">
select LAST_INSERT_ID()
</selectKey>
insert into t_product (productnum,productname,cityname,departuretime,
productprice,productdesc,productstatus) values (#{productnum},#{productname},
#{cityname},#{departuretime},#{productprice},#{productdesc},#{productstatus})
</insert>
<delete id="delete" parameterType="int">
delete from t_product where id=#{id}
</delete>
<select id="selId" parameterType="int" resultType="product">
select * from t_product where id=#{id}
</select>
<update id="update" parameterType="product">
update t_product set productnum=#{productnum},productname=#{productname},cityname=#{cityname},departuretime=#{departuretime},
productprice=#{productprice},productdesc=#{productdesc},productstatus=#{productstatus} where id=#{id}
</update>
<select id="fenYe" parameterType="Page" resultType="Product">
select * from t_product where productName like '%${mohu}%' limit #{xb},#{pageSize}
</select>
<select id="getCount" resultType="int">
select count(*) from t_product
</select>
</mapper>
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。