| | |
| | | import com.doumee.core.annotation.trace.Trace; |
| | | import com.doumee.core.model.ApiResponse; |
| | | import com.doumee.core.model.PageWrap; |
| | | import com.doumee.core.utils.Constants; |
| | | import com.doumee.dao.business.model.SearchHistory; |
| | | import com.doumee.dao.web.request.goods.GoodsRequest; |
| | | import com.doumee.dao.web.response.goods.GoodsInfoResponse; |
| | | import io.swagger.annotations.Api; |
| | |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * Created by IntelliJ IDEA. |
| | |
| | | @ApiOperation("商品详情") |
| | | @GetMapping("/goodsInfo") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(paramType = "header", dataType = "String", name = "token", value = "用户token值", required = true), |
| | | @ApiImplicitParam(paramType = "query", dataType = "Integer", name = "goodsId", value = "商品主键", required = true), |
| | | @ApiImplicitParam(paramType = "query", dataType = "Integer", name = "memberId", value = "用户主键", required = true), |
| | | }) |
| | |
| | | return ApiResponse.success("生成成功",path); |
| | | } |
| | | |
| | | @LoginRequired |
| | | @ApiOperation("商品搜索历史") |
| | | @GetMapping("/searchHistoryList") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(paramType = "header", dataType = "String", name = "token", value = "用户token值", required = true), |
| | | }) |
| | | public ApiResponse<List<SearchHistory>> searchHistoryList(@RequestParam Integer type) { |
| | | return ApiResponse.success(searchHistoryService.findListByType(Constants.ZERO,getMemberId())); |
| | | } |
| | | |
| | | |
| | | @LoginRequired |
| | | @ApiOperation("清空搜索历史") |
| | | @GetMapping("/cleanSearchHistory") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(paramType = "header", dataType = "String", name = "token", value = "用户token值", required = true), |
| | | }) |
| | | public ApiResponse cleanSearchHistory(@RequestParam Integer type) { |
| | | searchHistoryService.cleanHistory(Constants.ZERO,getMemberId()); |
| | | return ApiResponse.success("操作成功"); |
| | | } |
| | | |
| | | |
| | | |
| | | } |