blob: 98083336f3638cb1c88680d12225d3ee7e3f32a3 [file] [log] [blame]
22301126e1131602025-06-04 11:30:10 +08001<?xml version="1.0" encoding="UTF-8"?>
2<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
3 "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
4<mapper namespace="com.example.myproject.mapper.PromotionMapper">
5
6 <insert id="insert" parameterType="com.example.myproject.entity.Promotion">
7 INSERT INTO promotion (
8 name, description, start_time, end_time, discount_percentage, applicable_torrent_ids
9 ) VALUES (
10 #{name}, #{description}, #{startTime}, #{endTime}, #{discountPercentage}, #{applicableTorrentIds}
11 )
12 </insert>
YelinCuiedbf91e2025-06-08 23:56:51 +080013 <update id="updateById" parameterType="com.example.myproject.entity.Promotion">
14 update promotion
15 set is_deleted = #{isDeleted},
16 update_time = #{updateTime}
17 where id = #{id}
18 </update>
19
20
22301126e1131602025-06-04 11:30:10 +080021
22</mapper>