|
@@ -1,5 +1,6 @@
|
|
|
package com.zhongzheng.controller.grade;
|
|
|
|
|
|
+import java.util.ArrayList;
|
|
|
import java.util.List;
|
|
|
import java.util.Arrays;
|
|
|
|
|
@@ -67,19 +68,30 @@ public class ClassGradeController extends BaseController {
|
|
|
/**
|
|
|
* 查询班级列表
|
|
|
*/
|
|
|
- @ApiOperation("是否出现官方按钮选择 1无官方接口按钮 2只有官方推送 3都有")
|
|
|
+ @ApiOperation("是否出现官方按钮选择 1官方信息推送 2官方学时推送 3账号开通 1,2,3 班级出现全部 学时审核出现学时推送 ")
|
|
|
@PreAuthorize("@ss.hasPermi('grade:grade:select')")
|
|
|
@GetMapping("/selectButton")
|
|
|
- public AjaxResult<Integer> selectButton(ClassGradeQueryBo bo) {
|
|
|
+ public AjaxResult<Integer[]> selectButton(ClassGradeQueryBo bo) {
|
|
|
ClassGradeVo classGradeVo = iClassGradeService.queryList(bo).get(0);
|
|
|
+ List<Integer> integers = new ArrayList<>();
|
|
|
Integer status =1;
|
|
|
- if (classGradeVo.getInterfaceAccountId() != null && classGradeVo.getInterfacePushId()!=null){
|
|
|
- status=3;
|
|
|
+ if (classGradeVo.getInterfaceAccountId() != null ){
|
|
|
+ integers.add(1);
|
|
|
}
|
|
|
- if (classGradeVo.getInterfaceAccountId() == null && classGradeVo.getInterfacePushId()!=null){
|
|
|
- status=2;
|
|
|
+ if (classGradeVo.getInterfacePushId()!=null){
|
|
|
+ integers.add(2);
|
|
|
}
|
|
|
- return AjaxResult.success(status);
|
|
|
+ if (classGradeVo.getInterfaceAccountId() == null ){
|
|
|
+ integers.add(3);
|
|
|
+ }
|
|
|
+ //初始化需要得到的数组
|
|
|
+ Integer[] array = new Integer[integers.size()];
|
|
|
+
|
|
|
+ //使用for循环得到数组
|
|
|
+ for(int i = 0; i < integers.size();i++){
|
|
|
+ array[i] = integers.get(i);
|
|
|
+ }
|
|
|
+ return AjaxResult.success(array);
|
|
|
}
|
|
|
|
|
|
|