Joburgess vor 5 Jahren
Ursprung
Commit
b9633aacbc

+ 6 - 6
edu-user/edu-user-server/src/main/java/com/keao/edu/user/service/impl/ExamOrganizationRelationServiceImpl.java

@@ -11,6 +11,7 @@ import java.util.Objects;
 import java.util.Set;
 import java.util.stream.Collectors;
 
+import com.keao.edu.common.service.SysMessageService;
 import com.keao.edu.thirdparty.message.provider.JiguangPushPlugin;
 import com.keao.edu.user.dao.*;
 import org.apache.commons.lang3.StringUtils;
@@ -62,13 +63,13 @@ public class ExamOrganizationRelationServiceImpl extends BaseServiceImpl<Long, E
 	@Autowired
 	private SysUserFeignService sysUserFeignService;
 	@Autowired
-	private SysMessageFeignService sysMessageFeignService;
-	@Autowired
 	private SysConfigService sysConfigService;
 	@Autowired
 	private TenantInfoDao tenantInfoDao;
 	@Autowired
 	private SysUserDao sysUserDao;
+	@Autowired
+	private SysMessageService sysMessageService;
 
 	public static final Set<ExamStatusEnum> EDIT_ABLE_EXAM_STATUS=new HashSet<>(Arrays.asList(ExamStatusEnum.SETTING,ExamStatusEnum.NOT_START,ExamStatusEnum.APPLYING,ExamStatusEnum.APPLIED));
 
@@ -156,7 +157,7 @@ public class ExamOrganizationRelationServiceImpl extends BaseServiceImpl<Long, E
 				throw new BizException("合作单位信息错误");
 			}
 			og.setSendUrlFlag(0);
-			og.setIsAllowArrangeExam(0);
+			og.setIsAllowArrangeExam(1);
 			og.setSettlementType(organization.getSettlementType());
 			og.setShareProfitAmount(organization.getShareProfitAmount());
 			og.setTotalRegistrationStudentNum(BigDecimal.ZERO.intValue());
@@ -287,10 +288,9 @@ public class ExamOrganizationRelationServiceImpl extends BaseServiceImpl<Long, E
 			Map<Integer, String> userPhoneMap = new HashMap<>();
 			userPhoneMap.put(examOrgan.getOrganId(), organUser.getPhone());
 
-			SysMessageParams sysMessageParams=new SysMessageParams(MessageTypeEnum.EXAM_REGISTRATION_URL_SMS,
+			sysMessageService.batchSendMessage(MessageTypeEnum.EXAM_REGISTRATION_URL_SMS,
 					userPhoneMap, null, 0, null, JiguangPushPlugin.PLUGIN_NAME,
 					tenantInfo.getName(), examinationBasic.getName(), expectRegistTime.toString(), examOrgan.getUrl());
-			sysMessageFeignService.batchSendMessage(sysMessageParams);
 		}
 
 		if(!CollectionUtils.isEmpty(needUpdate)){
@@ -309,7 +309,7 @@ public class ExamOrganizationRelationServiceImpl extends BaseServiceImpl<Long, E
 		Map<String, Object> params = new HashMap<String, Object>();
 		MapUtil.populateMap(params, queryInfo);
 
-		List<Integer> nextLevelOrganIds = organizationService.getChildOrganIds(queryInfo.getOrganId(), false);
+		List<Integer> nextLevelOrganIds = organizationService.getNextLevelOrganIds(queryInfo.getOrganId(), false);
 		params.put("organIds", nextLevelOrganIds);
 
 		List<Organization> dataList = new ArrayList<>();

+ 3 - 0
edu-user/edu-user-server/src/main/java/com/keao/edu/user/service/impl/OrganizationServiceImpl.java

@@ -244,6 +244,9 @@ public class OrganizationServiceImpl extends BaseServiceImpl<Integer, Organizati
 		if(includeSelf){
 			selfAndChildOrganIds.add(organization.getId());
 		}
+		if(CollectionUtils.isEmpty(selfAndChildOrganIds)){
+			selfAndChildOrganIds.add(0);
+		}
 		return selfAndChildOrganIds;
 	}