package cn.superdesk.uniorder.dubbo.consumer._common;


import cn.superdesk.uniorder.common.rest.response.R;
import cn.superdesk.uniorder.dao.entity.common.UploadFiles;
import cn.superdesk.uniorder.dto.param._common.UploadFilesParam;
import cn.superdesk.uniorder.dto.param._common.UploadFilesQueryCriteria;
import cn.superdesk.uniorder.dubbo.facade._commom.DubboUploadFilesService;
import com.alibaba.dubbo.config.annotation.Reference;
import com.github.pagehelper.PageInfo;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

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

/**
 * @Description: 文件上传信息
 * @Author: linjinyu
 * @Email linjinyu@avic-s.com
 * @CreateDate: 2021-11-22 17:13:37
 * @UpdateUser: linjinyu
 * @UpdateDate: 2021-11-22 17:13:37
 * @UpdateRemark: 修改内容
 * @Version: 1.0
 */
@Slf4j
@Component
public class UploadFilesDubboConsumerService {

	@Reference(version = "1.0.0", timeout = 10000, retries = -1)
	private DubboUploadFilesService dubboUploadFilesService;


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

	public void addObj(UploadFilesParam param) {

		dubboUploadFilesService.addObj(param);

	}

	public void updateObj(UploadFilesParam param) {

		dubboUploadFilesService.updateObj(param);
	}

	public void deleteObj(Long id) {

		dubboUploadFilesService.deleteObj(id);
	}

	public UploadFiles findById(Long id) {

		return dubboUploadFilesService.findById(id);
	}

	public PageInfo<UploadFiles> findByPaging(Map<String, Object> conditions, Integer pageNun, Integer pageSize) {

		return dubboUploadFilesService.findByPaging(conditions, pageNun, pageSize);
	}

	public List<UploadFiles> findAll(Map<String, Object> queryMap) {

		return dubboUploadFilesService.findAll(queryMap);
	}

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


	public void addUploadFiles(UploadFilesParam param) {

		dubboUploadFilesService.addUploadFiles(param);
	}


	public void updateUploadFiles(UploadFilesParam param) {

		dubboUploadFilesService.updateUploadFiles(param);
	}


	public void deleteUploadFiles(Long id) {
		dubboUploadFilesService.deleteUploadFiles(id);
	}


	public UploadFiles findUploadFilesById(Long id) {

		return dubboUploadFilesService.findUploadFilesById(id);
	}

	public UploadFiles findUploadFilesByUid(String uid) {

		return dubboUploadFilesService.findUploadFilesByUid(uid);
	}

	public List<UploadFiles> findUploadFilesByIds(List<Long> ids) {

		return dubboUploadFilesService.findUploadFilesByIds(ids);
	}

	public List<UploadFiles> findUploadFilesByUids(List<String> uids) {

		return dubboUploadFilesService.findUploadFilesByUids(uids);
	}


	public R<List<UploadFiles>> pageQuery(Map<String, Object> conditions, int pageNun, int pageSize) {

		return dubboUploadFilesService.pageQuery(conditions, pageNun, pageSize);
	}


	public R<List<UploadFiles>> pageQueryGenericParam(UploadFilesQueryCriteria queryCriteria) {

		return dubboUploadFilesService.pageQueryGenericParam(queryCriteria);
	}
}
