/**   
* @Title: WPayServiceImpl.java 
* @Package com.platform.service.impl 
* @Description: TODO(用一句话描述该文件做什么) 
* @author kiosk
* @date 2017年8月29日 下午2:58:01 
* @version V1.0   
*/
package com.platform.service.impl;

import java.util.List;

import javax.annotation.Resource;

import com.platform.dao.*;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.platform.pojo.EpayConfig;
import com.platform.pojo.EpayConfigExample;
import com.platform.pojo.InterfaceInvokeLog;
import com.platform.pojo.WxTransactionJournal;
import com.platform.pojo.WxpayConfig;
import com.platform.pojo.WxpayConfigExample;
import com.platform.service.IEPayService;
import com.platform.service.WPayService;

/** 
* @ClassName: WPayServiceImpl 
* @Description: TODO(这里用一句话描述这个类的作用) 
* @author kiosk
* @date 2017年8月29日 下午2:58:01 
*  
*/
@Service("WPayService")
@Transactional(rollbackFor=Exception.class)
public class WPayServiceImpl implements WPayService{
	@Resource
	private InterfaceInvokeLogMapper interfaceInvokeLogMapper;//引入dao mapper
	@Resource
	private WxTransactionJournalMapper wxTransactionJournalMapper;//引入dao mapper
	@Resource
	private WxpayConfigMapper wxpayConfigMapper;//引入dao mapper
	/**
	 * 
	* @Title: saveInvokeLog 
	* @Description: TODO(插入调用日志方法) 
	* @param @param interfaceInvokeLog
	* @param @return    设定文件 
	* @return int    返回类型 
	* @throws
	 */
	public int saveInvokeLog(InterfaceInvokeLog interfaceInvokeLog){
		return interfaceInvokeLogMapper.insertSelective(interfaceInvokeLog);
	}
	
	/**
	 * 
	* @Title: saveTransactionJournal 
	* @Description: TODO(插入流水表方法) 
	* @param @param transactionJournal
	* @param @return    设定文件 
	* @return int    返回类型 
	* @throws
	 */
	public int saveTransactionJournal(WxTransactionJournal transactionJournal){
		return wxTransactionJournalMapper.insertSelective(transactionJournal);
	}
	
	/**
	 * 获取微信支付参数
	 */
	public List<WxpayConfig> getConfigList1(WxpayConfigExample example){
		return wxpayConfigMapper.selectByExample(example);
	}

	/* (non-Javadoc)
	 * @see com.platform.service.WPayService#deletebyid(java.lang.String)
	 */
	@Override
	public boolean deletebyid(String transaction_id) {
		// TODO Auto-generated method stub
		return wxTransactionJournalMapper.deletebyid(transaction_id);
	}
	
}
