@ -64,11 +64,49 @@ public interface UserInfoMapper {
void deleteStudent ( UserInfo user ) ;
//修改用户
@Update ( "UPDATE user SET name = #{name},sex = #{sex},documentType = #{documentType},countries = #{countries},educationDegree = #{educationDegree },"
+ "IDNumber = #{IDNumber},accountRole = #{accountRole},provinceId = #{provinceId},subjectsTaught = #{subjectsTaught},cityId = #{city Id},"
+ "phone = #{phone},teachingProfessional = #{teachingProfessional},WeChatID = #{WeChatID},dateBirth = #{dateBirth},email = #{email},schoolId = #{schoolId},disciplineId = #{disciplineId},professionalId = #{professionalId},professionalClassId = #{professionalClassId } where userId = #{userId}" )
@Update ( "UPDATE hr_user_info SET userName = #{userName},uniqueIdentificationAccount = #{uniqueIdentificationAccount},documentType = #{documentType},IDNumber = #{IDNumber},provinceId = #{provinceId },"
+ "cityId = #{cityId},countries = #{countries},dateBirth = #{dateBirth},educationDegree = #{educationDegree},schoolId = #{school Id},"
+ "phone = #{phone},weChatID = #{weChatID},email = #{email},account = #{account},creationTime = #{creationTime},logInNumber = #{logInNumber},sex = #{sex},userAvatars = #{userAvatars } where userId = #{userId}" )
void updateUser ( UserInfo user ) ;
//修改用户个人档案
@Update ( { "<script>" ,
"UPDATE hr_personal_file SET " ,
"<when test='personalCareerId!=null'>" , "personalCareerId = #{personalCareerId}," , "</when>" ,
"<when test='schoolId!=null'>" , "schoolId = #{schoolId}," , "</when>" ,
"<when test='schoolName!=null'>" , "schoolName = #{schoolName}," , "</when>" ,
"<when test='disciplineId!=null'>" , "disciplineId = #{disciplineId}," , "</when>" ,
"<when test='disciplineName!=null'>" , "disciplineName = #{disciplineName}," , "</when>" ,
"<when test='professionalClassId!=null'>" , "professionalClassId = #{professionalClassId}," , "</when>" ,
"<when test='professionalClassName!=null'>" , "professionalClassName = #{professionalClassName}," , "</when>" ,
"<when test='professionalId!=null'>" , "professionalId = #{professionalId}," , "</when>" ,
"<when test='professionalName!=null'>" , "professionalName = #{professionalName}," , "</when>" ,
"updatetime=now() where personalFileId = #{personalFileId}" ,
"</script>" } )
void updateUserProfiles ( UserProfiles userProfiles ) ;
//修改用户组织关系
@Update ( { "<script>" ,
"UPDATE hr_organization_relationship SET " ,
"<when test='platformId!=null'>" , "platformId = #{platformId}," , "</when>" ,
"<when test='schoolId!=null'>" , "schoolId = #{schoolId}," , "</when>" ,
"<when test='schoolName!=null'>" , "schoolName = #{schoolName}," , "</when>" ,
"<when test='roleId!=null'>" , "roleId = #{roleId}," , "</when>" ,
"<when test='workNumber!=null'>" , "workNumber = #{workNumber}," , "</when>" ,
"<when test='oneDepartmentId!=null'>" , "oneDepartmentId = #{oneDepartmentId}," , "</when>" ,
"<when test='oneDepartmentName!=null'>" , "oneDepartmentName = #{oneDepartmentName}," , "</when>" ,
"<when test='twoDepartmentId!=null'>" , "twoDepartmentId = #{twoDepartmentId}," , "</when>" ,
"<when test='twoDepartmentName!=null'>" , "twoDepartmentName = #{twoDepartmentName}," , "</when>" ,
"<when test='professionalId!=null'>" , "professionalId = #{professionalId}," , "</when>" ,
"<when test='professionalName!=null'>" , "professionalName = #{professionalName}," , "</when>" ,
"<when test='gradeId!=null'>" , "gradeId = #{gradeId}," , "</when>" ,
"<when test='gradeName!=null'>" , "gradeName = #{gradeName}," , "</when>" ,
"<when test='classId!=null'>" , "classId = #{classId}," , "</when>" ,
"<when test='className!=null'>" , "className = #{className}," , "</when>" ,
"updatetime=now() where organizationRelationshipId = #{organizationRelationshipId}" ,
"</script>" } )
void updateOrganizationRelationship ( OrganizationRelationship organizationRelationship ) ;
//修改员工
@Update ( "UPDATE staff SET staffName = #{staffName},staffWorkNumber = #{staffWorkNumber},phone = #{phone},email = #{email},staffProfessionalArchitectureId = #{staffProfessionalArchitectureId},"
+ "staffProfessionalArchitectureId = #{staffProfessionalArchitectureId},staffGradeId = #{staffGradeId},roleId = #{roleId} where phone = #{phone}" )
@ -80,12 +118,12 @@ public interface UserInfoMapper {
void updateStudent ( Student student ) ;
//登陆
@Select ( "SELECT * from hr_user_info where isdel=0 and account = #{account} and password = #{password}" )
@Select ( "SELECT hui.account,hui.cityId,hui.countries,hui.creationTime,hui.dateBirth,hui.documentType,hui.educationDegree,hui.email,hui.iDNumber,hui.logInNumber,hui.phone,hui.provinceId,hui.schoolId,hui.sex,hui.uniqueIdentificationAccount,hui.userAvatars,hui.userId,hui.userName,hui.weChatID from hr_user_info hui where hui.isdel=0 and hui.account = #{account} and hui. password = #{password}" )
UserInfo logins ( UserInfo userInfo ) ;
//查询用户roleId
@Select ( "SELECT schoolId,roleId from hr_organization_relationship where userId = #{userId}" )
OrganizationRelationship queryOrganizationRelationship ( Integer userId ) ;
//查询用户组织关系
@Select ( "SELECT * from hr_organization_relationship where userId = #{userId}" )
List < OrganizationRelationship > queryOrganizationRelationship ( Integer userId ) ;
//查询用户手机
@Select ( "SELECT u.* from user u where isdel=0 and phone = #{phone}" )
@ -95,7 +133,7 @@ public interface UserInfoMapper {
@Select ( { "<script>" ,
"SELECT * from hr_user_info where isdel = 0 and userId = #{userId}" ,
"</script> " } )
List < UserInfoVO > queryUserInfoDetails ( Integer userId ) ;
UserInfo queryUserInfoDetails ( Integer userId ) ;
//查询用户详情
@Select ( { "<script>" ,
@ -103,14 +141,20 @@ public interface UserInfoMapper {
"</script> " } )
List < UserProfiles > queryUserProfiles ( Integer userId ) ;
//模糊查询客户
@Select ( { "<script>" ,
"SELECT customerId,customerName,schoolId FROM customer where isdel = 0 and provinceId = #{provinceId} and cityId = #{cityId}" ,
"SELECT customerId,customerName,schoolId FROM customer where isdel = 0" ,
" <if test='searchContent!=null and searchContent !=\"\" '>and customerName like CONCAT('%',#{searchContent},'%')</if>" ,
" <if test='customerIds!=null'>"
+ "<foreach collection='customerIds' item='customerIds' open='and customerId not in (' separator=',' close=')'> #{customerIds}"
+ "</foreach>"
+ "</if>" ,
"</script> " } )
List < Customer > queryCustomer ( Integer cityId , Integer provinceId ) ;
List < Customer > queryCustomer ( @Param ( "searchContent" ) String searchContent , @Param ( "customerIds" ) List < Integer > customerIds ) ;
/ * *
* 批量插入用户
* @param user
* @param users
* /
@Insert ( {
"<script>" ,
@ -123,7 +167,7 @@ public interface UserInfoMapper {
void addUserM ( @Param ( "users" ) List < UserM > users ) ;
//修改用户头像
@Update ( "update user set userAvatars=#{userAvatars} where userId=#{userId}" )
@Update ( "update hr_ user_info set userAvatars=#{userAvatars} where userId=#{userId}" )
void updateUserAvatars ( @Param ( "userAvatars" ) String userAvatars , @Param ( "userId" ) Integer userId ) ;
//更新用户登录次数和最后一次登录时间
@ -143,8 +187,8 @@ public interface UserInfoMapper {
List < UserInfo > queryAccountIsExist ( String account ) ;
//查询学号、工号是否存在
@Select ( "SELECT userId,workNumber from user where isdel = 0 and workNumber = #{workNumber }" )
List < UserM > queryWorkNumberIsExist ( String workNumber ) ;
@Select ( "SELECT userId,workNumber,schoolId,roleId from hr_organization_relationship where workNumber = #{workNumber} and roleId = #{roleId} and schoolId = #{schoolId }" )
List < OrganizationRelationship > queryWorkNumberIsExist ( String workNumber , Integer roleId , Integer schoolId ) ;
//========全承珠
@Select ( "select userId,password,accountRole,logInNumber,workNumber,phone,uniqueIdentificationAccount,schoolId from user "