package com.muyu.cloud.mart.controller;

import com.muyu.cloud.mart.service.DaShuJuService;
import com.muyu.common.core.domain.Result;
import com.muyu.common.core.web.controller.BaseController;
import com.muyu.common.core.web.page.TableDataInfo;
import com.muyu.domain.DaShuJu;
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;

import java.util.List;

import static com.muyu.common.core.utils.PageUtils.startPage;

/**
 * @Author：chaiyapeng
 * @Package：com.muyu.cloud.mart.controller
 * @Project：cloud-port
 * @name：DaShuJuController
 * @Date：2024/9/8 20:56
 */
@RestController
@RequestMapping("dsj")
public class DaShuJuController extends BaseController {

    @Autowired
    private DaShuJuService daShuJuService;

    @PostMapping("findDaShuJuList")
    public Result<TableDataInfo<DaShuJu>> findDaShuJuList(@RequestBody DaShuJu daShuJu){
        startPage();
        Result<List<DaShuJu>> list = daShuJuService.findDaShuJuList(daShuJu);
        return getDataTable(list.getData());
    }
}
