| | |
| | | import com.panzhihua.common.model.vos.community.convenient.ConvenientMerchantVO; |
| | | import com.panzhihua.common.model.vos.shop.*; |
| | | import com.panzhihua.common.service.community.CommunityService; |
| | | import com.panzhihua.common.validated.AddGroup; |
| | | import com.panzhihua.common.validated.PutGroup; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiImplicitParam; |
| | |
| | | @Slf4j |
| | | @RestController |
| | | @RequestMapping("/shopFlower/") |
| | | @Api(tags = {"商城服务"}) |
| | | @Api(tags = {"花城商城服务"}) |
| | | public class ShopFlowerApi extends BaseController { |
| | | |
| | | @Resource |
| | |
| | | } |
| | | |
| | | @ApiOperation(value = "查询商品详情", response = ComShopFlowerGoodsVO.class) |
| | | @PostMapping("shopGoodsDetail") |
| | | @GetMapping("shopGoodsDetail") |
| | | @ApiImplicitParam(name = "goodsId", value = "商品id", required = true) |
| | | public R shopGoodsDetail(@RequestParam("goodsId") Long goodsId) { |
| | | return communityService.shopFlowerGoodsDetail(goodsId); |
| | | } |
| | | @ApiOperation(value = "删除商品") |
| | | @DeleteMapping("/goods/delete") |
| | | public R deleteShopGoods(@RequestParam("goodsId") Long goodsId) { |
| | | return communityService.deleteFlowerShopGoods(goodsId); |
| | | } |
| | | @ApiOperation(value = "商品上下架") |
| | | @ApiImplicitParams({@ApiImplicitParam(name = "id", value = "商品Id"), |
| | | @ApiImplicitParam(name = "status", value = "1.上架 2.下架 ")}) |
| | | @GetMapping("/goods/changeStatus") |
| | | public R changeStatus(@RequestParam("id") Long id, @RequestParam("status") Integer status) { |
| | | return communityService.changeFlowerStatus(id, status); |
| | | } |
| | | @ApiOperation(value = "编辑商品") |
| | | @PostMapping("/goods/edit/{id}") |
| | | public R editShopGoods(@PathVariable("id") Long id, |
| | | @RequestBody @Validated(AddGroup.class) AddShopFlowerGoodsVO addShopGoodsVO) { |
| | | return communityService.editFlowerShopGoods(id, addShopGoodsVO); |
| | | } |
| | | @ApiOperation(value = "新增商品") |
| | | @PostMapping("/goods/save") |
| | | public R saveShopGoods(@RequestBody @Validated(AddGroup.class) AddShopFlowerGoodsVO addShopGoodsVO) { |
| | | return communityService.saveFlowerShopGoods(addShopGoodsVO); |
| | | } |
| | | |
| | | @ApiOperation(value = "查询用户收货地址列表", response = ComShopUserAddressVO.class) |
| | |
| | | return R.fail("请重新登陆"); |
| | | } |
| | | orderPayDTO.setOpenId(loginUserInfo.getOpenid()); |
| | | return communityService.wxPay(orderPayDTO); |
| | | return communityService.wxPayFlower(orderPayDTO); |
| | | } |
| | | |
| | | /** |