Browse Source

线上系统繁忙处理

zouxuan 3 years ago
parent
commit
86d51ca36b

+ 5 - 3
mec-student/src/main/java/com/ym/mec/student/controller/ImGroupController.java

@@ -50,9 +50,11 @@ public class ImGroupController extends BaseController {
 
 	@ApiOperation("查询群详情")
 	@GetMapping(value = "/queryGroupDetail")
-	public Object queryGroupList(Long imGroupId) {
-
-		return succeed(imGroupService.get(imGroupId));
+	public Object queryGroupDetail(String imGroupId) {
+		if (imGroupId.contains("S") || imGroupId.contains("I")){
+			imGroupId = imGroupId.substring(1);
+		}
+		return succeed(imGroupService.get(Long.parseLong(imGroupId)));
 	}
 
 	@ApiOperation("查询群成员列表")

+ 5 - 2
mec-student/src/main/java/com/ym/mec/student/controller/PracticeGroupController.java

@@ -232,14 +232,17 @@ public class PracticeGroupController extends BaseController {
         }
         int studentExitChargePractices = practiceGroupDao.checkStudentExitChargePractice(sysUser.getId(),"2021-03-09 00:00:00");
         Student student = studentDao.get(sysUser.getId());
+        if(student == null){
+            throw new BizException("学员信息不存在");
+        }
         Map<String, Integer> result=new HashMap<>();
         result.put("organId", sysUser.getOrganId());
         result.put("isNewStudent", studentExitChargePractices<=0?0:1);
 
         List<PracticeGroup> userStatusPracticeGroups = practiceGroupDao.findUserStatusPracticeGroups(sysUser.getId(), null, PracticeGroupType.COME_ON_PACKAGE);
         long normalGroupNum = userStatusPracticeGroups.stream().filter(p -> GroupStatusEnum.NORMAL.equals(p.getGroupStatus())).count();
-
-        result.put("comeOnPackage", 1==student.getComeOnPackage()&&normalGroupNum<=0?1:0);
+        int comeOnPackage = student.getComeOnPackage()==null?0:student.getComeOnPackage();
+        result.put("comeOnPackage", 1==comeOnPackage&&normalGroupNum<=0?1:0);
         return succeed(result);
     }
 

+ 5 - 3
mec-web/src/main/java/com/ym/mec/web/controller/ImGroupController.java

@@ -65,9 +65,11 @@ public class ImGroupController extends BaseController {
 
 	@ApiOperation("查询群详情")
 	@GetMapping(value = "/queryGroupDetail")
-	public Object queryGroupList(Long imGroupId) {
-
-		return succeed(imGroupService.get(imGroupId));
+	public Object queryGroupDetail(String imGroupId) {
+		if (imGroupId.contains("S") || imGroupId.contains("I")){
+			imGroupId = imGroupId.substring(1);
+		}
+		return succeed(imGroupService.get(Long.parseLong(imGroupId)));
 	}
 
 	@ApiOperation("修改群信息")