增加本月充值金额

This commit is contained in:
seesaw
2024-12-03 14:40:12 +08:00
parent 237b27dac2
commit b14ee43ac5
2 changed files with 13 additions and 5 deletions

View File

@ -1,6 +1,8 @@
package cn.iocoder.yudao.module.member.dal.mysql.card;
import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.date.DateTime;
import cn.hutool.core.date.DateUtil;
import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
@ -81,10 +83,12 @@ public interface CardMapper extends BaseMapperX<CardDO> {
.eq(CardDO::getType, type)
.eq(CardDO::getBillingExist, var)
.in(CardDO::getUserId, userIds));
if(var2==null){
return cardDOS;
if(var2!=null){
return cardDOS.stream().filter(f-> f.getCreateTime().getMonth().getValue()==var2).collect(Collectors.toList());
}else{
return cardDOS.stream().filter(f-> f.getCreateTime().getMonth().getValue()!=var2).collect(Collectors.toList());
DateTime date = DateUtil.date();
int i = date.monthBaseOne();
return cardDOS.stream().filter(f-> f.getCreateTime().getMonth().getValue()!=i).collect(Collectors.toList());
}
}
default BigDecimal getTotalMoneyByuserIds(Collection<Long> userIds, String flag, String type,Integer var) {
@ -94,7 +98,11 @@ public interface CardMapper extends BaseMapperX<CardDO> {
.eq(CardDO::getBillingExist, BillingStatusEnum.BILLING_INVOICING_REJECTION.getCode())
.in(CardDO::getUserId, userIds));
if(var!=null){
cardDOS=cardDOS.stream().filter(f-> f.getCreateTime().getMonth().getValue()!=var).collect(Collectors.toList());
cardDOS=cardDOS.stream().filter(f-> f.getCreateTime().getMonth().getValue()==var).collect(Collectors.toList());
}else{
DateTime date = DateUtil.date();
int i = date.monthBaseOne();
cardDOS=cardDOS.stream().filter(f-> f.getCreateTime().getMonth().getValue()!=i).collect(Collectors.toList());
}
return cardDOS.stream()
.map(CardDO::getChangeMoney)

View File

@ -470,7 +470,7 @@ public class BillingServiceImpl implements BillingService {
DateTime date = DateUtil.date();
Integer month=null;
int day = date.dayOfMonth();
if(day<=26){
if(day>26){
month= date.monthBaseOne();
}
return month;