package com.bjtdba.poster.controller;

import com.bjtdba.poster.service.PosterService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

@RestController
@RequestMapping("poster_service/posterService")
public class IndexController {

    @Autowired
    private PosterService posterService;

    @PostMapping(value = "/imgs")
    public Object index(@RequestBody Map<String,String> map) throws Exception {

        return posterService.select(map.get("imgId"),map.get("uid"),map.get("type"));
    }

}
