package com.diaoyun.zion.chinafrica.service.impl;

import com.diaoyun.zion.chinafrica.dao.TbCfCouponUseDao;
import com.diaoyun.zion.chinafrica.entity.TbCfCouponUseEntity;
import com.diaoyun.zion.chinafrica.service.TbCfCouponUseService;
import com.diaoyun.zion.master.util.IdUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
import java.util.Map;

/**
 * 使用优惠券记录Service实现类
 *
 * @author G
 * @date 2019-08-14 09:11:47
 */
@Service("tbCfCouponUseService")
public class TbCfCouponUseServiceImpl implements TbCfCouponUseService {
    @Autowired
    private TbCfCouponUseDao tbCfCouponUseDao;

    @Override
    public TbCfCouponUseEntity queryObject(String useId) {
        return tbCfCouponUseDao.queryObject(useId);
    }

    @Override
    public List<TbCfCouponUseEntity> queryList(Map<String, Object> map) {
        return tbCfCouponUseDao.queryList(map);
    }

    @Override
    public int queryTotal(Map<String, Object> map) {
        return tbCfCouponUseDao.queryTotal(map);
    }

    @Override
    public int save(TbCfCouponUseEntity tbCfCouponUse) {
        tbCfCouponUse.setUseId(IdUtil.createIdbyUUID());
        return tbCfCouponUseDao.save(tbCfCouponUse);
    }

    @Override
    public int update(TbCfCouponUseEntity tbCfCouponUse) {
        return tbCfCouponUseDao.update(tbCfCouponUse);
    }

    @Override
    public int delete(String useId) {
        return tbCfCouponUseDao.delete(useId);
    }

    @Override
    public int deleteBatch(String[] useIds) {
        return tbCfCouponUseDao.deleteBatch(useIds);
    }
}
