<?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>
|