package com.bjtdba.api.controller;

import com.bjtdba.api.apiservice.SystemService;
import org.springframework.beans.factory.annotation.Configurable;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;
import java.util.Map;

@RequestMapping("/api")
@RestController
@Configurable
public class SystemController {
    @Resource
    private SystemService systemService;

    /**
     * 轮播图
     * @param key
     * @return
     */
    @GetMapping("/nologin/banner/{key}")
    public Object banner(@PathVariable String key){
        return  systemService.banner(key);
    }

    /**
     * 4级地址接口
     * @return
     */
    @GetMapping("/city/new_lst")
    public Object new_lst(){
        return systemService.new_lst();
    }

    @GetMapping("/city/new_city_lst")
    public Object new_city_lst(@RequestParam Map<String,String> pmap){
        return  systemService.new_city_lst(pmap);
    }

    /**
     * 热门搜索
     */
    @GetMapping("/common/{key}")
    public  Object common(@PathVariable String key){
        return systemService.common(key);
    }


    /**
     * 查询反馈类型
     * @param Hmap
     * @return
     */
    @GetMapping("/common/feedback_type_new")
    public Object feedback_type_new(@RequestHeader Map<String,String> Hmap){

        return systemService.feedback_type_new(Hmap);
    }

    @GetMapping("/sysconfig/xiaoShare")
    public Object  queryByKey(){
        return  systemService.queryByKey();
    }
}
