package com.gxwebsoft.cms.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.gxwebsoft.cms.entity.CmsContactLead;
import com.gxwebsoft.cms.param.CmsContactLeadParam;
import com.gxwebsoft.common.core.web.PageResult;

import java.util.List;

/**
 * 联系表单/销售线索Service
 *
 * @author 科技小王子
 * @since 2026-03-30
 */
public interface CmsContactLeadService extends IService<CmsContactLead> {

    /**
     * 分页关联查询
     *
     * @param param 查询参数
     * @return PageResult<CmsContactLead>
     */
    PageResult<CmsContactLead> pageRel(CmsContactLeadParam param);

    /**
     * 关联查询全部
     *
     * @param param 查询参数
     * @return List<CmsContactLead>
     */
    List<CmsContactLead> listRel(CmsContactLeadParam param);

    /**
     * 提交联系表单（不需要登录）
     *
     * @param lead 表单数据
     * @param ip   客户端IP
     * @return boolean
     */
    boolean submit(CmsContactLead lead, String ip);
}
