package com.cool.store.mapper;

import com.cool.store.request.close.file.CloseStoreMailAddressRequest;
import com.cool.store.entity.CloseStoreFileDetailDO;
import com.cool.store.request.close.file.CloseStoreFileApproveRequest;
import com.cool.store.request.close.file.CloseStoreMailInfoRequest;
import org.apache.ibatis.annotations.Param;
import tk.mybatis.mapper.common.Mapper;

public interface CloseStoreFileDetailMapper extends Mapper<CloseStoreFileDetailDO> {

    /**
     * 新增或编辑闭店资料邮寄地址信息
     * @param request 闭店资料邮寄地址信息Request
     * @return int
     */
    int insertOrUpdateMailAddress(CloseStoreMailAddressRequest request);

    /**
     * 新增或编辑闭店资料邮寄信息
     * @param request 闭店资料邮寄信息Request
     * @param mailStatus 邮寄状态
     * @return int
     */
    int insertOrUpdateMailInfo(@Param("request") CloseStoreMailInfoRequest request,
                               @Param("mailStatus") Boolean mailStatus);

    /**
     * 新增或编辑闭店资料信息
     * @param request 闭店材料审批Request
     * @return int
     */
    int insertOrUpdateFileInfoSelective(@Param("request") CloseStoreFileApproveRequest request,
                                        @Param("approveComplete") Boolean approveComplete);
}