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

import cn.superdesk.uniorder.common.rest.response.R;
import cn.superdesk.uniorder.dao.entity.operation.UnifiedOrderIssuesFlowing;
import cn.superdesk.uniorder.dto.param.operation.UnifiedOrderIssuesFlowingParam;
import cn.superdesk.uniorder.dto.param.operation.UnifiedOrderIssuesFlowingQueryCriteria;
import cn.superdesk.uniorder.dto.vo.operation.UnifiedOrderIssuesFlowingVo;
import cn.superdesk.uniorder.dubbo.facade.operation.DubboUnifiedOrderIssuesFlowingService;
import cn.superdesk.uniorder.service.operation.UnifiedOrderIssuesFlowingService;
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-06-25 14:22:13
 * @UpdateUser: linjinyu
 * @UpdateDate: 2021-06-25 14:22:13
 * @UpdateRemark: 修改内容
 * @Version: 1.0
 */
@Service(version = "1.0.0", retries = -1, timeout = 10000)
public class DubboUnifiedOrderIssuesFlowingServiceImpl implements DubboUnifiedOrderIssuesFlowingService {

	@Autowired
	private UnifiedOrderIssuesFlowingService unifiedOrderIssuesFlowingService;

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

	@Override
	public void addObj(UnifiedOrderIssuesFlowingParam param) {

		UnifiedOrderIssuesFlowing unifiedOrderIssuesFlowing = AnBeanUtils.copy(param, UnifiedOrderIssuesFlowing.class);
		unifiedOrderIssuesFlowingService.insertSelective(unifiedOrderIssuesFlowing);

	}

	@Override
	public void updateObj(UnifiedOrderIssuesFlowingParam param) {

		UnifiedOrderIssuesFlowing unifiedOrderIssuesFlowing = AnBeanUtils.copy(param, UnifiedOrderIssuesFlowing.class);
		unifiedOrderIssuesFlowingService.updateByPrimaryKeySelective(unifiedOrderIssuesFlowing);
	}

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

	@Override
	public UnifiedOrderIssuesFlowing findById(Long id) {
		return unifiedOrderIssuesFlowingService.findById(id);
	}

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

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

		return unifiedOrderIssuesFlowingService.findAll(queryMap);
	}

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


	@Override
	public void addUnifiedOrderIssuesFlowing(UnifiedOrderIssuesFlowingParam param) {

		UnifiedOrderIssuesFlowing unifiedOrderIssuesFlowing = AnBeanUtils.copy(param, UnifiedOrderIssuesFlowing.class);
		unifiedOrderIssuesFlowingService.addUnifiedOrderIssuesFlowing(unifiedOrderIssuesFlowing);
	}

	@Override
	public void updateUnifiedOrderIssuesFlowing(UnifiedOrderIssuesFlowingParam param) {

		UnifiedOrderIssuesFlowing unifiedOrderIssuesFlowing = AnBeanUtils.copy(param, UnifiedOrderIssuesFlowing.class);
		unifiedOrderIssuesFlowingService.updateUnifiedOrderIssuesFlowing(unifiedOrderIssuesFlowing);
	}

	@Override
	public void deleteUnifiedOrderIssuesFlowing(Long id) {
		unifiedOrderIssuesFlowingService.deleteUnifiedOrderIssuesFlowing(id);
	}

	@Override
	public UnifiedOrderIssuesFlowing findUnifiedOrderIssuesFlowingById(Long id) {
		return unifiedOrderIssuesFlowingService.findUnifiedOrderIssuesFlowingById(id);
	}

	@Override
	public R<List<UnifiedOrderIssuesFlowingVo>> pageQuery(UnifiedOrderIssuesFlowingQueryCriteria queryCriteria, int pageNun, int pageSize) {
		return unifiedOrderIssuesFlowingService.pageQuery(queryCriteria, pageNun, pageSize);

	}
}
