package com.sqx.modules.errand.dao; import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.sqx.modules.app.entity.UserEntity; import com.sqx.modules.datacentre.query.DataCenterQuery; import com.sqx.modules.errand.dto.WaitForAcceptOrderQueryDTO; import com.sqx.modules.errand.entity.ErrandAddress; import com.sqx.modules.errand.entity.ErrandRedPacket; import com.sqx.modules.errand.entity.TbIndent; import com.sqx.modules.errand.vo.ShopWaitAcceptOrderVO; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; import java.math.BigDecimal; import java.util.Date; import java.util.List; @Mapper public interface TbIndentDao extends BaseMapper { IPage findNewIndent(Page pages, double riderLng, double riderLat, double distances, String indentType); IPage findNewIndentcity(Page pages, double riderLng, double riderLat, String address, String indentType); IPage findNewIndentByCity(@Param("pages") Page pages, @Param("queryDTO") WaitForAcceptOrderQueryDTO queryDTO); IPage findNewIndentByDistances(@Param("pages") Page pages, @Param("queryDTO") WaitForAcceptOrderQueryDTO queryDTO); IPage findNewIndentByDistancesGroupByShop(@Param("pages") Page pages, @Param("queryDTO") WaitForAcceptOrderQueryDTO queryDTO); TbIndent findIndentByNumber(String indentNumber); TbIndent findIndentByOrderId(String orderId); int selectIndentByRiderUserCount(Long riderUserId); void indentReceiving(Long userId, String indentNumber, String format); void indentReceiv(Long userId, String indentNumber, String format,String state); void orderIndentReceiving(Long userId, String orderId, String format); void orderIndentReceiv(Long userId, String orderId, String format,String state); IPage findRiderIndent(Page pages, Long userId, String indentState); TbIndent indentRiderMessage(String indentNumber, double riderLng, double riderLat); void riderCancleIndent(@Param("riderUserId") Long userId, @Param("indentNumber") String indentNumber); void updateRiderCashDeposit(BigDecimal cashDeposit, Long userId); void riderDelivery(Long indentId, String date); TbIndent selectIndentByIndentNumber(String indentNumber); void updateRiderBalance(BigDecimal balance, Long userId); void userDelivery(Long userId, String indentNumber, String date); IPage findallIndent(Page pages, Long userId, Long riderUserId, Long shopId,Integer indentType,String ordersNo,Integer status,String riderPhone); void updateDefault(Long userId); void addUserAddress(ErrandAddress errandAddress); void updateAddress(@Param("userId")Long userId, @Param("userName") String userName, @Param("userPhone")String userPhone, @Param("address") String address, @Param("addressDetail")String addressDetail, @Param("lng")double lng, @Param("lat")double lat, @Param("updatetime")String datetime, @Param("addressDefault") String addressDefault, @Param("addressId") Long addressId); List findUserAddress(Long userId); ErrandAddress findAddressById(Long userId, Integer addressId); void addDefaultAddress(Long userId, Integer addressId); void delUserAddress(Long userId, Integer addressId); ErrandRedPacket findRed(Long redPacketId); void delRedPacket(Long redPacketId); IPage findAllIndent(Page pages, String indentType, String phone, String indentState, String date, String dateType,String riderPhone); IPage findAllIndents(Page pages, String indentType, String phone, String indentState, String date, String dateType,String riderPhone); IPage IndentCenter(Page pages, String indentType, String indentNumber, String indentState, String phone, String date, String dateType); void updateIndentState(String indentNumber, String indentState); void adminSoldOutIndent(String indentNumber); BigDecimal billMoney(@Param("query") DataCenterQuery query); BigDecimal receivingMoney(@Param("query") DataCenterQuery query) ; int billCount(@Param("query") DataCenterQuery query); int reveivingCount(@Param("query") DataCenterQuery query); IPage taskAnalysisMoney(Page pages,@Param("query") DataCenterQuery query,@Param("indentState") String status); int findAllCount(); int findDayAddUser(String format); int findMonthAddUser(String format); int findYearAddUser(String format); BigDecimal findDayIncome(String format); BigDecimal findMonthIncome(String format); BigDecimal findYearIncome(String format); int findIndentCount(String format); int selectOrderByStatus(@Param("query") DataCenterQuery query, Integer status); BigDecimal findAdminIncomeday(Long userId, String date, String dateType); BigDecimal findPrepayMoney(Long userId, String date, String dateType); int findAdminIndentCount(Long userId, String date, String dateType); IPage selectIndentById(Page pages, Long userId, String date, String dateType); IPage findUserIndent(Page pages, Long userId, String indentState); TbIndent indentMessage(String indentNumber); List find5KmRider(@Param("lng") double lng, @Param("lat") double lat); void updateCoordinate(Long userId, double lng, double lat); UserEntity findUserInfoById(Long userId); List findAllRedPacket(Long userId, String expirationTime); List findRedPacket(Long userId, String indentType, BigDecimal indentBasicsMoney, Date expirationTime); int userCancleIndent(@Param("userId") Long userId, @Param("indentNumber") String indentNumber, @Param("cancelIndentTime") String cancelIndentTime); int updateRedPaclet(@Param("redPacketId") Long redPacketId); List selectIndentList(Long userId); List selectSendOrder(String date); Long selectRiderByDictance(Double userLng, Double userLat, Double distance, Double cashDeposit,Integer maxNum); TbIndent indentMessageByOrderId(Long orderId, double riderLng, double riderLat); IPage findNewIndentByCityGroupByShop(@Param("pages") Page pages, @Param("queryDTO") WaitForAcceptOrderQueryDTO queryDTO); }