
package com.tmerclub.cloud.api.platform.feign;

import com.tmerclub.cloud.api.platform.dto.OfflineHandleEventDTO;
import com.tmerclub.cloud.api.platform.vo.OfflineHandleEventVO;
import com.tmerclub.cloud.common.response.ServerResponseEntity;

import java.util.List;

/**
 * @author YXF
 * @date 2021/01/16
 */
public interface OfflineHandleEventFeignClient {

    /**
     * 新增下线事件记录
     *
     * @param offlineHandleEventDto
     * @return
     */
    ServerResponseEntity<Void> save(OfflineHandleEventDTO offlineHandleEventDto);

    /**
     * 通过handleId和sysType获取最新下线商品的事件
     *
     * @param handleType
     * @param handleId
     * @param sysType
     * @return
     */
    ServerResponseEntity<OfflineHandleEventVO> getProcessingEventByHandleTypeAndHandleId(Integer handleType,
                                                                                         Long handleId, Integer sysType);

    /**
     * 审核下线事件
     *
     * @param offlineHandleEventDto
     * @return
     */
    ServerResponseEntity<Void> auditOfflineEvent(OfflineHandleEventDTO offlineHandleEventDto);

    /**
     * 违规事件提交审核
     *
     * @param offlineHandleEventDto
     * @return
     */
    ServerResponseEntity<Void> updateToApply(OfflineHandleEventDTO offlineHandleEventDto);

    /**
     * 更新审核事件的状态
     *
     * @param offlineHandleEventDto
     */
    void update(OfflineHandleEventDTO offlineHandleEventDto);

    /**
     * 根据事件类型与事件id删除事件
     *
     * @param handleType
     * @param handleId
     * @return
     */
    ServerResponseEntity<Void> deleteByHandleTypeAndHandleId(Integer handleType, Long handleId);

    /**
     * 批量新增下线事件记录
     *
     * @param offlineHandleEventList
     * @return
     */
    ServerResponseEntity<Void> batchSave(List<OfflineHandleEventDTO> offlineHandleEventList);
}
