package com.storlead.sales.service.task;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.storlead.framework.auth.vo.LoginUser;
import com.storlead.framework.common.result.Result;
import com.storlead.framework.mybatis.service.MyBaseService;
import com.storlead.message.enums.MessageTypeEnum;
import com.storlead.sales.pojo.dto.customer.CustomerSearchSearchDTO;
import com.storlead.sales.pojo.entity.customer.*;
import com.storlead.sales.enums.ResourceTypeEnum;
import com.storlead.sales.pojo.dto.task.UpdateTaskDTO;
import com.storlead.sales.pojo.entity.task.TaskEntity;

import java.time.LocalDateTime;
import java.util.List;
import java.util.Map;
import java.util.Objects;

/**
 * <p>
 * 任务表 服务类
 * </p>
 *
 * @author chenkq
 * @since 2024-04-16
 */
public interface TaskService extends MyBaseService<TaskEntity> {

    /**
     * 保存任务
     * @param entity
     * @return
     */
    Boolean addTask(TaskEntity entity);

    /**
     * 获取下次跟进时间
     * @param id
     * @param type
     * @return
     */
    LocalDateTime getNextFollowUpTime(Long id, String type);


    /**
     * 根据表名获取一条数据的name
     * @param tableName
     * @param fieldColumn
     * @param id
     * @return
     */
    String getNameById(String tableName, String fieldColumn, Long id);

    /***
      * @Description: 完成任务
      * @Param:
      * @return:
      * @Author: YPZ
      * @Date: 2024/7/22 11:43
      */
    Result complete(UpdateTaskDTO dto);


    String getResourceTyepName(String resourceType, String resourceTypeId);

    Map<String,Object> getResourceTyepMap(String resourceType, String resourceTypeId);

    IPage<?> selectSimpleListVO(CustomerSearchSearchDTO customerSearchSearchDTO);
}
