liulin
2025-07-03 fb2f11d7d502ceacbe7fbed176bea4ab0f152f69
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
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<PaymentRecordsPO> {
    @Select("SELECT COALESCE(SUM(water_amount),0) FROM payment_records WHERE user_id=#{userId}")
     BigDecimal getSumUseCount(Long userId);
}