ÎļþÃû´Ó server/visits/dmvisit_admin/src/main/java/com/doumee/api/business/InterfaceLogController.java ÐÞ¸Ä |
| | |
| | | import com.doumee.core.model.ApiResponse; |
| | | import com.doumee.core.model.PageWrap; |
| | | import com.doumee.core.model.PageData; |
| | | import com.doumee.dao.business.WmsInterfaceLogMapper; |
| | | import com.doumee.dao.business.model.InterfaceLog; |
| | | import com.doumee.dao.business.model.WmsInterfaceLog; |
| | | import com.doumee.service.business.InterfaceLogService; |
| | | 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.apache.shiro.authz.annotation.RequiresPermissions; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import javax.servlet.http.HttpServletResponse; |
| | |
| | | * @author æ±è¹è¹ |
| | | * @date 2023/11/30 15:33 |
| | | */ |
| | | @Api(tags = "䏿¹å¹³å°æ¥å£äº¤äºè®°å½") |
| | | @Api(tags = "WMS平尿¥å£äº¤äºè®°å½") |
| | | @RestController |
| | | @RequestMapping("/business/interfaceLog") |
| | | public class InterfaceLogController extends BaseController { |
| | | @RequestMapping("/business/wmsInterfaceLog") |
| | | public class WmsInterfaceLogController extends BaseController { |
| | | |
| | | @Autowired |
| | | private InterfaceLogService interfaceLogService; |
| | | private WmsInterfaceLogService interfaceLogService; |
| | | |
| | | @PreventRepeat |
| | | @ApiOperation("æ°å»º") |
| | | @PostMapping("/create") |
| | | @RequiresPermissions("business:interfacelog:create") |
| | | public ApiResponse create(@RequestBody InterfaceLog interfaceLog) { |
| | | public ApiResponse create(@RequestBody WmsInterfaceLog interfaceLog) { |
| | | return ApiResponse.success(interfaceLogService.create(interfaceLog)); |
| | | } |
| | | |
| | |
| | | @ApiOperation("æ ¹æ®IDä¿®æ¹") |
| | | @PostMapping("/updateById") |
| | | @RequiresPermissions("business:interfacelog:update") |
| | | public ApiResponse updateById(@RequestBody InterfaceLog interfaceLog) { |
| | | public ApiResponse updateById(@RequestBody WmsInterfaceLog interfaceLog) { |
| | | interfaceLogService.updateById(interfaceLog); |
| | | return ApiResponse.success(null); |
| | | } |
| | |
| | | @ApiOperation("å页æ¥è¯¢") |
| | | @PostMapping("/page") |
| | | @RequiresPermissions("business:interfacelog:query") |
| | | public ApiResponse<PageData<InterfaceLog>> findPage (@RequestBody PageWrap<InterfaceLog> pageWrap) { |
| | | 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<InterfaceLog> pageWrap, HttpServletResponse response) { |
| | | ExcelExporter.build(InterfaceLog.class).export(interfaceLogService.findPage(pageWrap).getRecords(), "䏿¹å¹³å°æ¥å£äº¤äºè®°å½", response); |
| | | 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 findById(@PathVariable Integer id) { |
| | | public ApiResponse<WmsInterfaceLog> findById(@PathVariable Integer id) { |
| | | return ApiResponse.success(interfaceLogService.findById(id)); |
| | | } |
| | | } |