/**
 * Copyright &copy; 2012-2016 <a href="https://github.com/thinkgem/jeesite">JeeSite</a> All rights reserved.
 */
package com.wechat.service;

import javax.validation.Valid;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.wechat.dao.MdeInvoiceTitleDao;
import com.wechat.model.dbEntity.MdeInvoiceTitle;

/**
 * 单表生成Service
 * 
 * @author tangwc
 * @version 2018-06-08
 */
@Service
public class MdeInvoiceTitleService {

	@Autowired
	private MdeInvoiceTitleDao mdeInvoiceTitleDao;

	public MdeInvoiceTitle getInvoiceByUserCode(String userCode) {
		return mdeInvoiceTitleDao.getInvoiceByUserCode(userCode);
	}
	public int insert(@Valid MdeInvoiceTitle mdeInvoiceTitle) {
		return mdeInvoiceTitleDao.insert(mdeInvoiceTitle);
	}


	public void deleteAllByUserCode(String userCode) {
		mdeInvoiceTitleDao.deleteAllByUserCode(userCode);
	}
}