| | |
| | | import com.vincent.rsf.server.manager.entity.Stock; |
| | | import com.vincent.rsf.server.manager.service.StockService; |
| | | import com.vincent.rsf.server.system.controller.BaseController; |
| | | import io.swagger.annotations.Api; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.security.access.prepost.PreAuthorize; |
| | | import org.springframework.web.bind.annotation.*; |
| | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.util.*; |
| | | |
| | | @Api(tags = "库存信息") |
| | | @RestController |
| | | public class StockController extends BaseController { |
| | | |
| | |
| | | } |
| | | |
| | | @PreAuthorize("hasAuthority('manager:stock:list')") |
| | | @PostMapping("/inStock/num/page") |
| | | public R inStockpage(@RequestBody Map<String, Object> map) { |
| | | BaseParam baseParam = buildParam(map, BaseParam.class); |
| | | PageParam<Stock, BaseParam> pageParam = new PageParam<>(baseParam, Stock.class); |
| | | return R.ok().add(stockService.page(pageParam, pageParam.buildWrapper(true))); |
| | | } |
| | | |
| | | @PreAuthorize("hasAuthority('manager:stock:list')") |
| | | @PostMapping("/stock/list") |
| | | public R list(@RequestBody Map<String, Object> map) { |
| | | return R.ok().add(stockService.list()); |