22301126 | e113160 | 2025-06-04 11:30:10 +0800 | [diff] [blame] | 1 | <?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> |
YelinCui | edbf91e | 2025-06-08 23:56:51 +0800 | [diff] [blame] | 13 | <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 | |
22301126 | e113160 | 2025-06-04 11:30:10 +0800 | [diff] [blame] | 21 | |
| 22 | </mapper> |