target/biyesheji/WEB-INF/classes/mapper/ProductMapper.xml

(开头部分) 7KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

<?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.byh.biyesheji.dao.ProductMapper" >

  <select id="randFive" resultType="com.byh.biyesheji.pojo.Product">
    SELECT * FROM product ORDER BY rand() LIMIT 5
  </select>

  <update id="enableStatus" parameterType="java.lang.String">
     update product set status = 1 where name = #{name}
  </update>

  <update id="stopStatus" parameterType="java.lang.String">
     update product set status = 0 where name = #{name}
  </update>

  <update id="setImageUrl" parameterType="com.byh.biyesheji.pojo.ProductVO">
     update product set imageurl=#{imageUrl} where id = #{id}
  </update>

  <resultMap id="BaseResultMap" type="com.byh.biyesheji.pojo.Product" >
    <id column="id" property="id" jdbcType="INTEGER" />
    <result column="name" property="name" jdbcType="VARCHAR" />
    <result column="price" property="price" jdbcType="REAL" />
    <result column="zan" property="zan" jdbcType="INTEGER" />
    <result column="number" property="number" jdbcType="INTEGER" />
    <result column="status" property="status" jdbcType="INTEGER" />
    <result column="imageurl" property="imageurl" jdbcType="VARCHAR" />
    <result column="miaoshu" property="miaoshu" jdbcType="VARCHAR" />
    <result column="cid" property="cid" jdbcType="INTEGER" />
    <result column="bid" property="bid" jdbcType="BIGINT" />
  </resultMap>
  <sql id="Example_Where_Clause" >
    <where >
      <foreach collection="oredCriteria" item="criteria" separator="or" >
        <if test="criteria.valid" >
          <trim prefix="(" suffix=")" prefixOverrides="and" >
            <foreach collection="criteria.criteria" item="criterion" >
              <choose >
                <when test="criterion.noValue" >
                  and ${criterion.condition}
                </when>
                <when test="criterion.singleValue" >
                  and ${criterion.condition} #{criterion.value}
                </when>
                <when test="criterion.betweenValue" >
                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
                </when>
                <when test="criterion.listValue" >
                  and ${criterion.condition}
                  <foreach collection="criterion.value" item="listItem" open="(" close=")" separator="," >
                    #{listItem}
                  </foreach>
                </when>
              </choose>
            </foreach>
          </trim>
        </if>
      </foreach>
    </where>
后面还有 145 行代码,购买后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明

AI 解读 AI

登录后可用,每次 10 算力,解读结果公开显示在下面。

还没有人解读过这个文件。