Bläddra i källkod

1.问题修改

yuanliang 2 år sedan
förälder
incheckning
fa99eee728

+ 0 - 4
cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/entity/TenantUnbindRecord.java

@@ -34,10 +34,6 @@ public class TenantUnbindRecord implements Serializable {
     @TableField(value = "user_id_")
     @TableField(value = "user_id_")
     private Long userId;
     private Long userId;
 
 
-    @ApiModelProperty("手机号")
-    @TableField(value = "phone_")
-    private String phone;
-
     @ApiModelProperty("用户类型")
     @ApiModelProperty("用户类型")
     @TableField(value = "user_type_")
     @TableField(value = "user_type_")
     private String userType;
     private String userType;

+ 2 - 2
cooleshow-user/user-biz/src/main/resources/config/mybatis/StudentMapper.xml

@@ -156,12 +156,12 @@
                 and t.tenant_id_ = #{param.tenantId}
                 and t.tenant_id_ = #{param.tenantId}
             </if>
             </if>
             <if test="param.tenantName != null and param.tenantName.trim() != ''">
             <if test="param.tenantName != null and param.tenantName.trim() != ''">
-                and te.name_ like concat('%',#{param.tenantName},'%')
+                and ti.name_ like concat('%',#{param.tenantName},'%')
             </if>
             </if>
         </where>
         </where>
         <choose>
         <choose>
             <when test="param.orderBy != null and param.orderBy.trim() != ''">
             <when test="param.orderBy != null and param.orderBy.trim() != ''">
-                order by #{param.orderBy}
+                order by ${param.orderBy}
             </when>
             </when>
             <otherwise>
             <otherwise>
                 order by t.create_time_ desc
                 order by t.create_time_ desc

+ 5 - 0
cooleshow-user/user-student/src/main/java/com/yonge/cooleshow/student/controller/StudentController.java

@@ -167,6 +167,11 @@ public class StudentController extends BaseController {
             return failed("非机构用户不需要解绑");
             return failed("非机构用户不需要解绑");
         }
         }
 
 
+        Student student = studentService.getById(user.getId());
+        if (student == null) {
+            return failed("未查询到学生的信息");
+        }
+
         TenantUnbindRecord one = tenantUnbindRecordService.lambdaQuery()
         TenantUnbindRecord one = tenantUnbindRecordService.lambdaQuery()
                 .eq(TenantUnbindRecord::getTenantId, user.getTenantId())
                 .eq(TenantUnbindRecord::getTenantId, user.getTenantId())
                 .eq(TenantUnbindRecord::getUserType, "STUDENT")
                 .eq(TenantUnbindRecord::getUserType, "STUDENT")

+ 5 - 0
cooleshow-user/user-teacher/src/main/java/com/yonge/cooleshow/teacher/controller/TeacherController.java

@@ -203,6 +203,11 @@ public class TeacherController extends BaseController {
             return failed("非机构用户不需要解绑");
             return failed("非机构用户不需要解绑");
         }
         }
 
 
+        Teacher teacher = teacherService.getById(user.getId());
+        if (teacher == null) {
+            return failed("未查询到老师的信息");
+        }
+
         TenantUnbindRecord one = tenantUnbindRecordService.lambdaQuery()
         TenantUnbindRecord one = tenantUnbindRecordService.lambdaQuery()
                 .eq(TenantUnbindRecord::getTenantId, user.getTenantId())
                 .eq(TenantUnbindRecord::getTenantId, user.getTenantId())
                 .eq(TenantUnbindRecord::getUserType, "TEACHER")
                 .eq(TenantUnbindRecord::getUserType, "TEACHER")

+ 1 - 1
cooleshow-user/user-tenant/src/main/java/com/yonge/cooleshow/tenant/controller/StudentController.java

@@ -57,7 +57,7 @@ public class StudentController extends BaseController {
         TenantInfo tenantInfo = getTenantInfo();
         TenantInfo tenantInfo = getTenantInfo();
         query.setTenantId(tenantInfo.getId());
         query.setTenantId(tenantInfo.getId());
         query.setDelFlag(YesOrNoEnum.NO);
         query.setDelFlag(YesOrNoEnum.NO);
-        query.setOrderBy("t.username desc");
+        query.setOrderBy("u.username_ asc");
 
 
         IPage<StudentVo> pages = studentService.selectPage(PageUtil.getPage(query), query);
         IPage<StudentVo> pages = studentService.selectPage(PageUtil.getPage(query), query);
         List<StudentVo> rows = pages.getRecords();
         List<StudentVo> rows = pages.getRecords();