package com.lunhan.water.repository.mapper; import com.lunhan.water.repository.BasicMapper; import com.lunhan.water.repository.po.PaymentRecordsPO; import org.apache.ibatis.annotations.Select; import java.math.BigDecimal; /** * PaymentRecords * @author lin.liu */ public interface PaymentRecordsMapper extends BasicMapper { @Select("SELECT COALESCE(SUM(water_amount),0) FROM payment_records WHERE user_id=#{userId}") BigDecimal getSumUseCount(Long userId); }