package com.ms.biz.service;

import com.ms.api.dto.dsorder.DsMessageDTO;
import com.ms.api.dto.dsorder.ResultDTO;
import com.ms.dal.entity.DsMessage;
import com.ms.dal.entity.DsMessageConsumerQueue;
import org.springframework.lang.Nullable;

/**
 * @author elf
 */
public interface DsMessageService  {

    int deleteByPrimaryKey(Long id);

    int insert(DsMessage record);

    int insertSelective(DsMessage record);

    DsMessage selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(DsMessage record);

    int updateByPrimaryKey(DsMessage record);

    DsMessage getNewestDsMessage(String bizId, String bizType, Long curPlatformPushMsgId, String curGmtCreate, @Nullable String purchaseOrderSn);

    boolean hasNewThanDsMessage(DsMessage dsMessage, String bizType);

    DsMessageDTO parseData(DsMessage dsMessage);

    DsMessage add(Long shopId, Long platformPushMsgId, String bizId, String bizType, String data);

    void addDsMessage(Long shopId, Long platformPushMsgId, String bizId, String bizType, String data);

    void clearDsMessageQueue(DsMessageConsumerQueue queue, ResultDTO result);

    void processDsMessage(Long dsMessageId);
}
