KKSU
2024-03-15 b87c5549fe471167882192944db3f2d6b729476c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
<?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="cc.mrbird.febs.mall.mapper.CjItemMapper">
 
    <select id="selectListByInfoId" resultType="cc.mrbird.febs.mall.entity.CjItem">
        select *
        from cj_item a
        where a.info_id = #{infoId}
    </select>
 
    <update id="updateBatchById">
        <foreach collection="list" item="item" separator=";">
            update
            `cj_item`
            set
            `kj_num` = #{item.kjNum},
            `perk_amount` = #{item.perkAmount}
            where
            id = #{item.id}
        </foreach>
    </update>
 
 
 
    <select id="selectSumAmountByInfoId" resultType="cc.mrbird.febs.mall.entity.CjItem">
        select *
        from cj_item a
        where a.info_id in
        <foreach collection = "list" item = "item"  separator=","  open = "(" close = ")" >
            #{item}
        </foreach >
    </select>
 
</mapper>