package com.rrtx.services.api.customer.service.impl;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.rrtx.fap.starter.mybatis.plus.entity.QueryRequest;
import com.rrtx.fap.starter.mybatis.plus.service.impl.BaseServiceImpl;
import com.rrtx.services.api.customer.mapper.CustomerMapper;
import com.rrtx.services.api.customer.service.ICustomerService;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

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

/**
 * ClassName: IDeptService<br>
 * Description: IDeptService <br>
 * Company: rrtx
 *
 * @author rrtx
 * @version v1.0.0    2019/7/24 5:16 PM  xugz    文件初始创建
 */
@Service
@Transactional(propagation = Propagation.SUPPORTS, readOnly = true, rollbackFor = Exception.class)
public class CustomerServiceImpl extends BaseServiceImpl<CustomerMapper, Map> implements ICustomerService {
	/**
	 * 登录微信用户查询
	 * @param queryParam
	 * @return
	 */
	@Override
	public IPage<Map> getCustomer( QueryRequest request,Map queryParam) {
		Page page = new Page<>(request.getPageNum(), request.getPageSize());
		return this.baseMapper.getCustomer(page,queryParam);
	}

	@Override
	public List<Map> getOrderTotal(Map queryParam) {
		return this.baseMapper.getOrderTotal(queryParam);
	}


}
