Commit 9bef5663ec56e2961fb943d4f351cec799780abb

Authored by chenyonghong
1 parent ff0ede88

fix -> sdk -> 扩展参数字段

fw-hermes-sdk/src/main/java/cn/fw/hermes/sdk/api/para/MsgParamCondition.java
@@ -76,7 +76,7 @@ public class MsgParamCondition { @@ -76,7 +76,7 @@ public class MsgParamCondition {
76 76
77 private MsgParamCondition(MsgTypeEnum msgTypeEnum, TextContent textContent, LocationContent locationContent, FaceContent faceContent, 77 private MsgParamCondition(MsgTypeEnum msgTypeEnum, TextContent textContent, LocationContent locationContent, FaceContent faceContent,
78 CustomContent customContent, boolean unitMsg, List<? extends BaseContent> contentList, boolean useOfflineMsg, 78 CustomContent customContent, boolean unitMsg, List<? extends BaseContent> contentList, boolean useOfflineMsg,
79 - OfflinePushInfo offlinePushInfo, Integer msgLifeTime, Long userId, BusinessType businessType) { 79 + OfflinePushInfo offlinePushInfo, Integer msgLifeTime, Long userId, BusinessType businessType,boolean isStaff) {
80 this.msgTypeEnum = msgTypeEnum; 80 this.msgTypeEnum = msgTypeEnum;
81 this.textContent = textContent; 81 this.textContent = textContent;
82 this.locationContent = locationContent; 82 this.locationContent = locationContent;
@@ -89,6 +89,7 @@ public class MsgParamCondition { @@ -89,6 +89,7 @@ public class MsgParamCondition {
89 this.msgLifeTime = msgLifeTime; 89 this.msgLifeTime = msgLifeTime;
90 this.userId = userId; 90 this.userId = userId;
91 this.businessType = businessType; 91 this.businessType = businessType;
  92 + this.isStaff = isStaff;
92 } 93 }
93 94
94 /** 95 /**
@@ -209,9 +210,10 @@ public class MsgParamCondition { @@ -209,9 +210,10 @@ public class MsgParamCondition {
209 * @param lifeTime 离线保留时长(秒) 最长7天 210 * @param lifeTime 离线保留时长(秒) 最长7天
210 * @param userId 目标 211 * @param userId 目标
211 * @param useOffline 是否离线推送 212 * @param useOffline 是否离线推送
  213 + * @param isStaff 消息接收人是否为业务人员,必填
212 * @return 214 * @return
213 */ 215 */
214 - public static Builder getCustomMsg(String desc, String title, Map<String, Object> ext, Integer lifeTime, Long userId, boolean useOffline) { 216 + public static Builder getCustomMsg(String desc, String title, Map<String, Object> ext, Integer lifeTime, Long userId, boolean useOffline,Boolean isStaff) {
215 CustomContent customContent = new CustomContent(); 217 CustomContent customContent = new CustomContent();
216 title = title == null ? "" : title; 218 title = title == null ? "" : title;
217 customContent.setData(title); 219 customContent.setData(title);
@@ -227,7 +229,8 @@ public class MsgParamCondition { @@ -227,7 +229,8 @@ public class MsgParamCondition {
227 .setMsgLifeTime(lifeTime) 229 .setMsgLifeTime(lifeTime)
228 .setUserId(userId) 230 .setUserId(userId)
229 .setUnitMsg(false) 231 .setUnitMsg(false)
230 - .setUseOfflineMsg(useOffline); 232 + .setUseOfflineMsg(useOffline)
  233 + .setIsStaff(isStaff);
231 if (useOffline) { 234 if (useOffline) {
232 OfflinePushInfo o = new OfflinePushInfo(); 235 OfflinePushInfo o = new OfflinePushInfo();
233 o.setTitle(title); 236 o.setTitle(title);
@@ -255,6 +258,7 @@ public class MsgParamCondition { @@ -255,6 +258,7 @@ public class MsgParamCondition {
255 private Integer msgLifeTime; 258 private Integer msgLifeTime;
256 private Long userId; 259 private Long userId;
257 private BusinessType businessType; 260 private BusinessType businessType;
  261 + private Boolean isStaff;
258 262
259 263
260 public Builder setMsgType(MsgTypeEnum msgType) { 264 public Builder setMsgType(MsgTypeEnum msgType) {
@@ -317,6 +321,10 @@ public class MsgParamCondition { @@ -317,6 +321,10 @@ public class MsgParamCondition {
317 return this; 321 return this;
318 } 322 }
319 323
  324 + public Builder setIsStaff(Boolean isStaff) {
  325 + this.isStaff = isStaff;
  326 + return this;
  327 + }
320 public MsgParamCondition build() { 328 public MsgParamCondition build() {
321 if (CollectionUtils.isEmpty(contentList)) { 329 if (CollectionUtils.isEmpty(contentList)) {
322 unitMsg = false; 330 unitMsg = false;
@@ -328,7 +336,7 @@ public class MsgParamCondition { @@ -328,7 +336,7 @@ public class MsgParamCondition {
328 throw new IllegalArgumentException("目标不存在"); 336 throw new IllegalArgumentException("目标不存在");
329 } 337 }
330 return new MsgParamCondition(msgTypeEnum, textContent, locationContent, faceContent, customContent, unitMsg, contentList, 338 return new MsgParamCondition(msgTypeEnum, textContent, locationContent, faceContent, customContent, unitMsg, contentList,
331 - useOfflineMsg, offlinePushInfo, msgLifeTime, userId, businessType); 339 + useOfflineMsg, offlinePushInfo, msgLifeTime, userId, businessType,isStaff);
332 } 340 }
333 } 341 }
334 } 342 }