|
@@ -1,104 +1,123 @@
|
|
package com.ym.mec.auth.dal.dao;
|
|
package com.ym.mec.auth.dal.dao;
|
|
|
|
|
|
-import java.util.List;
|
|
|
|
-
|
|
|
|
-import org.apache.ibatis.annotations.Param;
|
|
|
|
-
|
|
|
|
import com.ym.mec.auth.api.entity.SysUser;
|
|
import com.ym.mec.auth.api.entity.SysUser;
|
|
import com.ym.mec.auth.api.enums.UserLockFlag;
|
|
import com.ym.mec.auth.api.enums.UserLockFlag;
|
|
import com.ym.mec.common.dal.BaseDAO;
|
|
import com.ym.mec.common.dal.BaseDAO;
|
|
import com.ym.mec.common.entity.ImUserModel;
|
|
import com.ym.mec.common.entity.ImUserModel;
|
|
|
|
+import org.apache.ibatis.annotations.Param;
|
|
|
|
+
|
|
|
|
+import java.util.List;
|
|
|
|
|
|
public interface SysUserDao extends BaseDAO<Integer, SysUser> {
|
|
public interface SysUserDao extends BaseDAO<Integer, SysUser> {
|
|
|
|
|
|
- /**
|
|
|
|
- * 根据用户名查询对象
|
|
|
|
- * @param username
|
|
|
|
- * @return
|
|
|
|
- */
|
|
|
|
- SysUser queryByUsername(String username);
|
|
|
|
-
|
|
|
|
- /**
|
|
|
|
- * 根据手机号查询对象
|
|
|
|
- * @param phone
|
|
|
|
- * @return
|
|
|
|
- */
|
|
|
|
- SysUser queryByPhone(String phone);
|
|
|
|
-
|
|
|
|
- /**
|
|
|
|
- * 根据手机号查询对象
|
|
|
|
- * @param phone
|
|
|
|
- * @return
|
|
|
|
- */
|
|
|
|
- SysUser queryLockByPhone(String phone);
|
|
|
|
-
|
|
|
|
- /**
|
|
|
|
- * 根据手机号查询对象
|
|
|
|
- * @param phone
|
|
|
|
- * @return
|
|
|
|
- */
|
|
|
|
- SysUser queryByPhoneAndClient(@Param("phone") String phone, @Param("client") String client);
|
|
|
|
-
|
|
|
|
- /**
|
|
|
|
- * 修改密码
|
|
|
|
- * @param mobile
|
|
|
|
- * @param password
|
|
|
|
- */
|
|
|
|
- void updatePassword(@Param("mobile") String mobile, @Param("password") String password);
|
|
|
|
-
|
|
|
|
- /**
|
|
|
|
- * 获取用户基本信息
|
|
|
|
- * @param userId
|
|
|
|
- * @return
|
|
|
|
- */
|
|
|
|
- ImUserModel getBasic(Integer userId);
|
|
|
|
-
|
|
|
|
- /**
|
|
|
|
- * 根据状态查询
|
|
|
|
- * @param status
|
|
|
|
- * @return
|
|
|
|
- */
|
|
|
|
- List<SysUser> queryByStatus(UserLockFlag status);
|
|
|
|
-
|
|
|
|
- /**
|
|
|
|
- * 获取随机盐不为null的一条数据
|
|
|
|
- * @param userType
|
|
|
|
- * @return
|
|
|
|
- */
|
|
|
|
- SysUser findUserBySalt(String userType);
|
|
|
|
-
|
|
|
|
- /**
|
|
|
|
- * 创建teacher表
|
|
|
|
- * @param userId
|
|
|
|
- * @param lesseeOrganId
|
|
|
|
- */
|
|
|
|
- void insertTeacher(@Param("userId") Integer userId,
|
|
|
|
- @Param("lesseeOrganId") Integer lesseeOrganId,
|
|
|
|
- @Param("tenantId") Integer tenantId);
|
|
|
|
-
|
|
|
|
- /**
|
|
|
|
- * 获取教师分部编号
|
|
|
|
- * @param userId
|
|
|
|
- * @return
|
|
|
|
- */
|
|
|
|
- Integer getTeacherOrganId(Integer userId);
|
|
|
|
-
|
|
|
|
- /**
|
|
|
|
- * 创建租户账户表
|
|
|
|
- * @param userId
|
|
|
|
- */
|
|
|
|
|
|
+ /**
|
|
|
|
+ * 根据用户名查询对象
|
|
|
|
+ *
|
|
|
|
+ * @param username
|
|
|
|
+ * @return
|
|
|
|
+ */
|
|
|
|
+ SysUser queryByUsername(String username);
|
|
|
|
+
|
|
|
|
+ /**
|
|
|
|
+ * 根据手机号查询对象
|
|
|
|
+ *
|
|
|
|
+ * @param phone
|
|
|
|
+ * @return
|
|
|
|
+ */
|
|
|
|
+ SysUser queryByPhone(String phone);
|
|
|
|
+
|
|
|
|
+ /**
|
|
|
|
+ * 根据手机号查询对象
|
|
|
|
+ *
|
|
|
|
+ * @param phone
|
|
|
|
+ * @return
|
|
|
|
+ */
|
|
|
|
+ SysUser queryLockByPhone(String phone);
|
|
|
|
+
|
|
|
|
+ /**
|
|
|
|
+ * 根据手机号查询对象
|
|
|
|
+ *
|
|
|
|
+ * @param phone
|
|
|
|
+ * @return
|
|
|
|
+ */
|
|
|
|
+ SysUser queryByPhoneAndClient(@Param("phone") String phone, @Param("client") String client);
|
|
|
|
+
|
|
|
|
+ /**
|
|
|
|
+ * 修改密码
|
|
|
|
+ *
|
|
|
|
+ * @param mobile
|
|
|
|
+ * @param password
|
|
|
|
+ */
|
|
|
|
+ void updatePassword(@Param("mobile") String mobile, @Param("password") String password);
|
|
|
|
+
|
|
|
|
+ /**
|
|
|
|
+ * 获取用户基本信息
|
|
|
|
+ *
|
|
|
|
+ * @param userId
|
|
|
|
+ * @return
|
|
|
|
+ */
|
|
|
|
+ ImUserModel getBasic(Integer userId);
|
|
|
|
+
|
|
|
|
+ /**
|
|
|
|
+ * 根据状态查询
|
|
|
|
+ *
|
|
|
|
+ * @param status
|
|
|
|
+ * @return
|
|
|
|
+ */
|
|
|
|
+ List<SysUser> queryByStatus(UserLockFlag status);
|
|
|
|
+
|
|
|
|
+ /**
|
|
|
|
+ * 获取随机盐不为null的一条数据
|
|
|
|
+ *
|
|
|
|
+ * @param userType
|
|
|
|
+ * @return
|
|
|
|
+ */
|
|
|
|
+ SysUser findUserBySalt(String userType);
|
|
|
|
+
|
|
|
|
+ /**
|
|
|
|
+ * 创建teacher表
|
|
|
|
+ *
|
|
|
|
+ * @param userId
|
|
|
|
+ * @param lesseeOrganId
|
|
|
|
+ */
|
|
|
|
+ void insertTeacher(@Param("userId") Integer userId,
|
|
|
|
+ @Param("lesseeOrganId") Integer lesseeOrganId,
|
|
|
|
+ @Param("tenantId") Integer tenantId);
|
|
|
|
+
|
|
|
|
+ /**
|
|
|
|
+ * 获取教师分部编号
|
|
|
|
+ *
|
|
|
|
+ * @param userId
|
|
|
|
+ * @return
|
|
|
|
+ */
|
|
|
|
+ Integer getTeacherOrganId(Integer userId);
|
|
|
|
+
|
|
|
|
+ /**
|
|
|
|
+ * 创建租户账户表
|
|
|
|
+ *
|
|
|
|
+ * @param userId
|
|
|
|
+ */
|
|
void insertSysTenantAccount(Integer userId);
|
|
void insertSysTenantAccount(Integer userId);
|
|
|
|
|
|
- /**
|
|
|
|
- * 刷新用户token
|
|
|
|
- * @param userId
|
|
|
|
- * @param imToken
|
|
|
|
- */
|
|
|
|
- void refreshImToken(@Param("userId") Integer userId, @Param("imToken") String imToken);
|
|
|
|
-
|
|
|
|
- /**
|
|
|
|
- * 保存student
|
|
|
|
- * @param userId
|
|
|
|
- */
|
|
|
|
- void saveStudent(@Param("userId") Integer userId,@Param("tenantId") Integer tenantId);
|
|
|
|
|
|
+ /**
|
|
|
|
+ * 刷新用户token
|
|
|
|
+ *
|
|
|
|
+ * @param userId
|
|
|
|
+ * @param imToken
|
|
|
|
+ */
|
|
|
|
+ void refreshImToken(@Param("userId") Integer userId, @Param("imToken") String imToken);
|
|
|
|
+
|
|
|
|
+ /**
|
|
|
|
+ * 保存student
|
|
|
|
+ *
|
|
|
|
+ * @param userId
|
|
|
|
+ */
|
|
|
|
+ void saveStudent(@Param("userId") Integer userId, @Param("tenantId") Integer tenantId);
|
|
|
|
+
|
|
|
|
+ /**
|
|
|
|
+ * 通过手机号及姓名进行模糊查询
|
|
|
|
+ *
|
|
|
|
+ * @param search 关键字
|
|
|
|
+ */
|
|
|
|
+ List<SysUser> queryLikeByPhoneOrName(@Param("search") String search);
|
|
}
|
|
}
|