Sfoglia il codice sorgente

拆分订单推送卫健委失败消息换行显示

yh 1 settimana fa
parent
commit
326f1c53e9

+ 7 - 7
fs-admin/src/main/java/com/fs/his/controller/FsStoreSubOrderController.java

@@ -100,16 +100,16 @@ public class FsStoreSubOrderController extends BaseController
                         if (fsSubOrderResultVO == null || (fsSubOrderResultVO.getCode() == null || fsSubOrderResultVO.getCode() != 1)) {
                             if (fsSubOrderResultVO!=null && StringUtils.isNotBlank(fsSubOrderResultVO.getMsg())) {
                                 errorCount++;
-                                msg.append(errorCount).append(".订单 ").append(vo.getOrderCode()).append(" 推送失败,失败原因:").append(fsSubOrderResultVO.getMsg()).append("\\n");
+                                msg.append(errorCount).append(".订单 ").append(vo.getOrderCode()).append(" 推送失败,失败原因:").append(fsSubOrderResultVO.getMsg()).append("<br/><br/>");
                             } else {
                                 errorCount++;
-                                msg.append(errorCount).append(".订单 ").append(vo.getOrderCode()).append(" 推送失败\\n");
+                                msg.append(errorCount).append(".订单 ").append(vo.getOrderCode()).append(" 推送失败<br/><br/>");
                             }
 
                         }
                     } catch (Exception e) {
                         errorCount++;
-                        msg.append(errorCount).append(".订单 ").append(vo.getOrderCode()).append(" 推送失败,失败原因:").append(e.getMessage()).append("\\n");
+                        msg.append(errorCount).append(".订单 ").append(vo.getOrderCode()).append(" 推送失败,失败原因:").append(e.getMessage()).append("<br/><br/>");
                     }
                 }
             }
@@ -121,20 +121,20 @@ public class FsStoreSubOrderController extends BaseController
                     if (fsSubOrderResultVO == null || (fsSubOrderResultVO.getCode() == null || fsSubOrderResultVO.getCode() != 1)) {
                         if (fsSubOrderResultVO!=null && StringUtils.isNotBlank(fsSubOrderResultVO.getMsg())) {
                             errorCount++;
-                            msg.append(errorCount).append(".订单id ").append(orderId).append(" 推送失败,失败原因").append(fsSubOrderResultVO.getMsg()).append("\\n");
+                            msg.append(errorCount).append(".订单id ").append(orderId).append(" 推送失败,失败原因").append(fsSubOrderResultVO.getMsg()).append("<br/><br/>");
                         } else {
                             errorCount++;
-                            msg.append(errorCount).append(".订单id ").append(orderId).append(" 推送失败\\n");
+                            msg.append(errorCount).append(".订单id ").append(orderId).append(" 推送失败<br/><br/>");
                         }
 
                     }
                 } catch (Exception e) {
                     errorCount++;
-                    msg.append(errorCount).append(".订单id ").append(orderId).append(" 推送失败,失败原因:").append(e.getMessage()).append("\\n");
+                    msg.append(errorCount).append(".订单id ").append(orderId).append(" 推送失败,失败原因:").append(e.getMessage()).append("<br/><br/>");
                 }
             }
         }
-        return R.ok(msg.toString());
+        return R.ok(StringUtils.isNotEmpty(msg) ? msg.toString() : "推送成功");
     }
 
     /**