Sfoglia il codice sorgente

家长绑定学生,增加验证学生是否存在于白名单中

dzx 4 mesi fa
parent
commit
a277cc3723

+ 12 - 1
src/main/java/com/xjrsoft/module/organization/controller/UserController.java

@@ -31,8 +31,10 @@ import com.xjrsoft.common.utils.TreeUtil;
 import com.xjrsoft.common.utils.VoToColumnUtil;
 import com.xjrsoft.module.base.entity.BaseClass;
 import com.xjrsoft.module.base.entity.BaseGrade;
+import com.xjrsoft.module.base.entity.WhitelistManagement;
 import com.xjrsoft.module.base.service.IBaseClassService;
 import com.xjrsoft.module.base.service.IBaseGradeService;
+import com.xjrsoft.module.base.service.IWhitelistManagementService;
 import com.xjrsoft.module.hikvision.util.DataUtil;
 import com.xjrsoft.module.organization.dto.AddUserDto;
 import com.xjrsoft.module.organization.dto.BindOpenidDto;
@@ -153,7 +155,7 @@ public class UserController {
     private final HistoryService historyService;
 
     private final IBaseStudentSchoolRollService baseStudentSchoolRollService;
-
+    private final IWhitelistManagementService whitelistManagementService;
 
     @GetMapping(value = "/list")
     @ApiOperation(value = "用户列表(不分页)")
@@ -744,6 +746,15 @@ public class UserController {
             return RT.error("学生不存在!");
         }
 
+        List<WhitelistManagement> managementList = whitelistManagementService.list(
+                new QueryWrapper<WhitelistManagement>().lambda()
+                        .eq(WhitelistManagement::getUserId, dto.getUserId())
+        );
+        userStudentInfoVo.setWhitelistStatus(0);
+        if(!managementList.isEmpty()){
+            userStudentInfoVo.setWhitelistStatus(1);
+        }
+
         return RT.ok(userStudentInfoVo);
     }
 

+ 4 - 0
src/main/java/com/xjrsoft/module/organization/vo/UserStudentInfoVo.java

@@ -33,4 +33,8 @@ public class UserStudentInfoVo implements Serializable {
     @ApiModelProperty("班主任")
     public Long teacherId;
 
+
+    @ApiModelProperty("是否存在于白名单中(1:是 0:否)")
+    public Integer whitelistStatus;
+
 }