Commit 550cd1c6 authored by 赵啸非's avatar 赵啸非

修改消息发送null值序列化

parent 1aa522ff
......@@ -3,6 +3,7 @@ package com.mortals.xhx.base.system.message.impl;
import cn.hutool.core.util.IdUtil;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.alibaba.fastjson.serializer.SerializerFeature;
import com.mortals.framework.exception.AppException;
import com.mortals.framework.model.Context;
import com.mortals.framework.service.ICacheService;
......@@ -163,8 +164,8 @@ public class MessageServiceImpl implements MessageService {
try {
Map<String, String> header = new HashMap<>();
header.put(HEADER_CONTENT_TYPE, "application/json");
log.info("\n thirdPartyUrl=>{} \n reqbody=>{} \n type=>{}",sendUrl,JSON.toJSONString(deviceReqApiReq), DeviceMethodEnum.getByValue(deviceReq.getDeviceStatus()).getDesc());
resp = HttpUtil.doPost(sendUrl, header, JSON.toJSONString(deviceReqApiReq));
log.info("\n thirdPartyUrl=>{} \n reqbody=>{} \n type=>{}", sendUrl, JSON.toJSONString(deviceReqApiReq, SerializerFeature.WriteMapNullValue), DeviceMethodEnum.getByValue(deviceReq.getDeviceStatus()).getDesc());
resp = HttpUtil.doPost(sendUrl, header, JSON.toJSONString(deviceReqApiReq, SerializerFeature.WriteMapNullValue));
return JSON.parseObject(resp, ApiResp.class);
} catch (Exception e) {
log.error("异常:", e);
......
......@@ -3,8 +3,11 @@ package com.mortals.xhx.module.device.model;
import java.util.Date;
import java.util.List;
import java.util.ArrayList;
import com.alibaba.fastjson.annotation.JSONField;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.mortals.framework.annotation.Excel;
import com.mortals.framework.model.BaseEntityLong;
import com.mortals.xhx.base.framework.CustomJsonDateDeserializer;
......
......@@ -5,8 +5,7 @@ Content-Type: application/json
{
"page": 1,
"size": 10,
"deviceName": "123123"
"size": 100
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment