| | |
| | | import com.xzx.gc.common.request.BaseController; |
| | | import com.xzx.gc.model.JsonResult; |
| | | import com.xzx.gc.service.BaseAccountService; |
| | | import com.xzx.gc.shop.dto.AddGoodsOrderDto; |
| | | import com.xzx.gc.shop.dto.XcxGoodsListDto; |
| | | import com.xzx.gc.shop.dto.XcxScoreDetailsDto; |
| | | import com.xzx.gc.shop.dto.*; |
| | | import com.xzx.gc.shop.service.GoodsService; |
| | | import com.xzx.gc.shop.service.OrderService; |
| | | import com.xzx.gc.shop.service.ScoreDetailsService; |
| | | import com.xzx.gc.shop.vo.GoodsCategoryVo; |
| | | import com.xzx.gc.shop.vo.XcxGoodsDetailVo; |
| | | import com.xzx.gc.shop.vo.XcxGoodsListVo; |
| | | import com.xzx.gc.shop.vo.XcxScoreDetailsVo; |
| | | import com.xzx.gc.shop.vo.*; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import io.swagger.annotations.ApiResponse; |
| | |
| | | ) |
| | | @PostMapping(value = "/goods/goodsList") |
| | | public JsonResult<PageInfo<XcxGoodsListVo>> goodsList(@RequestBody XcxGoodsListDto xcxGoodsListDto, HttpServletRequest request) { |
| | | String userId = getUserId(request); |
| | | xcxGoodsListDto.setUserId(userId); |
| | | return JsonResult.success(goodsService.findGoodsListInPage(xcxGoodsListDto)); |
| | | } |
| | | |
| | |
| | | return JsonResult.success(goodsService.findGoodsDetails(id)); |
| | | } |
| | | |
| | | @ApiOperation("商品搜索历史记录") |
| | | @ApiResponses( |
| | | @ApiResponse(code = 200, message = "success", response = GoodsSearchVo.class) |
| | | ) |
| | | @PostMapping(value = "/goods/goodsSearch") |
| | | public JsonResult<List<GoodsSearchVo>> goodsSearch(@RequestBody GoodsSearchDto goodsSearchDto, HttpServletRequest request) { |
| | | String userId = getUserId(request); |
| | | goodsSearchDto.setUserId(userId); |
| | | return JsonResult.success(goodsService.goodsSearch(goodsSearchDto)); |
| | | } |
| | | |
| | | @ApiOperation("商品搜索历史记录--删除") |
| | | @PostMapping(value = "/goods/delGoodsSearch/{id}") |
| | | public Result<String> delGoodsSearch (@PathVariable("id") Long id, HttpServletRequest request) { |
| | | goodsService.delGoodsSearch(id, getUserId(request)); |
| | | return Result.success(); |
| | | } |
| | | |
| | | @ApiOperation("商品搜索历史记录--全部清空") |
| | | @PostMapping(value = "/goods/delAllSearch") |
| | | public Result<String> delAllSearch (@RequestBody GoodsSearchDto goodsSearchDto, HttpServletRequest request) { |
| | | goodsService.delAllSearch(getUserId(request)); |
| | | return Result.success(); |
| | | } |
| | | |
| | | } |