liulin
2025-07-09 512ddb42f73f1560661865225dd03870e021e1d2
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);
}