and t.USERNAME like concat('%', #{params.userName}, '%')
and t.status = #{params.status}
insert into sys_role_user(roleId, userId) values
(#{roleId}, #{userId})
insert into sys_user(USERNAME, PHONE, TYPE,PASSWORD ,ROLE_ID, ORG_ID, POST_ID, create_type, sex, status, createTime, updateTime,examine_status
,PRO_ID
,SUB_ID
)
values(#{userName}, #{phone}, #{type},#{password}, #{roleId}, #{orgId}, #{orgId}, '2', #{sex}, #{status}, now(), now(),'1'
, #{proId}
,#{subId}
)
update sys_user t
USERNAME = #{userName},
TYPE = #{type},
LOGINNAME = #{nickname},
PHONE = #{phone},
ROLE_ID = #{roleId},
SUB_ID = #{subId},
POST_ID = #{orgId},
ORG_ID = #{orgId},
PRO_ID = #{proId},
SEX = #{sex},
t.examine_status = #{examineStatus},
t.examine_remark = #{examineRemark},
updateTime = #{updateTime}
where t.id = #{userId}
update sys_user t
USERNAME = #{userName},
TYPE = #{type},
LOGINNAME = #{nickname},
PHONE = #{phone},
ROLE_ID = #{roleId},
SUB_ID = #{subId},
POST_ID = #{orgId},
ORG_ID = #{orgId},
PRO_ID = #{proId},
SEX = #{sex},
updateTime = #{updateTime}
where t.id = #{id}