package com.ruoyi.frequency.ordermessage.service;

import java.util.List;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.ruoyi.controller.req.MessageReadOrDeleteReq;
import com.ruoyi.controller.req.OrderMessagePageReq;
import com.ruoyi.controller.resp.MessageOrderPageResp;
import com.ruoyi.enums.message.OrderMessageEnums;
import com.ruoyi.frequency.ordermessage.entity.OrderMessage;
import com.ruoyi.frequency.ordermessage.entity.OrderMessageUtil;
import com.baomidou.mybatisplus.extension.service.IService;
import com.ruoyi.response.ResponseData;
import com.ruoyi.vo.PageBasic;
import com.ruoyi.vo.UserVo;

/**
 * 订单消息Service接口
 *
 * @author zj
 * @date 2023-10-13
 */
public interface OrderMessageService extends IService<OrderMessage>
{
    /**
     * 查询订单消息
     *
     * @param id 订单消息主键
     * @return 订单消息
     */
    public OrderMessage selectOrderMessageById(Long id);

    /**
     * 查询订单消息列表
     *
     * @param orderMessage 订单消息
     * @return 订单消息集合
     */
    public List<OrderMessage> selectOrderMessageList(OrderMessage orderMessage);

    /**
     * 新增订单消息
     *
     * @param orderMessage 订单消息
     * @return 结果
     */
    public int insertOrderMessage(OrderMessage orderMessage);

    /**
     * 修改订单消息
     *
     * @param orderMessage 订单消息
     * @return 结果
     */
    public int updateOrderMessage(OrderMessage orderMessage);

    /**
     * 批量删除订单消息
     *
     * @param ids 需要删除的订单消息主键集合
     * @return 结果
     */
    public int deleteOrderMessageByIds(Long[] ids);

    /**
     * 删除订单消息信息
     *
     * @param id 订单消息主键
     * @return 结果
     */
    public int deleteOrderMessageById(Long id);

    /**
     * 订单消息列表
     * @param req
     * @param userVo
     * @return
     */
    List<OrderMessage> orderMessageList(OrderMessagePageReq req, UserVo userVo);


    /**
     * 订单消息列表_已读，删除消息
     * @param req
     * @param userVo
     * @return
     */
    ResponseData orderMessageReadOrDelete(MessageReadOrDeleteReq req, UserVo userVo);


    /**
     * 添加订单消息
     * @param userVo
     * @param orderId
     * @param orderType
     * @param orderMessageEnums
     */
    void addOrderMessage(UserVo userVo, Long orderId, String orderNo,Integer orderType, OrderMessageEnums orderMessageEnums);

    /**
     * 添加订单消息
     * @param userVo
     * @param orderId
     * @param orderType
     * @param orderMessageEnums
     */
    void addOrderMessage(UserVo userVo, Long orderId, String orderNo, Integer orderType, OrderMessageEnums orderMessageEnums,String... content);

    Page<MessageOrderPageResp> messageOrderPage(PageBasic req, UserVo userVo);
}
