| | |
| | | group by b.id) t |
| | | </select> |
| | | |
| | | <!-- 美度不显示赠送金额 IFNULL(sum(IFNULL(gift_money, 0)),0)+--> |
| | | <select id="selectVipCardTotalMoney" resultType="java.lang.Double"> |
| | | SELECT IFNULL(sum(IFNULL(gift_money, 0)),0)+ IFNULL(sum(IFNULL(real_money, 0)),0) from money_card_use where vip_id=#{vipId} and `status` ='有效' |
| | | |
| | | SELECT IFNULL(sum(IFNULL(real_money, 0)),0) from money_card_use where vip_id=#{vipId} and `status` ='有效' |
| | | </select> |
| | | |
| | | |
| | |
| | | update money_card_use set STATUS='无效' |
| | | where date_format(now(), '%Y-%m-%d') > date_format(FAIL_TIME, '%Y-%m-%d') and STATUS='有效' |
| | | </update> |
| | | |
| | | <update id="saveInTimeReceiptWare"> |
| | | <foreach collection="storeReceiptWares" item="wares" separator=";"> |
| | | UPDATE money_card_use |
| | | <set> |
| | | <if test="wares.containsKey('createBy')"> |
| | | order_item_id = if(#{wares.createBy}='',NULL,#{wares.createBy}), |
| | | </if> |
| | | |
| | | </set> |
| | | WHERE id = #{wares.id} |
| | | </foreach> |
| | | </update> |
| | | </mapper> |