t.id id,t.orgId,t.officeId,t.username,t.password,t.nickname,t.phone,t.sex,t.type,t.no no,t.eMail eMail,t.telPhone, t.headImgUrl,t.qrCode,t.idCard,t.userType,t.dataScope,t.enabled org.name orgName,parentOrg.name parentName, concat(IFNULL(parentOrg.name,"")," ",org.name) parentAndMyName t.delFlag = '0' and t.username like concat('%', #{username}, '%') and t.nickname like concat('%', #{name}, '%') and t.enabled = #{enabled} and t.type = #{type} and t.orgId = #{orgId} update app_user officeId = #{updateOfficeId,jdbcType=CHAR}, orgId = #{updateOrgId,jdbcType=CHAR}, and officeId in ( SELECT id from sys_organization where parentIds LIKE CONCAT("%,",#{officeId},",%") and delFlag=0 ) and id in (${userIds}) insert into app_user orgId, officeId, username, password, nickname, phone, sex, type, no, eMail, telPhone, headImgUrl, qrCode, idCard, userType, dataScope, enabled, delFlag, createTime, updateTime, #{orgId,jdbcType=INTEGER}, #{officeId,jdbcType=INTEGER}, #{username,jdbcType=VARCHAR}, #{password,jdbcType=VARCHAR}, #{nickname,jdbcType=VARCHAR}, #{phone,jdbcType=VARCHAR}, #{sex,jdbcType=VARCHAR}, #{type,jdbcType=VARCHAR}, #{no,jdbcType=VARCHAR}, #{eMail,jdbcType=VARCHAR}, #{telPhone,jdbcType=VARCHAR}, #{headImgUrl,jdbcType=VARCHAR}, #{qrCode,jdbcType=VARCHAR}, #{idCard,jdbcType=VARCHAR}, #{userType,jdbcType=VARCHAR}, #{dataScope,jdbcType=VARCHAR}, #{enabled,jdbcType=VARCHAR}, #{delFlag,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}, update app_user orgId = #{orgId,jdbcType=INTEGER}, officeId = #{officeId,jdbcType=INTEGER}, username = #{username,jdbcType=VARCHAR}, password = #{password,jdbcType=VARCHAR}, nickname = #{nickname,jdbcType=VARCHAR}, phone = #{phone,jdbcType=VARCHAR}, sex = #{sex,jdbcType=VARCHAR}, type = #{type,jdbcType=VARCHAR}, no = #{no,jdbcType=VARCHAR}, eMail = #{eMail,jdbcType=VARCHAR}, telPhone = #{telPhone,jdbcType=VARCHAR}, headImgUrl = #{headImgUrl,jdbcType=VARCHAR}, qrCode = #{qrCode,jdbcType=VARCHAR}, idCard = #{idCard,jdbcType=VARCHAR}, userType = #{userType,jdbcType=VARCHAR}, dataScope = #{dataScope,jdbcType=VARCHAR}, enabled = #{enabled,jdbcType=VARCHAR}, delFlag = #{delFlag,jdbcType=VARCHAR}, createTime = #{createTime,jdbcType=TIMESTAMP}, updateTime = #{updateTime,jdbcType=TIMESTAMP}, where id = #{id,jdbcType=INTEGER}