package com.lutao.cloud.admin.api.feign;

import com.lutao.cloud.admin.api.dto.SysLogDTO;
import com.lutao.cloud.common.core.constant.SecurityConstants;
import com.lutao.cloud.common.core.constant.ServiceNameConstants;
import com.lutao.cloud.common.core.util.MessageInfo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestHeader;

/**

 * @date 2018/6/28
 */
@FeignClient(contextId = "remoteLogService", value = ServiceNameConstants.UPMS_SERVICE)
public interface RemoteLogService{

	/**
	 * 保存日志
	 * @param sysLog 日志实体
	 * @param from 是否内部调用
	 * @return succes、false
	 */
	@PostMapping("/log/save")
	MessageInfo<Boolean> saveLog(@RequestBody SysLogDTO sysLog, @RequestHeader(SecurityConstants.FROM) String from);

}
