TbIndentDao.java 6.5 KB

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