| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.stock.controller; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.framework.aspectj.lang.annotation.Log; |
| | | import com.ruoyi.framework.aspectj.lang.enums.BusinessType; |
| | | import com.ruoyi.framework.web.domain.AjaxResult; |
| | | import com.ruoyi.stock.dto.StockInRecordDto; |
| | | import com.ruoyi.stock.service.StockInRecordService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.util.CollectionUtils; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.List; |
| | | |
| | | @RestController |
| | | @Api(tags = "å
¥åº") |
| | | @RequestMapping("/stockInRecord") |
| | | public class StockInRecordController { |
| | | @Autowired |
| | | private StockInRecordService stockInRecordService; |
| | | |
| | | @GetMapping("/listPage") |
| | | @Log(title = "ç产å
¥åº-å
¥åºç®¡ç-å表", businessType = BusinessType.OTHER) |
| | | @ApiOperation(value = "å
¥åºç®¡çå表") |
| | | public AjaxResult listPage(Page page, StockInRecordDto stockInRecordDto) { |
| | | IPage<StockInRecordDto> result = stockInRecordService.listPage(page, stockInRecordDto); |
| | | return AjaxResult.success(result); |
| | | } |
| | | |
| | | |
| | | |
| | | @DeleteMapping("") |
| | | @Log(title = "å
¥åºç®¡ç-å é¤å
¥åº", businessType = BusinessType.DELETE) |
| | | public AjaxResult delete(@RequestBody List<Long> ids) { |
| | | if(CollectionUtils.isEmpty(ids)){ |
| | | return AjaxResult.error("è¯·éæ©è³å°ä¸æ¡æ°æ®"); |
| | | } |
| | | return AjaxResult.success(stockInRecordService.batchDelete(ids)); |
| | | } |
| | | |
| | | } |