| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162 |
- package com.zhongzheng.controller.goods;
- import com.zhongzheng.common.core.controller.BaseController;
- import com.zhongzheng.common.core.domain.AjaxResult;
- import com.zhongzheng.common.core.page.TableDataInfo;
- import com.zhongzheng.modules.top.goods.bo.TopGoodsQueryBo;
- import com.zhongzheng.modules.top.goods.service.ITopGoodsService;
- import com.zhongzheng.modules.top.goods.vo.TopGoodsVo;
- import io.swagger.annotations.Api;
- import io.swagger.annotations.ApiOperation;
- import lombok.RequiredArgsConstructor;
- import org.springframework.beans.factory.annotation.Autowired;
- import org.springframework.web.bind.annotation.GetMapping;
- import org.springframework.web.bind.annotation.RequestMapping;
- import org.springframework.web.bind.annotation.RestController;
- import java.util.List;
- /**
- * 商品Controller
- *
- * @author hjl
- * @date 2021-10-12
- */
- @Api(value = "商品控制器", tags = {"商品管理"})
- @RequiredArgsConstructor(onConstructor_ = @Autowired)
- @RestController
- @RequestMapping("/sys/goods")
- public class TopGoodsController extends BaseController {
- private final ITopGoodsService iTopGoodsService;
- /**
- * 商品批量复制
- */
- @ApiOperation("商品批量复制(全量)")
- @GetMapping("/batch/copy/all")
- public AjaxResult<Void> goodsBatchCopyTenant() {
- return toAjax(iTopGoodsService.goodsBatchCopyTenant() ? 1 : 0);
- }
- /**
- * 商品关系ID处理(全量复制后的处理方法)
- */
- @ApiOperation("商品关系ID处理(全量复制后的处理方法)")
- @GetMapping("/batch/copy/dispose")
- public AjaxResult<Void> goodsBatchCopyDisposeTenant() {
- return toAjax(iTopGoodsService.goodsBatchCopyDisposeTenant() ? 1 : 0);
- }
- /**
- * 查询商品列表
- */
- @ApiOperation("查询商品列表")
- @GetMapping("/list")
- public TableDataInfo<TopGoodsVo> list(TopGoodsQueryBo bo) {
- startPage();
- List<TopGoodsVo> list = iTopGoodsService.selectList(bo);
- return getDataTable(list);
- }
- }
|