mingfu 1 месяц назад
Родитель
Сommit
68edec60fa

+ 5 - 2
ie-admin/src/main/java/com/ruoyi/web/controller/dz/DzCardsController.java

@@ -73,8 +73,9 @@ public class DzCardsController extends BaseController
     @ApiOperation("列表")
     public TableDataInfo list(DzCards dzCards)
     {
+        prepare(dzCards);
         startPage();
-        List<DzCards> list = dzCardsService.selectDzCardsList2(prepare(dzCards));
+        List<DzCards> list = dzCardsService.selectDzCardsList2(dzCards);
         return getDataTable(list);
     }
 
@@ -85,8 +86,10 @@ public class DzCardsController extends BaseController
             dzCards.setDeptId(SecurityUtils.getDeptId());
         } else if (UserTypeEnum.isSchool(userType)) {
             dzCards.setCampusId(sysUser.getUserTypeId());
+        } else if (UserTypeEnum.isTeacher(userType)) {
+            dzCards.setTeacherId(sysUser.getUserTypeId());
         }
-        if ((UserTypeEnum.isAgent(userType) || UserTypeEnum.isTeacher(userType)) && null == dzCards.getAgentId()) {
+        if ((UserTypeEnum.isAgent(userType)) && null == dzCards.getAgentId()) {
             //代理商及老师只能查看分配给自己的卡
             DzAgent agent = agentService.selectDzAgentByUserId(SecurityUtils.getUserId());
             if (null != agent) {