package cn.axzo.msg.center.notices.manager.api;

import cn.axzo.msg.center.domain.entity.MNSBatchMessageRequest;
import cn.axzo.msg.center.notices.common.lang.Page;
import cn.axzo.msg.center.notices.manager.api.dto.request.BatchMessageRequestDto;

import java.util.List;

/**
 * @Auther: szg
 * @Date: 2021/8/9 14:07
 * @Description:
 */
public interface BatchMessageRequestManger {

  /**
   * 保存批量请求对象
   * @param batchMessageRequest
   * @return
   */
  boolean saveBatchMessageRequest(MNSBatchMessageRequest batchMessageRequest);

  /**
   * 分页查询
   * @param dto
   * @return
   */
  Page<MNSBatchMessageRequest> queryPageByBatchMessageQueryRequestDto(BatchMessageRequestDto dto);

  /**
   * 批量短信拆分批次和生成批次
   * @param requestDto
   */
  List<String> batchMessageRequestSplitAndSave(MNSBatchMessageRequest requestDto);

  /**
   * 查询批量短信请求
   * @param appCode
   * @param requestNo
   * @return
   */
  MNSBatchMessageRequest queryBatchMessage(String appCode, String requestNo);

  /**
   * 修改统计信息
   * @param batchMessageRequest
   */
  void handleBatchMessageRequestStatistics(MNSBatchMessageRequest batchMessageRequest);

  /**
   * 修改短信批量请求为成功
   *
   * @param remark
   * @param id
   * @return
   */
  boolean updateRequestSuccess(String remark, Long id);

}
