TbIndentDao.java 6.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163
  1. package com.sqx.modules.errand.dao;
  2. import com.baomidou.mybatisplus.core.mapper.BaseMapper;
  3. import com.baomidou.mybatisplus.core.metadata.IPage;
  4. import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
  5. import com.sqx.modules.app.entity.UserEntity;
  6. import com.sqx.modules.datacentre.query.DataCenterQuery;
  7. import com.sqx.modules.errand.dto.WaitForAcceptOrderQueryDTO;
  8. import com.sqx.modules.errand.entity.ErrandAddress;
  9. import com.sqx.modules.errand.entity.ErrandRedPacket;
  10. import com.sqx.modules.errand.entity.TbIndent;
  11. import com.sqx.modules.errand.vo.ShopWaitAcceptOrderVO;
  12. import com.sqx.modules.errand.vo.queryOrderInfoVo;
  13. import org.apache.ibatis.annotations.Mapper;
  14. import org.apache.ibatis.annotations.Param;
  15. import java.math.BigDecimal;
  16. import java.util.Date;
  17. import java.util.List;
  18. @Mapper
  19. public interface TbIndentDao extends BaseMapper<TbIndent> {
  20. IPage<TbIndent> findNewIndent(Page<TbIndent> pages, double riderLng, double riderLat, double distances, String indentType);
  21. IPage<TbIndent> findNewIndentcity(Page<TbIndent> pages, double riderLng, double riderLat, String address, String indentType);
  22. IPage<TbIndent> findNewIndentByCity(@Param("pages") Page<TbIndent> pages, @Param("queryDTO") WaitForAcceptOrderQueryDTO queryDTO);
  23. IPage<TbIndent> findNewIndentByDistances(@Param("pages") Page<TbIndent> pages, @Param("queryDTO") WaitForAcceptOrderQueryDTO queryDTO);
  24. IPage<ShopWaitAcceptOrderVO> findNewIndentByDistancesGroupByShop(@Param("pages") Page<ShopWaitAcceptOrderVO> pages, @Param("queryDTO") WaitForAcceptOrderQueryDTO queryDTO);
  25. TbIndent findIndentByNumber(String indentNumber);
  26. TbIndent findIndentByOrderId(String orderId);
  27. int selectIndentByRiderUserCount(Long riderUserId);
  28. void indentReceiving(Long userId, String indentNumber, String format);
  29. void indentReceiv(Long userId, String indentNumber, String format,String state);
  30. void orderIndentReceiving(Long userId, String orderId, String format);
  31. void orderIndentReceiv(Long userId, String orderId, String format,String state);
  32. IPage<TbIndent> findRiderIndent(Page<TbIndent> pages, Long userId, String indentState,String keyword);
  33. IPage<queryOrderInfoVo> findRiderIndentByIds(Page<queryOrderInfoVo> pages, Long userId, List<String> indentIds);
  34. TbIndent indentRiderMessage(String indentNumber, double riderLng, double riderLat);
  35. void riderCancleIndent(@Param("riderUserId") Long userId, @Param("indentNumber") String indentNumber);
  36. void updateRiderCashDeposit(BigDecimal cashDeposit, Long userId);
  37. void riderDelivery(Long indentId, String date);
  38. TbIndent selectIndentByIndentNumber(String indentNumber);
  39. List<TbIndent> selectIndentByIndentNumbers(@Param("indentNumbers") List<String> indentNumbers);
  40. void updateRiderBalance(BigDecimal balance, Long userId);
  41. void userDelivery(Long userId, String indentNumber, String date);
  42. IPage<TbIndent> findallIndent(Page<TbIndent> pages, Long userId, Long riderUserId, Long shopId,Integer indentType,String ordersNo,Integer status,String riderPhone);
  43. void updateDefault(Long userId);
  44. void addUserAddress(ErrandAddress errandAddress);
  45. void updateAddress(@Param("userId")Long userId, @Param("userName") String userName, @Param("userPhone")String userPhone, @Param("address") String address,
  46. @Param("addressDetail")String addressDetail, @Param("lng")double lng, @Param("lat")double lat,
  47. @Param("updatetime")String datetime, @Param("addressDefault") String addressDefault, @Param("addressId") Long addressId);
  48. List<ErrandAddress> findUserAddress(Long userId);
  49. ErrandAddress findAddressById(Long userId, Integer addressId);
  50. void addDefaultAddress(Long userId, Integer addressId);
  51. void delUserAddress(Long userId, Integer addressId);
  52. ErrandRedPacket findRed(Long redPacketId);
  53. void delRedPacket(Long redPacketId);
  54. IPage<TbIndent> findAllIndent(Page<TbIndent> pages, String indentType, String phone, String indentState, String date, String dateType,String riderPhone);
  55. IPage<TbIndent> findAllIndents(Page<TbIndent> pages, String indentType, String phone, String indentState, String date, String dateType,String riderPhone);
  56. IPage<TbIndent> IndentCenter(Page<TbIndent> pages, String indentType, String indentNumber, String indentState, String phone, String date, String dateType);
  57. void updateIndentState(String indentNumber, String indentState);
  58. void adminSoldOutIndent(String indentNumber);
  59. BigDecimal billMoney(@Param("query") DataCenterQuery query);
  60. BigDecimal receivingMoney(@Param("query") DataCenterQuery query) ;
  61. int billCount(@Param("query") DataCenterQuery query);
  62. int reveivingCount(@Param("query") DataCenterQuery query);
  63. IPage<TbIndent> taskAnalysisMoney(Page<TbIndent> pages,@Param("query") DataCenterQuery query,@Param("indentState") String status);
  64. int findAllCount();
  65. int findDayAddUser(String format);
  66. int findMonthAddUser(String format);
  67. int findYearAddUser(String format);
  68. BigDecimal findDayIncome(String format);
  69. BigDecimal findMonthIncome(String format);
  70. BigDecimal findYearIncome(String format);
  71. int findIndentCount(String format);
  72. int selectOrderByStatus(@Param("query") DataCenterQuery query, Integer status);
  73. BigDecimal findAdminIncomeday(Long userId, String date, String dateType);
  74. BigDecimal findPrepayMoney(Long userId, String date, String dateType);
  75. int findAdminIndentCount(Long userId, String date, String dateType);
  76. IPage<TbIndent> selectIndentById(Page<TbIndent> pages, Long userId, String date, String dateType);
  77. IPage<TbIndent> findUserIndent(Page<TbIndent> pages, Long userId, String indentState);
  78. TbIndent indentMessage(String indentNumber);
  79. List<UserEntity> find5KmRider(@Param("lng") double lng, @Param("lat") double lat);
  80. void updateCoordinate(Long userId, double lng, double lat);
  81. UserEntity findUserInfoById(Long userId);
  82. List<ErrandRedPacket> findAllRedPacket(Long userId, String expirationTime);
  83. List<ErrandRedPacket> findRedPacket(Long userId, String indentType, BigDecimal indentBasicsMoney, Date expirationTime);
  84. int userCancleIndent(@Param("userId") Long userId, @Param("indentNumber") String indentNumber, @Param("cancelIndentTime") String cancelIndentTime);
  85. int updateRedPaclet(@Param("redPacketId") Long redPacketId);
  86. List<TbIndent> selectIndentList(Long userId);
  87. List<TbIndent> selectSendOrder(String date);
  88. Long selectRiderByDictance(Double userLng, Double userLat, Double distance, Double cashDeposit,Integer maxNum);
  89. TbIndent indentMessageByOrderId(Long orderId, double riderLng, double riderLat);
  90. IPage<ShopWaitAcceptOrderVO> findNewIndentByCityGroupByShop(@Param("pages") Page<ShopWaitAcceptOrderVO> pages, @Param("queryDTO") WaitForAcceptOrderQueryDTO queryDTO);
  91. }