|  |  |  | 
|---|
|  |  |  | import com.baomidou.mybatisplus.core.mapper.BaseMapper; | 
|---|
|  |  |  | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; | 
|---|
|  |  |  | import com.mzl.flower.dto.request.payment.OrderQueryDTO; | 
|---|
|  |  |  | import com.mzl.flower.dto.response.payment.OrderCheckListDTO; | 
|---|
|  |  |  | import com.mzl.flower.dto.response.payment.OrderListDTO; | 
|---|
|  |  |  | import com.mzl.flower.dto.response.payment.OrderStatusCountDTO; | 
|---|
|  |  |  | import com.mzl.flower.dto.response.payment.SupplierNumDTO; | 
|---|
|  |  |  | import com.mzl.flower.dto.response.payment.*; | 
|---|
|  |  |  | import com.mzl.flower.entity.payment.Order; | 
|---|
|  |  |  | import org.apache.ibatis.annotations.Param; | 
|---|
|  |  |  | import org.apache.ibatis.annotations.Select; | 
|---|
|  |  |  | import org.springframework.stereotype.Repository; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | import java.time.LocalDateTime; | 
|---|
|  |  |  | 
|---|
|  |  |  | List<Order> getOrderForBill(@Param("startTime")LocalDateTime startTime | 
|---|
|  |  |  | , @Param("endTime")LocalDateTime endTime); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | Order getUserLastOrder(@Param("userId") String userId); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | List<OrderPointGoodsListDTO> getPointGoodsList(@Param("orderId") String orderId); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @Select("SELECT t1.* " + | 
|---|
|  |  |  | "FROM t_order t1 " + | 
|---|
|  |  |  | "JOIN ( " + | 
|---|
|  |  |  | "    SELECT create_by, MAX(receive_time) AS max_time " + | 
|---|
|  |  |  | "    FROM t_order " + | 
|---|
|  |  |  | "    where receive_time is not null  " + | 
|---|
|  |  |  | "    GROUP BY create_by " + | 
|---|
|  |  |  | "    HAVING max_time < NOW() - INTERVAL 30 DAY " + | 
|---|
|  |  |  | ") t2 ON t1.create_by = t2.create_by AND t1.receive_time = t2.max_time " + | 
|---|
|  |  |  | "LEFT JOIN t_customer_info c ON t1.create_by = c.user_id ") | 
|---|
|  |  |  | List<Order> getOrderInfoByReceiveTime(); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | int getFlowerCompleteNumWithinTimeRange(@Param("userId") String userId ,@Param("flowerId") Long flowerId, | 
|---|
|  |  |  | @Param("startTime") LocalDateTime startTime, @Param("endTime") LocalDateTime endTime); | 
|---|
|  |  |  | } | 
|---|