苍穹外卖--订单状态自动更新:超时未支付&派送中修改为已完成
This commit is contained in:
@@ -6,6 +6,7 @@ import com.sky.entity.Orders;
|
||||
import org.apache.ibatis.annotations.*;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
|
||||
@Mapper
|
||||
public interface OrderMapper {
|
||||
@@ -47,4 +48,13 @@ public interface OrderMapper {
|
||||
*/
|
||||
@Select("select count(id) from orders where status = #{status}")
|
||||
Integer countStatus(Integer status);
|
||||
|
||||
/**
|
||||
* 根据支付状态和时间获取订单的查询操作
|
||||
* @param status
|
||||
* @param time
|
||||
* @return
|
||||
*/
|
||||
@Select("select * from orders where status = #{status} and order_time < #{time}")
|
||||
List<Orders> getByStatusAndOrderTime(Integer status, LocalDateTime time);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user