Browse Source

判断非空

njs 1 year ago
parent
commit
0da766f7a9

+ 2 - 2
suishenbang-wxportal/suishenbang-wxportal-common/src/main/java/com/dgtly/wxportal/service/impl/WxSendMessageServiceImpl.java

@@ -142,13 +142,13 @@ public class WxSendMessageServiceImpl implements IWxSendMessageService
                 }
                 String empName=userMapper.selectLoginNameByCustomerCode(customerId);
                 if(empName !=null){
-                    if(maps.get(customerId).get("touser").toString() !=null){
+                    if(maps !=null && maps.size()>0 && maps.get(customerId).get("touser").toString() !=null){
                         user=maps.get(customerId).get("touser").toString()+"|"+empName;
                     }else{
                         user=empName;
                     }
 
-                }else{
+                }else if(maps !=null && maps.size()>0){
                     user=maps.get(customerId).get("touser").toString();
                 }
                 String CustomerName=customerName+"("+customerId+")";