package com.fjhx.controller.quality;

import com.fjhx.entity.quality.QualityDetails;
import com.fjhx.service.quality.QualityDetailsService;
import org.springblade.core.tool.api.R;
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;

/**
 * <p>
 * 质检明细 前端控制器
 * </p>
 *
 * @author ${author}
 * @since 2023-02-13
 */
@RestController
@RequestMapping("/qualityDetails")
public class QualityDetailsController {

    @Autowired
    private QualityDetailsService qualityDetailsService;

    // @PostMapping("/page")
    // public R page(@RequestBody Map<String, Object> condition){
    //     Page<QualityDetails> result = qualityDetailsService.getPage(condition);
    //     return R.success(result);
    // }
    //
    // @PostMapping("/add")
    // public R add(@RequestBody QualityDetailsVo qualityDetailsVo){
    //     qualityDetailsService.add(qualityDetailsVo);
    //     return R.success();
    // }
    //
    @PostMapping("/edit")
    public R edit(@RequestBody List<QualityDetails> qualityDetailsList) {
        qualityDetailsService.edit(qualityDetailsList);
        return R.success();
    }
    //
    // @PostMapping("/delete")
    // public R delete(@RequestBody QualityDetailsVo qualityDetailsVo){
    //     qualityDetailsService.delete(qualityDetailsVo);
    //     return R.success();
    // }

}

