| | |
| | | from money_card_use_flow |
| | | <where> |
| | | and car_use_id=#{record.carUseId} |
| | | |
| | | <if test="record.queryTime!=null and record.queryTime!=''"> |
| | | and DATE_FORMAT(create_time,'%Y-%m')=#{record.queryTime} |
| | | </if> |
| | |
| | | </where> |
| | | order by create_time desc |
| | | </select> |
| | | |
| | | <update id="updateVipCardId"> |
| | | update money_card_use_flow |
| | | set car_use_id=#{cardId} |
| | | where vip_id=#{vipId} and type='会员充值' |
| | | </update> |
| | | |
| | | <select id="selectCardUseAmount" resultType="java.lang.Double"> |
| | | select IFNULL(ABS(sum(IFNULL(total, 0))), 0) |
| | | from money_card_use_flow |
| | | where car_use_id=#{cardId} and type='消费扣款' |
| | | </select> |
| | | </mapper> |
| | | |
| | | |