|
|
|
@ -14,14 +14,19 @@ import org.springblade.common.annotations.LocalServerUser;
|
|
|
|
|
import org.springblade.common.constant.RabbitConstant; |
|
|
|
|
import org.springblade.common.exception.CustomerException; |
|
|
|
|
import org.springblade.common.utils.CommonUtil; |
|
|
|
|
import org.springblade.core.secure.utils.AuthUtil; |
|
|
|
|
import org.springblade.core.tool.api.R; |
|
|
|
|
import org.springblade.core.tool.utils.DateUtil; |
|
|
|
|
import org.springblade.core.tool.utils.StringUtil; |
|
|
|
|
import org.springblade.core.tool.utils.WebUtil; |
|
|
|
|
import org.springframework.amqp.rabbit.connection.CorrelationData; |
|
|
|
|
import org.springframework.amqp.rabbit.core.RabbitTemplate; |
|
|
|
|
import org.springframework.validation.annotation.Validated; |
|
|
|
|
import org.springframework.web.bind.annotation.*; |
|
|
|
|
import org.springframework.web.context.request.RequestContextHolder; |
|
|
|
|
import org.springframework.web.context.request.ServletRequestAttributes; |
|
|
|
|
|
|
|
|
|
import javax.servlet.http.HttpServletRequest; |
|
|
|
|
import java.util.Date; |
|
|
|
|
import java.util.HashMap; |
|
|
|
|
import java.util.Map; |
|
|
|
@ -178,8 +183,13 @@ public class FactoryCommonController {
|
|
|
|
|
map.put("messageData", receiveInfoDTO); |
|
|
|
|
map.put("createTime", new Date().getTime()); |
|
|
|
|
map.put("flagType", "OrderStatusLog"); |
|
|
|
|
|
|
|
|
|
//将消息携带绑定键值
|
|
|
|
|
rabbitTemplate.convertAndSend(RabbitConstant.UNLOAD_CAR_COM_INFO_EXCHANGE, RabbitConstant.UNLOAD_CAR_COM_INFO_ROUTING, map); |
|
|
|
|
rabbitTemplate.convertAndSend(RabbitConstant.UNLOAD_CAR_COM_INFO_EXCHANGE, RabbitConstant.UNLOAD_CAR_COM_INFO_ROUTING, map,message -> { |
|
|
|
|
HttpServletRequest request = WebUtil.getRequest(); |
|
|
|
|
message.getMessageProperties().setHeader("Blade-Auth",request.getHeader("Blade-Auth")); |
|
|
|
|
return message; |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
return R.success("调用成功"); |
|
|
|
|
} catch (CustomerException e) { |
|
|
|
|