热词自定义分数线功能完善
This commit is contained in:
@@ -2,12 +2,12 @@ package cn.lili.controller.setting;
|
||||
|
||||
import cn.lili.common.enums.ResultUtil;
|
||||
import cn.lili.common.vo.ResultMessage;
|
||||
import cn.lili.modules.search.entity.dto.HotWordsDTO;
|
||||
import cn.lili.modules.search.service.EsGoodsSearchService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
import io.swagger.annotations.ApiImplicitParams;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
@@ -34,13 +34,10 @@ public class HotWordsManagerController {
|
||||
}
|
||||
|
||||
@ApiOperation(value = "设置热词")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "keywords", value = "关键字"),
|
||||
@ApiImplicitParam(name = "point", value = "权重值")
|
||||
})
|
||||
@PostMapping
|
||||
public ResultMessage paymentForm(String keywords, Integer point) {
|
||||
esGoodsSearchService.setHotWords(keywords, point);
|
||||
public ResultMessage paymentForm(@Validated HotWordsDTO hotWords) {
|
||||
|
||||
esGoodsSearchService.setHotWords(hotWords);
|
||||
return ResultUtil.success();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user