| | |
| | | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.common.core.domain.R; |
| | | import com.ruoyi.common.core.utils.poi.ExcelUtil; |
| | | import com.ruoyi.common.security.utils.SecurityUtils; |
| | | import com.ruoyi.goods.domain.dto.*; |
| | | import com.ruoyi.goods.domain.vo.MgtGoodsPageVo; |
| | |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | import javax.annotation.Resource; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.util.List; |
| | | |
| | | /** |
| | |
| | | return R.ok(page.setRecords(mgtGoodsPageVoList)); |
| | | } |
| | | |
| | | @RequestMapping(value = "/exportPageMgtGoods", method = RequestMethod.POST) |
| | | @ApiOperation(value = "导出商品列表") |
| | | public void exportPageMgtGoods(@RequestBody MgtGoodsPageDto mgtGoodsPageDto, HttpServletResponse response) { |
| | | Page<MgtGoodsPageVo> page = new Page<>(); |
| | | page.setSize(2000); |
| | | page.setCurrent(1); |
| | | List<MgtGoodsPageVo> mgtGoodsPageVoList = goodsService.pageMgtGoods(page,mgtGoodsPageDto); |
| | | ExcelUtil<MgtGoodsPageVo> util = new ExcelUtil<MgtGoodsPageVo>(MgtGoodsPageVo.class); |
| | | util.exportExcel(response, mgtGoodsPageVoList, "商品列表"); |
| | | } |
| | | |
| | | @RequestMapping(value = "/getMgtGoodsTotal", method = RequestMethod.POST) |
| | | @ApiOperation(value = "获取商品统计") |
| | | public R<MgtGoodsTotalVo> getMgtGoodsTotal(@RequestBody MgtBaseDto mgtBaseDto) { |