From 94c29daf7cb722635c1735e8d8bd403105e999d8 Mon Sep 17 00:00:00 2001 From: Administrator <Administrator@Admin> Date: 星期一, 10 十二月 2018 15:19:53 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/master' --- fanli/src/main/java/com/yeshi/fanli/mapping/share/UserShareGoodsGroupMapper.xml | 47 +++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 47 insertions(+), 0 deletions(-) diff --git a/fanli/src/main/java/com/yeshi/fanli/mapping/share/UserShareGoodsGroupMapper.xml b/fanli/src/main/java/com/yeshi/fanli/mapping/share/UserShareGoodsGroupMapper.xml index e5d271f..dd07cef 100644 --- a/fanli/src/main/java/com/yeshi/fanli/mapping/share/UserShareGoodsGroupMapper.xml +++ b/fanli/src/main/java/com/yeshi/fanli/mapping/share/UserShareGoodsGroupMapper.xml @@ -88,6 +88,53 @@ </foreach> </insert> + + <update id="updateBatchSelective" parameterType="java.util.List"> + update yeshi_ec_share_goods_group + <trim prefix="set" suffixOverrides=","> + <trim prefix="gu_today_browse =case" suffix="end,"> + <foreach collection="list" item="item" index="index"> + <if test="item.todayBrowse !=null"> + when gu_id=#{item.id} then #{item.todayBrowse} + </if> + </foreach> + </trim> + <trim prefix="gu_total_browse =case" suffix="end,"> + <foreach collection="list" item="item" index="index"> + <if test="item.totalBrowse !=null"> + when gu_id=#{item.id} then #{item.totalBrowse} + </if> + </foreach> + </trim> + <trim prefix="gu_total_order =case" suffix="end,"> + <foreach collection="list" item="item" index="index"> + <if test="item.totalOrder !=null"> + when gu_id=#{item.id} then #{item.totalOrder} + </if> + </foreach> + </trim> + <trim prefix="gu_total_money =case" suffix="end,"> + <foreach collection="list" item="item" index="index"> + <if test="item.totalMoney !=null"> + when gu_id=#{item.id} then #{item.totalMoney} + </if> + </foreach> + </trim> + <trim prefix="gu_browse_time =case" suffix="end,"> + <foreach collection="list" item="item" index="index"> + <if test="item.browseTime !=null"> + when gu_id=#{item.id} then #{item.browseTime} + </if> + </foreach> + </trim> + </trim> + where gu_id in + <foreach collection="list" index="index" item="item" separator="," open="(" close=")"> + #{item.id,jdbcType=BIGINT} + </foreach> + </update> + + <select id="listByRecordId" resultMap="BaseResultMap"> SELECT * FROM yeshi_ec_share_goods_group tg LEFT JOIN `yeshi_ec_common_goods` cg ON tg.`gu_common_goods_id` = cg.`cg_id` -- Gitblit v1.8.0