package shop.alien.store.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import org.springframework.transaction.annotation.Transactional;
import shop.alien.entity.store.LifeGroupBuyMain;
import shop.alien.entity.store.LifeGroupBuyThali;
import shop.alien.entity.store.dto.LifeGroupBuyDto;
import shop.alien.entity.store.vo.LifeGroupBuyThaliVo;

/**
 * 团购
 */
public interface LifeGroupBuyService extends IService<LifeGroupBuyMain> {

    @Transactional(rollbackFor = Exception.class)
    boolean saveThali(LifeGroupBuyDto lifeGroupBuyDto);

    LifeGroupBuyThali saveThaliNew(LifeGroupBuyDto lifeGroupBuyDto);

    IPage<LifeGroupBuyThaliVo> getThaliList(int page, int size, String storeId, String status, String groupName, String groupType);

    LifeGroupBuyThaliVo getThaliById(String id, String userId);

    boolean updateStatus(String id,String status, String approvalComments);

    boolean delThaliById(String id,String groupType);

    boolean updateNum(String id, String num);
}