package com.handong.smartservice.mapper;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

@Mapper
public interface LocationMapper {
    List<Map<String, Object>> selectLocation(Boolean isCount, Long offset, Long limit, 
        String date_start, String date_end, String name, String description, String address);
    
    int insertLocation(Map<String, Object> params);

    int updateLocation(Long location_id, Long pid, String name, 
        String description, String address);
    
    int changeStateLocation(List<Long> ids, int state);

    int changePidLocation(List<Long> pids, Long new_pid);

    List<Map<String, Object>> selectLocationParentTree(List<Long> ids);

    // ver2
    List<Map<String, Object>> selectRootNode(boolean isDbRoot, String date_start, String date_end, 
        String name, String description, String address);

    List<Map<String, Object>> selectLocationChildTree(boolean queryAll, Long pid, String date_start, String date_end, 
        String name, String description, String address);
}
