package cn.superdesk.uniorder.dubbo.provider.marketing;

import cn.superdesk.uniorder.common.rest.response.R;

import cn.superdesk.uniorder.dao.entity.marketing.UnifiedStatisticsVirtDimDay;
import cn.superdesk.uniorder.dto.param.marketing.UnifiedStatisticsVirtDimDayParam;
import cn.superdesk.uniorder.dto.param.marketing.UnifiedStatisticsVirtDimDayQueryCriteria;
import cn.superdesk.uniorder.dubbo.facade.marketing.DubboUnifiedStatisticsVirtDimDayService;
import cn.superdesk.uniorder.service.marketing.UnifiedStatisticsVirtDimDayService;
import cn.superdesk.uniorder.common.numerical.AnBeanUtils;
import com.alibaba.dubbo.config.annotation.Service;
import com.github.pagehelper.PageInfo;
import org.springframework.beans.factory.annotation.Autowired;

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

/**
 * @Description:
 * @Author: linjinyu
 * @Email linjinyu@avic-s.com
 * @CreateDate: 2021-09-06 12:00:09
 * @UpdateUser: linjinyu
 * @UpdateDate: 2021-09-06 12:00:09
 * @UpdateRemark: 修改内容
 * @Version: 1.0
 */
@Service(version = "1.0.0", retries = -1, timeout = 10000)
public class DubboUnifiedStatisticsVirtDimDayServiceImpl implements DubboUnifiedStatisticsVirtDimDayService {

	@Autowired
	private UnifiedStatisticsVirtDimDayService unifiedStatisticsVirtDimDayService;


	/****************************************** extends BaseService 部分 start ******************************************/

	@Override
	public void addObj(UnifiedStatisticsVirtDimDayParam param) {

		UnifiedStatisticsVirtDimDay unifiedStatisticsVirtDimDay = AnBeanUtils.copy(param, UnifiedStatisticsVirtDimDay.class);
		unifiedStatisticsVirtDimDayService.insertSelective(unifiedStatisticsVirtDimDay);

	}

	@Override
	public void updateObj(UnifiedStatisticsVirtDimDayParam param) {

		UnifiedStatisticsVirtDimDay unifiedStatisticsVirtDimDay = AnBeanUtils.copy(param, UnifiedStatisticsVirtDimDay.class);
		unifiedStatisticsVirtDimDayService.updateByPrimaryKeySelective(unifiedStatisticsVirtDimDay);
	}

	@Override
	public void deleteObj(Long id) {
		unifiedStatisticsVirtDimDayService.deleteObj(id);
	}

	@Override
	public UnifiedStatisticsVirtDimDay findById(Long id) {
		return unifiedStatisticsVirtDimDayService.findById(id);
	}

	@Override
	public PageInfo<UnifiedStatisticsVirtDimDay> findByPaging(Map<String, Object> conditions, Integer pageNun, Integer pageSize) {
		return unifiedStatisticsVirtDimDayService.findByPaging(conditions, pageNun, pageSize);
	}

	@Override
	public List<UnifiedStatisticsVirtDimDay> findAll(Map<String, Object> queryMap) {

		return unifiedStatisticsVirtDimDayService.findAll(queryMap);
	}

	/****************************************** extends BaseService 部分   end ******************************************/


	@Override
	public void addUnifiedStatisticsVirtDimDay(UnifiedStatisticsVirtDimDayParam param) {

		UnifiedStatisticsVirtDimDay unifiedStatisticsVirtDimDay = AnBeanUtils.copy(param, UnifiedStatisticsVirtDimDay.class);
		unifiedStatisticsVirtDimDayService.addUnifiedStatisticsVirtDimDay(unifiedStatisticsVirtDimDay);
	}

	@Override
	public void updateUnifiedStatisticsVirtDimDay(UnifiedStatisticsVirtDimDayParam param) {

		UnifiedStatisticsVirtDimDay unifiedStatisticsVirtDimDay = AnBeanUtils.copy(param, UnifiedStatisticsVirtDimDay.class);
		unifiedStatisticsVirtDimDayService.updateUnifiedStatisticsVirtDimDay(unifiedStatisticsVirtDimDay);
	}

	@Override
	public void deleteUnifiedStatisticsVirtDimDay(Long id) {
		unifiedStatisticsVirtDimDayService.deleteUnifiedStatisticsVirtDimDay(id);
	}

	@Override
	public UnifiedStatisticsVirtDimDay findUnifiedStatisticsVirtDimDayById(Long id) {
		return unifiedStatisticsVirtDimDayService.findUnifiedStatisticsVirtDimDayById(id);
	}

	@Override
	public R<List<UnifiedStatisticsVirtDimDay>> pageQuery(Map<String, Object> conditions, int pageNun, int pageSize) {
		return unifiedStatisticsVirtDimDayService.pageQuery(conditions, pageNun, pageSize);
	}

	@Override
	public R<List<UnifiedStatisticsVirtDimDay>> pageQueryGenericParam(UnifiedStatisticsVirtDimDayQueryCriteria criteria) {
		return unifiedStatisticsVirtDimDayService.pageQueryGenericParam(criteria);
	}

	/****************************************** 统计 start ******************************************/

	@Override
	public List<UnifiedStatisticsVirtDimDay> queryVirtOrderStatisticalDimDay(Map<String, Object> queryMap) {

		return unifiedStatisticsVirtDimDayService.queryVirtOrderStatisticalDimDay(queryMap);
	}

	@Override
	public void storeVirtOrderStatisticalDimDay(UnifiedStatisticsVirtDimDay item, Integer year, Integer month, Integer dayOfMonth) {
		unifiedStatisticsVirtDimDayService.storeVirtOrderStatisticalDimDay(item, year, month, dayOfMonth);
	}
}
