package com.jeesharp.business.modules.mall.service;

import com.jeesharp.business.modules.mall.entity.MallBargainRecord;
import com.jeesharp.business.modules.mall.vo.MallBargainRecordInfoVO;
import com.jeesharp.business.modules.mall.vo.MallBargainRecordListVO;
import com.jeesharp.business.modules.mall.vo.MallBargainRecordQueryVO;
import com.jeesharp.framework.pojo.Page;
import com.jeesharp.framework.pojo.query.PageRespVO;
import com.jeesharp.framework.mybatis.core.service.BaseInterface;

import java.util.Map;

/**
 * 砍价记录 Service 接口
 */
public interface MallBargainRecordService extends BaseInterface<MallBargainRecord, MallBargainRecordQueryVO> {

    MallBargainRecordInfoVO getRecord(String id);

    PageRespVO<MallBargainRecordListVO> findRecordPage(Page<MallBargainRecord> page, MallBargainRecordQueryVO query);

    void createRecord(MallBargainRecord entity);

    void updateRecord(MallBargainRecord entity);
String startBargain(String activityId, String memberId);

    PageRespVO<MallBargainRecordListVO> getUserBargainRecords(String memberId, Page<MallBargainRecord> page);

    boolean isBargainCompleted(String recordId);

    void updateBargainStatus(String recordId, Integer status);

    void updateBargainRecord(MallBargainRecord record);

    Map<String, Object> calculateBargainProgress(String recordId);
}
