ResourcesGoodsPoolController.java 1.4 KB
package com.yohoufo.resource.controller;

import com.yoho.tools.docs.ApiOperation;
import com.yohoufo.common.ApiResponse;
import com.yohoufo.common.annotation.IgnoreSession;
import com.yohoufo.resource.service.IConfigTypeService;
import com.yohoufo.resource.service.impl.ResourcesGoodsPoolService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

/**
 * Created by li.ma on 2018/11/17.
 */
@RestController
public class ResourcesGoodsPoolController {
    private static final Logger logger = LoggerFactory.getLogger(ResourcesGoodsPoolController.class);

    @Autowired
    private ResourcesGoodsPoolService resourcesGoodsPoolService;

    /**
     * <p>获取配置列表,返回map</p>
     *
     */
    @ApiOperation(name = "ufo.resource.goodsPool", desc="获取首页资源位商品池")
    @RequestMapping(params = "method=ufo.resource.goodsPool")
    @ResponseBody
    @IgnoreSession
    public Map<Integer,Integer> goodsPoolList() {
        logger.info("goodsPool begin.");
        Map<Integer,Integer> data = resourcesGoodsPoolService.configTypeList();
        logger.info("goodsPool success. result is {}", data);
        return data;
    }
}