package com.hotent.uc.controller;


import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.hotent.base.annotation.ApiGroup;
import com.hotent.base.annotation.DataPermission;
import com.hotent.base.constants.ApiGroupConsts;
import com.hotent.base.controller.BaseController;
import com.hotent.base.model.CommonResult;
import com.hotent.base.query.PageList;
import com.hotent.base.query.QueryFilter;
import com.hotent.uc.manager.DingApiManager;
import com.hotent.uc.manager.DingUserManager;
import com.hotent.uc.manager.ExtOrgLogManager;
import com.hotent.uc.model.OrgExternalDept;
import com.hotent.uc.model.OrgExternalSynLog;
import com.hotent.uc.model.Role;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

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

/**
 * 调用外部组织机构同步日志接口 接口控制器
 *
 * @company 广州宏天软件股份有限公司
 * @author pangquan
 * @since 2020-10-30
 */
@RestController
@RequestMapping("/uc/orgExtLog/v1/")
@Api(tags="同步组织机构日志记录")
@ApiGroup(group= {ApiGroupConsts.GROUP_UC})
public class OrgExtLogController extends BaseController<ExtOrgLogManager, OrgExternalSynLog> {
	@Autowired
	private ExtOrgLogManager extOrgLogManager;


	/**
	 * 查询角色
	 * @param filter
	 * @return
	 * @throws Exception
	 */
	@RequestMapping(value="log/getLogPage",method=RequestMethod.POST, produces = {
			"application/json; charset=utf-8" })
	@ApiOperation(value = "获取记录日志（带分页信息）", httpMethod = "POST", notes = "获取记录日志")
	@DataPermission
	public PageList<OrgExternalSynLog> getRolePage(@ApiParam(name = "filter", value = "查询参数", required = true) @RequestBody QueryFilter filter) throws Exception{
		PageList<OrgExternalSynLog> list = extOrgLogManager.query(filter);
		return list;
	}




}
