Browse Source

Merge branch 'saas' of http://git.dayaedu.com/yonge/mec into sz_saas_category

zouxuan 11 months ago
parent
commit
68cdd599b4

+ 9 - 1
mec-biz/src/main/java/com/ym/mec/biz/service/impl/ExportServiceImpl.java

@@ -2754,7 +2754,7 @@ public class ExportServiceImpl implements ExportService {
         //获取对外订单关联的合作单位
         Map<Integer, String> cooperationOrganMap = new HashMap<>();
         List<Integer> cooperationOrganIds = studentPaymentOrderExportDtos.stream()
-                .filter(e -> OUTORDER.equals(e.getType()))
+                .filter(e -> OUTORDER.equals(e.getType()) || GroupType.OUTORDER == e.getGroupType() && (e.getType() != RENEW && e.getType() != APPLY))
                 .filter(e -> e.getMusicGroupId() != null)
                 .map(e -> Integer.valueOf(e.getMusicGroupId()))
                 .distinct()
@@ -2832,6 +2832,14 @@ public class ExportServiceImpl implements ExportService {
                     }
                 }
             }
+            //如果合作单位不存在取学员的第一个乐团的合作单位,乐团主管
+            if (basicOrder.getCooperationOrganName() == null) {
+                CooperationOrgan cooperationOrgan = studentService.getStudentEduTeacher(basicOrder.getUserId());
+                if (cooperationOrgan != null) {
+                    basicOrder.setCooperationOrganName(cooperationOrgan.getName());
+                    basicOrder.setEduTeacher(cooperationOrgan.getLinkman() != null ? cooperationOrgan.getLinkman() : basicOrder.getEduTeacher());
+                }
+            }
             //根据订单类型初始化业务数据
             Optional.ofNullable(groupTypeConsumerMap1.get(basicOrder.getGroupType())).ifPresent(consumer -> consumer.accept(basicOrder));
             this.setSubTypeDesc(basicOrder, userFirstVipMap, userFirstPracticeMap);

+ 8 - 2
mec-thirdparty/src/main/java/com/ym/mec/thirdparty/message/provider/JiguangPushPlugin.java

@@ -308,8 +308,14 @@ public class JiguangPushPlugin implements MessageSenderPlugin, InitializingBean
                 String ret = HttpUtil.get(baseUrl + "/v3/aliases/" + alias, data, HeaderMap);
                 if (StringUtils.isNotBlank(ret)) {
                     JSONObject json = JSONObject.parseObject(ret);
-
-                    json.getJSONArray("registration_ids").forEach(item -> removeIds.add(item.toString()));
+                    JSONArray registrationIds = json.getJSONArray("registration_ids");
+                    if (CollectionUtils.isNotEmpty(registrationIds)) {
+                        for (Object item : registrationIds) {
+                            if (item != null) {
+                                removeIds.add(item.toString());
+                            }
+                        }
+                    }
                 }
             } catch (Exception e) {
                 throw new ThirdpartyException("deviceRemoveAlias 查询别名绑定设备", e);