| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.api.business; |
| | | |
| | | import com.doumee.api.BaseController; |
| | | import com.doumee.core.annotation.excel.ExcelExporter; |
| | | import com.doumee.core.annotation.pr.PreventRepeat; |
| | | import com.doumee.service.business.third.model.ApiResponse; |
| | | import com.doumee.service.business.third.model.PageData; |
| | | import com.doumee.service.business.third.model.PageWrap; |
| | | import com.doumee.dao.business.model.WmsInterfaceLog; |
| | | import com.doumee.service.business.WmsInterfaceLogService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.apache.shiro.authz.annotation.RequiresPermissions; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | /** |
| | | * @author æ±è¹è¹ |
| | | * @date 2023/11/30 15:33 |
| | | */ |
| | | @Api(tags = "WMS平尿¥å£äº¤äºè®°å½") |
| | | @RestController |
| | | @RequestMapping("/business/wmsInterfaceLog") |
| | | public class WmsInterfaceLogController extends BaseController { |
| | | |
| | | @Autowired |
| | | private WmsInterfaceLogService interfaceLogService; |
| | | |
| | | @PreventRepeat |
| | | @ApiOperation("æ°å»º") |
| | | @PostMapping("/create") |
| | | @RequiresPermissions("business:interfacelog:create") |
| | | public ApiResponse create(@RequestBody WmsInterfaceLog interfaceLog) { |
| | | return ApiResponse.success(interfaceLogService.create(interfaceLog)); |
| | | } |
| | | |
| | | @ApiOperation("æ ¹æ®IDå é¤") |
| | | @GetMapping("/delete/{id}") |
| | | @RequiresPermissions("business:interfacelog:delete") |
| | | public ApiResponse deleteById(@PathVariable Integer id) { |
| | | interfaceLogService.deleteById(id); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | @ApiOperation("æ¹éå é¤") |
| | | @GetMapping("/delete/batch") |
| | | @RequiresPermissions("business:interfacelog:delete") |
| | | public ApiResponse deleteByIdInBatch(@RequestParam String ids) { |
| | | String [] idArray = ids.split(","); |
| | | List<Integer> idList = new ArrayList<>(); |
| | | for (String id : idArray) { |
| | | idList.add(Integer.valueOf(id)); |
| | | } |
| | | interfaceLogService.deleteByIdInBatch(idList); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | @ApiOperation("æ ¹æ®IDä¿®æ¹") |
| | | @PostMapping("/updateById") |
| | | @RequiresPermissions("business:interfacelog:update") |
| | | public ApiResponse updateById(@RequestBody WmsInterfaceLog interfaceLog) { |
| | | interfaceLogService.updateById(interfaceLog); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | @ApiOperation("å页æ¥è¯¢") |
| | | @PostMapping("/page") |
| | | @RequiresPermissions("business:interfacelog:query") |
| | | public ApiResponse<PageData<WmsInterfaceLog>> findPage (@RequestBody PageWrap<WmsInterfaceLog> pageWrap) { |
| | | return ApiResponse.success(interfaceLogService.findPage(pageWrap)); |
| | | } |
| | | |
| | | @ApiOperation("导åºExcel") |
| | | @PostMapping("/exportExcel") |
| | | @RequiresPermissions("business:interfacelog:exportExcel") |
| | | public void exportExcel (@RequestBody PageWrap<WmsInterfaceLog> pageWrap, HttpServletResponse response) { |
| | | ExcelExporter.build(WmsInterfaceLog.class).export(interfaceLogService.findPage(pageWrap).getRecords(), "䏿¹å¹³å°æ¥å£äº¤äºè®°å½", response); |
| | | } |
| | | |
| | | @ApiOperation("æ ¹æ®IDæ¥è¯¢") |
| | | @GetMapping("/{id}") |
| | | @RequiresPermissions("business:interfacelog:query") |
| | | public ApiResponse<WmsInterfaceLog> findById(@PathVariable Integer id) { |
| | | return ApiResponse.success(interfaceLogService.findById(id)); |
| | | } |
| | | } |