‘linchangsheng’ há 1 mês atrás
pai
commit
5bba473575

+ 17 - 2
src/main/java/com/gree/mall/manager/controller/admin/AdminWebsitController.java

@@ -23,12 +23,13 @@ import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
 
 import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
 import java.rmi.RemoteException;
 import java.util.List;
 
 @Slf4j
 @RestController
-@Api(value = "商户管理", tags ={"商户管理"} )
+@Api(value = "商家管理", tags ={"商家管理"} )
 @RequestMapping(value = "/admin/websit", produces = "application/json; charset=utf-8")
 public class AdminWebsitController {
 
@@ -44,7 +45,7 @@ public class AdminWebsitController {
 
     @ZfireList
     @PostMapping("/list")
-    @ApiOperation(value = "商管理")
+    @ApiOperation(value = "商管理")
     public ResponseHelper<IPage<AdminWebsitVO>> list(
             @RequestBody ZfireParamBean zfireParamBean
     ) throws RemoteServiceException {
@@ -53,6 +54,20 @@ public class AdminWebsitController {
         return ResponseHelper.success(adminDeptVOIPage, new TypeReference<AdminWebsitVO>() {});
     }
 
+    @PostMapping("/list/export")
+    @ApiOperation(value = "商家管理导出")
+    public void listExport(
+            @RequestBody ZfireParamBean zfireParamBean,
+            HttpServletRequest request,
+            HttpServletResponse response
+    ) throws Exception {
+        ZfireParamBean zfireParam = FieldUtils.supplyParam(zfireParamBean);
+        IPage<AdminWebsitVO> adminDeptVOIPage = adminWebsitLogic.list(new Page(zfireParam.getPageNum(), zfireParam.getPageSize()), zfireParam);
+        //3.导出
+        FieldUtils.exportData(adminDeptVOIPage.getRecords(), zfireParam.getExportFields(), request, response);
+    }
+
+
 
     @GetMapping("/zone/list")
     @ApiOperation("区域列表")