|  |  | 
 |  |  | import com.doumee.core.annotation.excel.ExcelExporter; | 
 |  |  | import com.doumee.core.annotation.pr.PreventRepeat; | 
 |  |  | import com.doumee.core.model.ApiResponse; | 
 |  |  | import com.doumee.core.model.LoginUserInfo; | 
 |  |  | import com.doumee.core.model.PageData; | 
 |  |  | import com.doumee.core.model.PageWrap; | 
 |  |  | import com.doumee.dao.business.model.Orders; | 
 |  |  | 
 |  |  | import com.github.xiaoymin.knife4j.core.util.CollectionUtils; | 
 |  |  | import io.swagger.annotations.Api; | 
 |  |  | import io.swagger.annotations.ApiOperation; | 
 |  |  | import org.apache.shiro.SecurityUtils; | 
 |  |  | import org.apache.shiro.authz.annotation.RequiresPermissions; | 
 |  |  | import org.springframework.beans.factory.annotation.Autowired; | 
 |  |  | import org.springframework.web.bind.annotation.*; | 
 |  |  | 
 |  |  |     @RequiresPermissions("business:orders:exportExcel") | 
 |  |  |     public void exportExcel (@RequestBody PageWrap<Orders> pageWrap, HttpServletResponse response) { | 
 |  |  |         List<Orders> ordersList = ordersService.findPage(pageWrap).getRecords(); | 
 |  |  |  | 
 |  |  |  | 
 |  |  |  | 
 |  |  |  | 
 |  |  |  | 
 |  |  |         ExcelExporter.build(Orders.class).export(ordersList, "订单信息记录", response); | 
 |  |  |     } | 
 |  |  |  | 
 |  |  | 
 |  |  |     public ApiResponse findById(@PathVariable Integer id) { | 
 |  |  |         return ApiResponse.success(ordersService.findById(id)); | 
 |  |  |     } | 
 |  |  |  | 
 |  |  |     @ApiOperation("平台取消订单") | 
 |  |  |     @GetMapping("/cancel") | 
 |  |  |     @RequiresPermissions("business:orders:update") | 
 |  |  |     public ApiResponse cancel(@RequestParam Integer id) { | 
 |  |  |         LoginUserInfo loginUserInfo = (LoginUserInfo) SecurityUtils.getSubject().getPrincipal(); | 
 |  |  |         ordersService.platformCancel(id,loginUserInfo); | 
 |  |  |         return ApiResponse.success("操作成功"); | 
 |  |  |     } | 
 |  |  |  | 
 |  |  |  | 
 |  |  | } |