package com.chinacreator.video.restful.dao;

import java.util.List;
import java.util.Map;
import org.apache.ibatis.annotations.Param;
import org.springframework.cache.annotation.Cacheable;
import org.springframework.stereotype.Component;

/**
 * 自有短信订购
 * @author xu.zhou
 * @date 20220317
 */
@Component
public interface CallSendDao {

	/**
	 * 根据SPID查找能力平台产品
	 * @param spid
	 * @return
	 */
	@Cacheable(value = "univideo_sqaopconf",keyGenerator = "wiselyKeyGenerator")
	List<Map> qrySpAopConfBySpid(@Param("spid")String spid);
	
	/**
	 * 添加日志
	 * @param map
	 * @return
	 */
	int addSmsorderLog(Map map);
	
	/**
	 * 查询是否有无需验证token配置
	 * @param channel
	 * @param cpid
	 * @param spid
	 * @return 大于0代表有配置，不要验证token，等于0代表无配置，要验证token
	 */
	int isTokenVali(@Param("channel")String channel,@Param("cpid")String cpid,@Param("spid")String spid);
	
	/**
	 * 根据token更新日志记录表
	 * @param map
	 * @return
	 */
	int updSmsorderLog(Map map);

	/**
	 * 添加华为短信订购日志
	 * @param map
	 * @return
	 */
	int addHuaweiSmsorderLog(Map map);
}
