package cn.iocoder.yudao.module.inspection.controller;

import cn.iocoder.yudao.framework.common.pojo.CommonResult;
import cn.iocoder.yudao.module.inspection.entity.InspectionHomePartner;
import cn.iocoder.yudao.module.inspection.service.IInspectionHomePartnerService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import cn.iocoder.yudao.module.core.controller.BaseController;

/**
 * 【请填写功能名称】Controller
 *
 * @author ruoyi
 * @date 2023-08-02
 */
@RestController
@RequestMapping("/admin-api/system/homePartner")
public class InspectionHomePartnerController extends BaseController
{
    @Autowired
    private IInspectionHomePartnerService InspectionHomePartnerService;

    /**
     * 新增【请填写功能名称】
     */
    @PostMapping("/add")
    public CommonResult add(@RequestBody InspectionHomePartner homePartner)
    {
        InspectionHomePartnerService.insertInspectionHomePartner(homePartner);
        return success();
    }


    /**
     * 删除【请填写功能名称】
     */
    @PostMapping("/del")
    public CommonResult remove(@RequestParam("goodsId") Long  goodsId)
    {
        return toAjax(InspectionHomePartnerService.deleteInspectionHomePartnerById(goodsId));
    }
}
