1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162 |
- package com.cdf.controller.back;
- import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
- import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
- import com.cdf.common.PageInfo;
- import com.cdf.common.ResultData;
- import com.cdf.entity.Brand;
- import com.cdf.entity.HotOutline;
- import com.cdf.request.BaseRequest;
- import com.cdf.request.BrandApiParam;
- import com.cdf.service.IBrandService;
- import com.cdf.service.impl.ExcelService;
- import org.springframework.beans.factory.annotation.Autowired;
- import org.springframework.web.bind.annotation.*;
- import javax.servlet.http.HttpServletRequest;
- import javax.servlet.http.HttpServletResponse;
- /**
- * <p>
- * 前端控制器
- * </p>
- *
- * @author
- * @since 2023-12-06
- */
- @RestController
- @RequestMapping("/back/brand")
- public class BrandController {
- @Autowired
- IBrandService brandService;
- @Autowired
- ExcelService excelService;
- @PostMapping("/list")
- public ResultData list(@RequestBody BrandApiParam param){
- return ResultData.ok(brandService.pageList(param));
- }
- @GetMapping("updateBrandInfo")
- public ResultData updateBrandInfo() throws Exception {
- new Runnable() {
- @Override
- public void run() {
- try {
- brandService.updateBrandInfo();
- } catch (Exception e) {
- throw new RuntimeException(e);
- }
- }
- }.run();
- return ResultData.ok();
- }
- @GetMapping("/downBrandExcel")
- public void downBrandExcel(HttpServletRequest request, HttpServletResponse response) throws Exception {
- excelService.downBrandExcel(request,response);
- }
- }
|