| | |
| | | import com.mzl.flower.dto.response.statistics.OrderStatisticsDTO; |
| | | import com.mzl.flower.dto.response.statistics.RateStatisticsDTO; |
| | | import com.mzl.flower.dto.response.statistics.SaleStatisticsDTO; |
| | | import com.mzl.flower.dto.response.wallet.WalletWithdrawVO; |
| | | import com.mzl.flower.entity.customer.Customer; |
| | | import com.mzl.flower.entity.ip.UserAccess; |
| | | import com.mzl.flower.entity.payment.Order; |
| | |
| | | import com.mzl.flower.mapper.ip.UserAccessMapper; |
| | | import com.mzl.flower.mapper.payment.*; |
| | | import com.mzl.flower.mapper.supplier.SupplierMapper; |
| | | import com.mzl.flower.mapper.wallet.WalletMapper; |
| | | import com.mzl.flower.service.BaseService; |
| | | import com.mzl.flower.utils.IpUtil; |
| | | import io.micrometer.core.instrument.util.StringUtils; |
| | |
| | | |
| | | @Autowired |
| | | private UserAccessMapper userAccessMapper; |
| | | |
| | | @Autowired |
| | | private WalletMapper walletMapper; |
| | | |
| | | public SaleStatisticsDTO getSaleStatistics(String date){ |
| | | if(StringUtils.isEmpty(date)){ |
| | |
| | | dto.setTotalSaleAmount(a); |
| | | dto.setTotalSaleFlowerCount(c == null ? 0 : c.longValue()); |
| | | |
| | | dto.setSupplierPendingAmount(new BigDecimal(0));//TODO 供应商待提现:结算列表待结算(供应商)+供应商钱包余额 |
| | | dto.setSupplierCompleteAmount(new BigDecimal(0));//TODO 供应商已提现:结算列表已结算(供应商)+供应商钱包已提现金额 |
| | | WalletWithdrawVO withdrawTotal = walletMapper.getSumWithdrawTotal(); |
| | | BigDecimal sumHistoryWithdrawTotal = walletMapper.getSumHistoryWithdrawTotal(); |
| | | dto.setSupplierPendingAmount(withdrawTotal.getSupplierPendingAmount().add(sumHistoryWithdrawTotal)); |
| | | dto.setSupplierCompleteAmount(withdrawTotal.getSupplierCompleteAmount().add(sumHistoryWithdrawTotal)); |
| | | |
| | | // dto.setSupplierPendingAmount(new BigDecimal(0));//TODO 供应商待提现:结算列表待结算(供应商)+供应商钱包余额 |
| | | // dto.setSupplierCompleteAmount(new BigDecimal(0));//TODO 供应商已提现:结算列表已结算(供应商)+供应商钱包已提现金额 |
| | | |
| | | return dto; |
| | | } |
| | |
| | | sq = new OrderItemSalesQueryDTO(); |
| | | sq.setStatusList(statusList); |
| | | sq.setSalesStartDate(begin); |
| | | sq.setSalesStartDate(end); |
| | | sq.setSalesEndDate(end); |
| | | orderItemSalesMapper.selectItemSalesList(page, sq); |
| | | dto.setCountToday(page.getTotal()); |
| | | |
| | |
| | | sq = new OrderItemSalesQueryDTO(); |
| | | sq.setStatusList(statusList); |
| | | sq.setSalesStartDate(beginY); |
| | | sq.setSalesStartDate(endY); |
| | | sq.setSalesEndDate(endY); |
| | | orderItemSalesMapper.selectItemSalesList(page, sq); |
| | | dto.setCountRate(getRate(dto.getCountToday().intValue(), (int)page.getTotal())); |
| | | |