package com.uas.platform.b2b.v2.controller;

import com.uas.sso.entity.PartnershipRecordView;
import com.uas.platform.b2b.v2.service.PartnerShipService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * Created by hejq on 2017-09-29.
 *
 * 账户中心建立合作关系后如果有后续操作同步到平台进行
 *
 */
@Controller("v2.PartnerShipController")
@RequestMapping(value = "/public/partenrship")
public class PartnerShipController {

    @Autowired
    private PartnerShipService partnerShipService;

    @RequestMapping(method = RequestMethod.POST)
    @ResponseBody
    public void addVendor(PartnershipRecordView record) throws Exception {
        if(null != record) {
            partnerShipService.addVendor(record);
        }
    }
}
