package com.fjhx.controller.supplier;

import com.fjhx.entity.supplier.SupplierContacts;
import com.fjhx.service.supplier.SupplierContactsService;
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;

/**
 * <p>
 * 供应商联系人 前端控制器
 * </p>
 *
 * @author ${author}
 * @since 2022-08-08
 */
@RestController
@RequestMapping("/supplierContacts")
public class SupplierContactsController {

    @Autowired
    private SupplierContactsService supplierContactsService;

    /**
     * 供应商联系信息详情
     */
    @PostMapping("/details")
    public R details(@RequestBody SupplierContacts supplierContacts) {
        supplierContacts = supplierContactsService.getOne(SupplierContacts::getSupplierId, supplierContacts.getId());
        return R.success(supplierContacts);
    }

}

