fix:修改充值订单导出(未退款但是退款金额显示有金额)
parent
72beac0b3a
commit
68db974170
|
@ -1,15 +1,13 @@
|
||||||
package cn.iocoder.yudao.module.shop.controller.admin.statement;
|
package cn.iocoder.yudao.module.shop.controller.admin.statement;
|
||||||
|
|
||||||
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
||||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
|
||||||
import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils;
|
import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils;
|
||||||
import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog;
|
import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog;
|
||||||
import cn.iocoder.yudao.framework.security.core.annotations.PreAuthenticated;
|
import cn.iocoder.yudao.framework.security.core.annotations.PreAuthenticated;
|
||||||
import cn.iocoder.yudao.framework.tenant.core.aop.TenantIgnore;
|
import cn.iocoder.yudao.framework.tenant.core.aop.TenantIgnore;
|
||||||
import cn.iocoder.yudao.module.shop.controller.admin.recharge.vo.*;
|
import cn.iocoder.yudao.module.shop.controller.admin.recharge.vo.StatementAllReqVo;
|
||||||
import cn.iocoder.yudao.module.shop.convert.recharge.RechargeGearConvert;
|
import cn.iocoder.yudao.module.shop.controller.admin.recharge.vo.StatisticsExcelVO;
|
||||||
import cn.iocoder.yudao.module.shop.dal.dataobject.order.StoreOrderStatus;
|
import cn.iocoder.yudao.module.shop.controller.admin.recharge.vo.StatisticsPageVo;
|
||||||
import cn.iocoder.yudao.module.shop.dal.dataobject.recharge.RechargeGearDO;
|
|
||||||
import cn.iocoder.yudao.module.shop.request.order.StatementAllRequest;
|
import cn.iocoder.yudao.module.shop.request.order.StatementAllRequest;
|
||||||
import cn.iocoder.yudao.module.shop.request.order.StatementPageRequest;
|
import cn.iocoder.yudao.module.shop.request.order.StatementPageRequest;
|
||||||
import cn.iocoder.yudao.module.shop.service.order.StoreOrderService;
|
import cn.iocoder.yudao.module.shop.service.order.StoreOrderService;
|
||||||
|
@ -18,7 +16,6 @@ import io.swagger.v3.oas.annotations.Operation;
|
||||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
import org.springframework.beans.BeanUtils;
|
import org.springframework.beans.BeanUtils;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.security.access.prepost.PreAuthorize;
|
|
||||||
import org.springframework.util.CollectionUtils;
|
import org.springframework.util.CollectionUtils;
|
||||||
import org.springframework.validation.annotation.Validated;
|
import org.springframework.validation.annotation.Validated;
|
||||||
import org.springframework.web.bind.annotation.GetMapping;
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
|
|
|
@ -1463,11 +1463,6 @@ public class StoreOrderServiceImpl extends ServiceImpl<StoreOrderMapper, StoreOr
|
||||||
request.setEndTime(LocalDateTimeUtil.endOfDay(lastDay));
|
request.setEndTime(LocalDateTimeUtil.endOfDay(lastDay));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
LocalDateTime todayOfLastWeek = LocalDateTime.now().minusDays(7);
|
|
||||||
LocalDateTime monday = todayOfLastWeek.with(TemporalAdjusters.previous(DayOfWeek.SUNDAY)).plusDays(1);
|
|
||||||
LocalDateTime sunday = todayOfLastWeek.with(TemporalAdjusters.next(DayOfWeek.MONDAY)).minusDays(1);
|
|
||||||
request.setStartTime(LocalDateTimeUtil.beginOfDay(monday));
|
|
||||||
request.setEndTime(LocalDateTimeUtil.endOfDay(sunday));
|
|
||||||
List<StatementAllReqDataVo> dataVos = mapper.statisticsAll(request.getStartTime(), request.getEndTime());
|
List<StatementAllReqDataVo> dataVos = mapper.statisticsAll(request.getStartTime(), request.getEndTime());
|
||||||
if (!CollectionUtils.isEmpty(dataVos)) {
|
if (!CollectionUtils.isEmpty(dataVos)) {
|
||||||
reqVo.setTotalMoney(BigDecimal.valueOf(dataVos.stream().filter(x -> x.getRefundStatus() != 2).mapToDouble(StatementAllReqDataVo::getPrice).sum()));
|
reqVo.setTotalMoney(BigDecimal.valueOf(dataVos.stream().filter(x -> x.getRefundStatus() != 2).mapToDouble(StatementAllReqDataVo::getPrice).sum()));
|
||||||
|
|
Loading…
Reference in New Issue