package com.cool.store.service;

import com.cool.store.context.LoginUserInfo;
import com.cool.store.dto.pre.fry.*;
import com.cool.store.entity.PreFryQualificationApplyDO;
import com.cool.store.userholder.CurrentUser;
import com.cool.store.vo.PartnerUserInfoVO;
import com.github.pagehelper.PageInfo;

import java.util.List;

/**
 * @Author suzhuhong
 * @Date 2025/6/21 14:49
 * @Version 1.0
 */
public interface PreFryQualificationApplyService {

    /**
     * 提交预炸资质申请
     * @param request
     * @param user
     * @return
     */
    Long submitApply(ApplyDTO request, PartnerUserInfoVO user);

    /**
     * 重新提交预炸资质申请
     * @param request
     * @param user
     * @return
     */
    Long reSubmitApply(ApplyDTO request, PartnerUserInfoVO user);

    /**
     * 根据门店编码和申请类型查询
     * @param storeCode
     * @param applyType
     * @return
     */
    ApplyDTO  getByStoreCodeAndApplyType(String storeCode, Integer applyType);

    /**
     * 根据申请记录id查询审批记录
     * @param recordId
     * @return
     */
    List<ApprovalRecordDTO> getApprovalRecordById(Long recordId);

    /**
     * 管理页面列表
     * @param query
     * @return
     */
    PageInfo<ApplyManagementDTO> queryApplyManagementList(ApplyManagementQueryDTO query);

    /**
     * 获取申请详情
     * @param id
     * @return
     */
    ApplyDetailDTO getApplyDetail(Long id);

    /**
     * audit
     * @param applyAuditDTO
     * @param currentUser
     * @return
     */
    Boolean audit(ApplyAuditDTO applyAuditDTO, LoginUserInfo currentUser);

    /**
     * 获取门店申请最小的applyType
     * @param storeCode
     * @return
     */
    Integer getMinApplyType(String storeCode);

    /**
     * 根据门店查询当前申请类型状态
     * @param storeCode
     * @return
     */
    List<PreFryQualificationApplyDTO> getListByStoreCode(String storeCode);




}
