package com.xmomen.module.base.service.impl;

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

import com.xmomen.framework.mybatis.dao.MybatisDao;
import com.xmomen.module.base.entity.CdExpress;
import com.xmomen.module.base.entity.CdExpressMember;
import com.xmomen.module.base.model.ExpressTask;
import com.xmomen.module.base.service.ExpressMemberService;
import com.xmomen.module.base.service.ExpressService;
import com.xmomen.module.order.entity.TbOrder;

@Service
public class ExpressMemberServiceImpl implements ExpressMemberService {
	@Autowired
	MybatisDao mybatisDao;
	// 创建快递会员
	@Override
	@Transactional
	public void createExpressMember(CdExpressMember createExpress) {
			// 调用mybatisDao的save方法保存快递会员信息
			mybatisDao.save(createExpress);
	}
	
	// 更新快递会员
	@Transactional
	public void updateExpressMember(Integer id, CdExpressMember updateExpress) {
		// 设置快递会员的id
		updateExpress.setId(id);
		// 调用mybatisDao的update方法更新快递会员信息
		mybatisDao.update(updateExpress);
	}
	
	// 删除快递会员
	@Transactional
	public void delete(Integer id) {
		 // 调用mybatisDao的deleteByPrimaryKey方法删除快递会员信息
		 mybatisDao.deleteByPrimaryKey(CdExpress.class, id);
	}

}
