package com.ruoyi.system.controller;

import com.alibaba.fastjson.JSONArray;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.system.service.IItemListQueryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author xyx
 * @date 2024/4/22
 */
@RestController
@RequestMapping("/item")
public class ItemListQueryController extends BaseController {

    @Autowired
    private IItemListQueryService iItemListQueryService;

    @PostMapping("/getList")
    public TableDataInfo getItems(@RequestBody String sskId){
        JSONArray itemList = iItemListQueryService.getItemList(sskId);
        return getDataTable(itemList);
    }

}
