【开源项目】基于springboot vue前后端分离的音乐网站源码

 源码下载地址:https://share.weiyun.com/83cKJL2m 这是微云,在qq里面可以打开,其他的有可能显示已被删除

 

 

 

 

 

 

 

 

<?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.shop.dao.ActivityMapper">
  <resultMap id="BaseResultMap" type="com.shop.entity.Activity">
    <id column="activityId" jdbcType="INTEGER" property="activityid" />
    <result column="activityName" jdbcType="VARCHAR" property="activityname" />
    <result column="activityDes" jdbcType="VARCHAR" property="activitydes" />
    <result column="discount" jdbcType="REAL" property="discount" />
    <result column="fullPrice" jdbcType="INTEGER" property="fullprice" />
    <result column="reducePrice" jdbcType="INTEGER" property="reduceprice" />
    <result column="fullNum" jdbcType="INTEGER" property="fullnum" />
    <result column="reduceNum" jdbcType="INTEGER" property="reducenum" />
  </resultMap>
  <sql id="Example_Where_Clause">
    <where>
      <foreach collection="oredCriteria" item="criteria" separator="or">
        <if test="criteria.valid">
          <trim prefix="(" prefixOverrides="and" suffix=")">
            <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 close=")" collection="criterion.value" item="listItem" open="(" separator=",">
                    #{listItem}
                  </foreach>
                </when>
              </choose>
            </foreach>
          </trim>
        </if>
      </foreach>
    </where>
  </sql>
  <sql id="Update_By_Example_Where_Clause">
    <where>
      <foreach collection="example.oredCriteria" item="criteria" separator="or">
        <if test="criteria.valid">
          <trim prefix="(" prefixOverrides="and" suffix=")">
            <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 close=")" collection="criterion.value" item="listItem" open="(" separator=",">
                    #{listItem}
                  </foreach>
                </when>
              </choose>
            </foreach>
          </trim>
        </if>
      </foreach>
    </where>
  </sql>
  <sql id="Base_Column_List">
    activityId, activityName, activityDes, discount, fullPrice, reducePrice, fullNum, 
    reduceNum
  </sql>
  <select id="selectByExample" parameterType="com.shop.entity.ActivityExample" resultMap="BaseResultMap">
    select
    <if test="distinct">
      distinct
    </if>
    <include refid="Base_Column_List" />
    from activity
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
    <if test="orderByClause != null">
      order by ${orderByClause}
    </if>
  </select>
  <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
    select 
    <include refid="Base_Column_List" />
    from activity
    where activityId = #{activityid,jdbcType=INTEGER}
  </select>
  <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
    delete from activity
    where activityId = #{activityid,jdbcType=INTEGER}
  </delete>
  <delete id="deleteByExample" parameterType="com.shop.entity.ActivityExample">
    delete from activity
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
  </delete>
  <insert id="insert" parameterType="com.shop.entity.Activity">
    insert into activity (activityId, activityName, activityDes, 
      discount, fullPrice, reducePrice, 
      fullNum, reduceNum)
    values (#{activityid,jdbcType=INTEGER}, #{activityname,jdbcType=VARCHAR}, #{activitydes,jdbcType=VARCHAR}, 
      #{discount,jdbcType=REAL}, #{fullprice,jdbcType=INTEGER}, #{reduceprice,jdbcType=INTEGER}, 
      #{fullnum,jdbcType=INTEGER}, #{reducenum,jdbcType=INTEGER})
  </insert>
  <insert id="insertSelective" parameterType="com.shop.entity.Activity">
    insert into activity
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="activityid != null">
        activityId,
      </if>
      <if test="activityname != null">
        activityName,
      </if>
      <if test="activitydes != null">
        activityDes,
      </if>
      <if test="discount != null">
        discount,
      </if>
      <if test="fullprice != null">
        fullPrice,
      </if>
      <if test="reduceprice != null">
        reducePrice,
      </if>
      <if test="fullnum != null">
        fullNum,
      </if>
      <if test="reducenum != null">
        reduceNum,
      </if>
    </trim>
    <trim prefix="values (" suffix=")" suffixOverrides=",">
      <if test="activityid != null">
        #{activityid,jdbcType=INTEGER},
      </if>
      <if test="activityname != null">
        #{activityname,jdbcType=VARCHAR},
      </if>
      <if test="activitydes != null">
        #{activitydes,jdbcType=VARCHAR},
      </if>
      <if test="discount != null">
        #{discount,jdbcType=REAL},
      </if>
      <if test="fullprice != null">
        #{fullprice,jdbcType=INTEGER},
      </if>
      <if test="reduceprice != null">
        #{reduceprice,jdbcType=INTEGER},
      </if>
      <if test="fullnum != null">
        #{fullnum,jdbcType=INTEGER},
      </if>
      <if test="reducenum != null">
        #{reducenum,jdbcType=INTEGER},
      </if>
    </trim>
  </insert>
  <select id="countByExample" parameterType="com.shop.entity.ActivityExample" resultType="java.lang.Long">
    select count(*) from activity
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
  </select>
  <update id="updateByExampleSelective" parameterType="map">
    update activity
    <set>
      <if test="record.activityid != null">
        activityId = #{record.activityid,jdbcType=INTEGER},
      </if>
      <if test="record.activityname != null">
        activityName = #{record.activityname,jdbcType=VARCHAR},
      </if>
      <if test="record.activitydes != null">
        activityDes = #{record.activitydes,jdbcType=VARCHAR},
      </if>
      <if test="record.discount != null">
        discount = #{record.discount,jdbcType=REAL},
      </if>
      <if test="record.fullprice != null">
        fullPrice = #{record.fullprice,jdbcType=INTEGER},
      </if>
      <if test="record.reduceprice != null">
        reducePrice = #{record.reduceprice,jdbcType=INTEGER},
      </if>
      <if test="record.fullnum != null">
        fullNum = #{record.fullnum,jdbcType=INTEGER},
      </if>
      <if test="record.reducenum != null">
        reduceNum = #{record.reducenum,jdbcType=INTEGER},
      </if>
    </set>
    <if test="_parameter != null">
      <include refid="Update_By_Example_Where_Clause" />
    </if>
  </update>
  <update id="updateByExample" parameterType="map">
    update activity
    set activityId = #{record.activityid,jdbcType=INTEGER},
      activityName = #{record.activityname,jdbcType=VARCHAR},
      activityDes = #{record.activitydes,jdbcType=VARCHAR},
      discount = #{record.discount,jdbcType=REAL},
      fullPrice = #{record.fullprice,jdbcType=INTEGER},
      reducePrice = #{record.reduceprice,jdbcType=INTEGER},
      fullNum = #{record.fullnum,jdbcType=INTEGER},
      reduceNum = #{record.reducenum,jdbcType=INTEGER}
    <if test="_parameter != null">
      <include refid="Update_By_Example_Where_Clause" />
    </if>
  </update>
  <update id="updateByPrimaryKeySelective" parameterType="com.shop.entity.Activity">
    update activity
    <set>
      <if test="activityname != null">
        activityName = #{activityname,jdbcType=VARCHAR},
      </if>
      <if test="activitydes != null">
        activityDes = #{activitydes,jdbcType=VARCHAR},
      </if>
      <if test="discount != null">
        discount = #{discount,jdbcType=REAL},
      </if>
      <if test="fullprice != null">
        fullPrice = #{fullprice,jdbcType=INTEGER},
      </if>
      <if test="reduceprice != null">
        reducePrice = #{reduceprice,jdbcType=INTEGER},
      </if>
      <if test="fullnum != null">
        fullNum = #{fullnum,jdbcType=INTEGER},
      </if>
      <if test="reducenum != null">
        reduceNum = #{reducenum,jdbcType=INTEGER},
      </if>
    </set>
    where activityId = #{activityid,jdbcType=INTEGER}
  </update>
  <update id="updateByPrimaryKey" parameterType="com.shop.entity.Activity">
    update activity
    set activityName = #{activityname,jdbcType=VARCHAR},
      activityDes = #{activitydes,jdbcType=VARCHAR},
      discount = #{discount,jdbcType=REAL},
      fullPrice = #{fullprice,jdbcType=INTEGER},
      reducePrice = #{reduceprice,jdbcType=INTEGER},
      fullNum = #{fullnum,jdbcType=INTEGER},
      reduceNum = #{reducenum,jdbcType=INTEGER}
    where activityId = #{activityid,jdbcType=INTEGER}
  </update>
</mapper>

 

 源码下载地址:https://share.weiyun.com/83cKJL2m 这是微云,在qq里面可以打开,其他的有可能显示已被删除

  • 1
    点赞
  • 9
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

程序猿毕业分享网

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值