|
|
package com.yohoufo.product.controller;
|
|
|
|
|
|
import com.yoho.tools.docs.ApiOperation;
|
|
|
import com.yohoufo.common.ApiResponse;
|
|
|
import com.yohoufo.common.annotation.IgnoreSession;
|
|
|
import com.yohoufo.common.annotation.IgnoreSignature;
|
|
|
import com.yohoufo.common.cache.Cachable;
|
|
|
import com.yohoufo.product.response.SearchWordResp;
|
|
|
import com.yohoufo.product.service.impl.HotSearchWordService;
|
|
|
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.RestController;
|
|
|
|
|
|
import java.util.List;
|
|
|
|
|
|
/**
|
|
|
* Created by li.ma on 2018/9/27.
|
|
|
*/
|
|
|
@RestController
|
|
|
public class HotSearchWordController {
|
|
|
|
|
|
private final Logger LOG = LoggerFactory.getLogger(HotSearchWordController.class);
|
|
|
|
|
|
@Autowired
|
|
|
private HotSearchWordService hotSearchWordService;
|
|
|
|
|
|
@ApiOperation(name = "ufo.product.searchWord", desc="热搜词列表")
|
|
|
@IgnoreSignature
|
|
|
@IgnoreSession
|
|
|
@RequestMapping(params = "method=ufo.product.searchWord")
|
|
|
@Cachable(expire = 300)
|
|
|
public ApiResponse querySearchWord() {
|
|
|
LOG.info("in method=ufo.product.searchWord");
|
|
|
List<SearchWordResp> resp = hotSearchWordService.querySearchWord();
|
|
|
return new ApiResponse.ApiResponseBuilder().data(resp).code(200).message("热搜词列表").build();
|
|
|
}
|
|
|
} |
...
|
...
|
|