| | |
| | | import com.doumee.core.model.PageData; |
| | | import com.doumee.core.model.PageWrap; |
| | | import com.doumee.core.utils.Utils; |
| | | import com.doumee.dao.business.RevenueMapper; |
| | | import com.doumee.dao.business.WithdrawalOrdersMapper; |
| | | import com.doumee.dao.business.MemberMapper; |
| | | import com.doumee.dao.business.ShopInfoMapper; |
| | | import com.doumee.dao.business.model.Revenue; |
| | | import com.doumee.dao.business.model.ShopInfo; |
| | | import com.doumee.dao.business.model.Member; |
| | | import com.doumee.dao.business.model.WithdrawalOrders; |
| | | import com.doumee.dao.business.*; |
| | | import com.doumee.dao.business.model.*; |
| | | import com.doumee.dao.dto.RevenueQueryDTO; |
| | | import com.doumee.dao.vo.RevenueStatisticsVO; |
| | | import com.doumee.dao.vo.RevenueSummaryVO; |
| | |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.sql.Driver; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.Objects; |
| | |
| | | |
| | | @Autowired |
| | | private MemberMapper memberMapper; |
| | | |
| | | @Autowired |
| | | private DriverInfoMapper driverInfoMapper; |
| | | |
| | | @Override |
| | | public Integer create(Revenue revenue) { |
| | |
| | | |
| | | @Override |
| | | public RevenueStatisticsVO getDriverRevenueStatistics(Integer memberId) { |
| | | Member member = memberMapper.selectById(memberId); |
| | | if (member == null) { |
| | | throw new BusinessException(ResponseStatus.DATA_EMPTY.getCode(), "用户不存在"); |
| | | DriverInfo driverInfo = driverInfoMapper.selectById(memberId); |
| | | if (driverInfo == null) { |
| | | throw new BusinessException(ResponseStatus.DATA_EMPTY.getCode(), "司机信息不存在"); |
| | | } |
| | | return buildRevenueStatistics(memberId, Constants.ONE, member.getAmount()); |
| | | return buildRevenueStatistics(memberId, Constants.ONE, driverInfo.getBalance()); |
| | | } |
| | | |
| | | /** |