企微同步,需要有租户ID
This commit is contained in:
@@ -1,10 +1,42 @@
|
||||
package com.rj.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.InterceptorIgnore;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.rj.entity.QweiDepartment;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.apache.ibatis.annotations.Select;
|
||||
import org.apache.ibatis.annotations.Update;
|
||||
|
||||
@Mapper
|
||||
public interface QweiDepartmentMapper extends BaseMapper<QweiDepartment> {
|
||||
|
||||
@InterceptorIgnore(tenantLine = "1")
|
||||
@Select("""
|
||||
SELECT id, tenant_id, dept_id, dept_name, parent_dept_id, order_num, is_deleted, created_at, updated_at
|
||||
FROM qwei_department
|
||||
WHERE dept_id = #{deptId}
|
||||
LIMIT 1
|
||||
""")
|
||||
QweiDepartment selectByDeptIdIgnoreTenant(@Param("deptId") Long deptId);
|
||||
|
||||
@InterceptorIgnore(tenantLine = "1")
|
||||
@Update("""
|
||||
UPDATE qwei_department
|
||||
SET tenant_id = #{tenantId},
|
||||
dept_name = #{deptName},
|
||||
parent_dept_id = #{parentDeptId},
|
||||
order_num = #{orderNum},
|
||||
is_deleted = #{isDeleted},
|
||||
updated_at = #{updatedAt}
|
||||
WHERE id = #{id}
|
||||
""")
|
||||
int updateLegacyTenantAndFieldsByIdIgnoreTenant(@Param("id") String id,
|
||||
@Param("tenantId") String tenantId,
|
||||
@Param("deptName") String deptName,
|
||||
@Param("parentDeptId") Long parentDeptId,
|
||||
@Param("orderNum") Integer orderNum,
|
||||
@Param("isDeleted") Integer isDeleted,
|
||||
@Param("updatedAt") java.time.LocalDateTime updatedAt);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,10 +1,66 @@
|
||||
package com.rj.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.InterceptorIgnore;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.rj.entity.QweiUser;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.apache.ibatis.annotations.Select;
|
||||
import org.apache.ibatis.annotations.Update;
|
||||
|
||||
@Mapper
|
||||
public interface QweiUserMapper extends BaseMapper<QweiUser> {
|
||||
|
||||
@InterceptorIgnore(tenantLine = "1")
|
||||
@Select("""
|
||||
SELECT id, tenant_id, userid, user_name, mobile, email, biz_email, telephone, position, gender, status,
|
||||
main_department_id, department_ids_json, alias_name, avatar, thumb_avatar, address,
|
||||
is_deleted, created_at, updated_at
|
||||
FROM qwei_user
|
||||
WHERE userid = #{userid}
|
||||
LIMIT 1
|
||||
""")
|
||||
QweiUser selectByUseridIgnoreTenant(@Param("userid") String userid);
|
||||
|
||||
@InterceptorIgnore(tenantLine = "1")
|
||||
@Update("""
|
||||
UPDATE qwei_user
|
||||
SET tenant_id = #{tenantId},
|
||||
user_name = #{userName},
|
||||
mobile = #{mobile},
|
||||
email = #{email},
|
||||
biz_email = #{bizEmail},
|
||||
telephone = #{telephone},
|
||||
position = #{position},
|
||||
gender = #{gender},
|
||||
status = #{status},
|
||||
main_department_id = #{mainDepartmentId},
|
||||
department_ids_json = #{departmentIdsJson},
|
||||
alias_name = #{aliasName},
|
||||
avatar = #{avatar},
|
||||
thumb_avatar = #{thumbAvatar},
|
||||
address = #{address},
|
||||
is_deleted = #{isDeleted},
|
||||
updated_at = #{updatedAt}
|
||||
WHERE id = #{id}
|
||||
""")
|
||||
int updateLegacyTenantAndFieldsByIdIgnoreTenant(@Param("id") String id,
|
||||
@Param("tenantId") String tenantId,
|
||||
@Param("userName") String userName,
|
||||
@Param("mobile") String mobile,
|
||||
@Param("email") String email,
|
||||
@Param("bizEmail") String bizEmail,
|
||||
@Param("telephone") String telephone,
|
||||
@Param("position") String position,
|
||||
@Param("gender") Integer gender,
|
||||
@Param("status") Integer status,
|
||||
@Param("mainDepartmentId") Long mainDepartmentId,
|
||||
@Param("departmentIdsJson") String departmentIdsJson,
|
||||
@Param("aliasName") String aliasName,
|
||||
@Param("avatar") String avatar,
|
||||
@Param("thumbAvatar") String thumbAvatar,
|
||||
@Param("address") String address,
|
||||
@Param("isDeleted") Integer isDeleted,
|
||||
@Param("updatedAt") java.time.LocalDateTime updatedAt);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user