| | |
| | | import com.panzhihua.common.model.dtos.shop.ComShopGoodsDTO; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.shop.AddShopGoodsVO; |
| | | import com.panzhihua.common.model.vos.shop.ShopStoreVO; |
| | | import com.panzhihua.common.service.community.CommunityService; |
| | | import com.panzhihua.common.validated.PageGroup; |
| | | import com.panzhihua.common.interfaces.ShopOperLog; |
| | |
| | | @ApiOperation(value = "商品分页搜索") |
| | | @PostMapping("/page") |
| | | public R search(@RequestBody @Validated(PageGroup.class) ComShopGoodsDTO comShopGoodsDTO){ |
| | | R<ShopStoreVO> storeInofR = communityService.getUserStoreInfo(getUserId()); |
| | | ShopStoreVO shopStoreVO = storeInofR.getData(); |
| | | comShopGoodsDTO.setStoreId(shopStoreVO.getId()); |
| | | return communityService.pageShopGoods(comShopGoodsDTO); |
| | | } |
| | | |
| | |
| | | @ShopOperLog(operType = 3) |
| | | @PostMapping("/add") |
| | | public R search(@RequestBody AddShopGoodsVO addShopGoodsVO){ |
| | | R<ShopStoreVO> storeInofR = communityService.getUserStoreInfo(getUserId()); |
| | | ShopStoreVO shopStoreVO = storeInofR.getData(); |
| | | addShopGoodsVO.setStoreId(shopStoreVO.getId()); |
| | | addShopGoodsVO.setName(shopStoreVO.getName()); |
| | | return communityService.saveShopGoods(addShopGoodsVO); |
| | | } |
| | | |