| | |
| | | |
| | | |
| | | import com.github.pagehelper.PageInfo; |
| | | import com.xzx.gc.common.Result; |
| | | 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.service.GoodsService; |
| | | import com.xzx.gc.shop.vo.GoodsCategoryVo; |
| | | import com.xzx.gc.shop.vo.XcxGoodsDetailVo; |
| | | import com.xzx.gc.shop.vo.XcxGoodsListVo; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | |
| | | import io.swagger.annotations.ApiResponses; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import java.util.List; |
| | |
| | | @RestController |
| | | @Api(tags = {"积分商城--API商品管理"}) |
| | | @Slf4j |
| | | public class ApiGoodsController { |
| | | public class ApiGoodsController extends BaseController { |
| | | |
| | | @Autowired |
| | | private GoodsService goodsService; |
| | |
| | | return JsonResult.success(goodsService.findGoodsListInPage(xcxGoodsListDto)); |
| | | } |
| | | |
| | | @ApiOperation("商品详情") |
| | | @ApiResponses( |
| | | @ApiResponse(code = 200, message = "success", response = XcxGoodsDetailVo.class) |
| | | ) |
| | | @PostMapping(value = "/goods/goodsDetails/{id}") |
| | | public JsonResult<XcxGoodsDetailVo> goodsDetails(@PathVariable("id") Long id) { |
| | | return JsonResult.success(goodsService.findGoodsDetails(id)); |
| | | } |
| | | |
| | | @PostMapping(value = "/goods/order/add") |
| | | public Result<String> addOrder(@RequestBody AddGoodsOrderDto addGoodsOrderDto, HttpServletRequest request) { |
| | | String userId = getUserId(request); |
| | | addGoodsOrderDto.setUserId(userId); |
| | | return null; |
| | | } |
| | | |
| | | } |