zs 8 months ago
parent
commit
c0c7dcf2b0

+ 2 - 1
src/main/java/com/free/controller/TransferApplyController.java

@@ -125,7 +125,8 @@ public class TransferApplyController {
     // 获取客服人员id
     Long customer_id = Long.valueOf(String.valueOf(userMap.get("id")));
     updateData.setCustomer_id(customer_id);
-    this.service.updateById(data);
+    updateData.setIs_agree(data.getIs_agree());
+    this.service.updateById(updateData);
     TransferApply newData = this.service.getById(id);
     // 如果审核通过了, 则需要给申请人发送mq消息.申请人需要知道是谁跟自己对话
     if (newData.getIs_agree().equals(TransferApplyAgree)) {

+ 2 - 1
src/main/java/com/free/mq/MqService.java

@@ -1,5 +1,6 @@
 package com.free.mq;
 
+import com.fasterxml.jackson.annotation.JsonInclude;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -12,7 +13,6 @@ import org.springframework.stereotype.Service;
 import com.fasterxml.jackson.core.JsonProcessingException;
 import com.fasterxml.jackson.databind.ObjectMapper;
 import com.free.entity.TransferApply;
-import com.free.service.system.CustomerService;
 import com.free.utils.Utils;
 
 @Service
@@ -33,6 +33,7 @@ public class MqService {
   public void sendMsg(String ex, String queue, Map msg) throws JsonProcessingException {
     String strMsg = null;
     ObjectMapper mapper = new ObjectMapper();
+    mapper.setSerializationInclusion(JsonInclude.Include.NON_NULL);
     strMsg = mapper.writeValueAsString(msg);
     rabbitTemplate.convertAndSend(ex, queue, strMsg);
   }