package com.kmall.schedule.service;

import com.kmall.schedule.dao.MkDistSellStatisMapper;
import com.kmall.schedule.entity.MkDistSellStatisEntity;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Date;
import java.util.List;
import java.util.Map;

/**
 * 购买商品生成销售分配记录统计，渠道销售统计Service实现类
 *
 * @author emato
 * @email admin@qhdswl.com
 * @date 2019-04-09 18:04:46
 */
@Service
public class QzMkDistSellStatisService {
    @Autowired
    private MkDistSellStatisMapper mkDistSellStatisMapper;

    
    public MkDistSellStatisEntity queryObject(Integer id) {
        return mkDistSellStatisMapper.queryObject(id);
    }


    public List<MkDistSellStatisEntity> queryList(Map<String, Object> map) {
        return mkDistSellStatisMapper.queryList(map);
    }


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


    public int save(MkDistSellStatisEntity mkDistSellStatis) {
//        mkDistSellStatis.setCreaterSn(ShiroUtils.getUserEntity().getUsername());
        mkDistSellStatis.setCreateTime(new Date());
        return mkDistSellStatisMapper.save(mkDistSellStatis);
    }


    public int update(MkDistSellStatisEntity mkDistSellStatis) {
//        mkDistSellStatis.setModerSn(ShiroUtils.getUserEntity().getUsername());
        mkDistSellStatis.setModTime(new Date());
        return mkDistSellStatisMapper.update(mkDistSellStatis);
    }


    public int delete(Integer id) {
        return mkDistSellStatisMapper.delete(id);
    }


    public int deleteBatch(Integer[]ids) {
        return mkDistSellStatisMapper.deleteBatch(ids);
    }
}
