| | |
| | | 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; |
| | |
| | | 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(); |
| | | |
| | | Integer getFlowerCompleteNumToday(@Param("userId") String userId,@Param("flowerId") Long flowerId); |
| | | } |