Эх сурвалжийг харах

submit:学习信息推送

yangdamao 2 жил өмнө
parent
commit
3ab9248b8b

+ 9 - 1
zhongzheng-system/src/main/java/com/zhongzheng/modules/grade/service/impl/ClassGradeUserServiceImpl.java

@@ -44,6 +44,7 @@ import com.zhongzheng.modules.goods.service.IGoodsService;
 import com.zhongzheng.modules.goods.vo.GoodsVo;
 import com.zhongzheng.modules.goods.vo.GoodsVo;
 import com.zhongzheng.modules.grade.bo.*;
 import com.zhongzheng.modules.grade.bo.*;
 import com.zhongzheng.modules.grade.domain.ClassGrade;
 import com.zhongzheng.modules.grade.domain.ClassGrade;
+import com.zhongzheng.modules.grade.domain.ClassGradeInterface;
 import com.zhongzheng.modules.grade.domain.StudyCountLog;
 import com.zhongzheng.modules.grade.domain.StudyCountLog;
 import com.zhongzheng.modules.grade.service.*;
 import com.zhongzheng.modules.grade.service.*;
 import com.zhongzheng.modules.grade.vo.*;
 import com.zhongzheng.modules.grade.vo.*;
@@ -153,6 +154,8 @@ public class ClassGradeUserServiceImpl extends ServiceImpl<ClassGradeUserMapper,
 
 
     @Autowired
     @Autowired
     private ICourseEducationTypeService iCourseEducationTypeService;
     private ICourseEducationTypeService iCourseEducationTypeService;
+    @Autowired
+    private IClassGradeInterfaceService iClassGradeInterfaceService;
 
 
 
 
     @Value("${aliyun.oss.endpoint}")
     @Value("${aliyun.oss.endpoint}")
@@ -540,8 +543,13 @@ public class ClassGradeUserServiceImpl extends ServiceImpl<ClassGradeUserMapper,
         if (Validator.isEmpty(userVo)) {
         if (Validator.isEmpty(userVo)) {
             return "用户不存在";
             return "用户不存在";
         }
         }
-        if (Validator.isEmpty(userVo.getInterfacePushId()) || !userVo.getInterfacePushId().equals(1L)) {
+        if (Validator.isEmpty(userVo.getInterfacePushId())) {
             return "没开通信息推送";
             return "没开通信息推送";
+        }else {
+            ClassGradeInterface gradeInterface = iClassGradeInterfaceService.getById(userVo.getInterfacePushId());
+            if (gradeInterface.getType() != 1){
+                return "没开通信息推送";
+            }
         }
         }
         if (Validator.isEmpty(userVo.getOfficialName())) {
         if (Validator.isEmpty(userVo.getOfficialName())) {
             return "没配置班号";
             return "没配置班号";