Browse Source

公共询价消息,设置type和sourceId

dongbw 7 years ago
parent
commit
b4bc4fffe0

+ 12 - 0
src/main/java/com/uas/ps/inquiry/entity/MessageModel.java

@@ -16,6 +16,10 @@ public class MessageModel {
      * 备注
      */
     private String remark;
+    /**
+     * 来源id
+     */
+    private Long sourceId;
     /**
      * 消息接收者uu
      */
@@ -168,4 +172,12 @@ public class MessageModel {
     public void setConsumerApp(String consumerApp) {
         this.consumerApp = consumerApp;
     }
+
+    public Long getSourceId() {
+        return sourceId;
+    }
+
+    public void setSourceId(Long sourceId) {
+        this.sourceId = sourceId;
+    }
 }

+ 7 - 0
src/main/java/com/uas/ps/inquiry/service/impl/PublicInquiryServiceImpl.java

@@ -87,6 +87,11 @@ public class PublicInquiryServiceImpl implements PublicInquiryService {
      */
     private final String SOURCERAPP = "B2B";
 
+    /**
+     * 消息类型 (在B2B消息中拼接跳转单据详情url请求时需要)
+     */
+    private final String INQUIRY_TYPE = "公共询价";
+
     /**
      * 询价种类
      */
@@ -200,11 +205,13 @@ public class PublicInquiryServiceImpl implements PublicInquiryService {
                                 content = u.getUserName() + content;
                             }
                             MessageModel model = new MessageModel();
+                            model.setType(INQUIRY_TYPE);
                             model.setProducerApp(sourceApp);
                             model.setConsumerType(CUST_TYPE);
                             model.setConsumerApp(CONSUMERAPP);
                             model.setContent(content);
                             model.setRemark(product.getCmpCode());
+                            model.setSourceId(item.getId());
                             model.setReceiverEnuu(user.getEnuu());
                             model.setReceiverUu(user.getUseruu());
                             model.setSenderEnuu(item.getInquiry().getEnUU());