package com.chinacreator.video.restful.service;


import com.chinacreator.video.bean.OrderInfo;
import com.chinacreator.video.mapper.ChannelDao;
import com.chinacreator.video.restful.dao.CheckSyncDao;
import com.chinacreator.video.validate.*;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Map;

@Service
public class CheckSyncService {

    @Autowired
    private CheckSyncDao checkSyncDao;




    @Autowired
    private IpValidate ipValidate;


    @Autowired
    private ChannelValidate channelValidate;


    public void check(OrderInfo orderInfo) throws Exception {
        //渠道验证
        channelValidate.validate(orderInfo.getChannel());
        ipValidate.volidate(orderInfo,"0");
    }

    public void  insertSync(Map<String,String> params){
        checkSyncDao.insertSync(params);
    }
}
