id, orgId, parentId, headquartersId, areaId, parentIds, parentJson, name, sort,
type, address, master, phone, webUrl, partack, enabled, delFlag, createTime, updateTime,revJson
id, orgId, parentId, headquartersId, areaId, parentIds, name, sort,
type, address, master, phone, webUrl, partack,revJson
id, orgId, parentId, headquartersId, areaId, parentIds,revJson
UPDATE sys_organization SET delFlag = '1' WHERE parentIds like concat('%,', #{id}, ',%')
and orgId = #{orgId}
insert into sys_organization (orgId, parentId, headquartersId,
areaId, parentIds, parentJson,
name, sort, type, address,
master, phone, webUrl,
partack, enabled, delFlag,
createTime, updateTime,revJson)
values (#{orgId,jdbcType=INTEGER}, #{parentId,jdbcType=INTEGER}, #{headquartersId,jdbcType=INTEGER},
#{areaId,jdbcType=INTEGER}, #{parentIds,jdbcType=VARCHAR}, #{parentJson,jdbcType=VARCHAR},
#{name,jdbcType=VARCHAR}, #{sort,jdbcType=INTEGER}, #{type,jdbcType=VARCHAR}, #{address,jdbcType=VARCHAR},
#{master,jdbcType=VARCHAR}, #{phone,jdbcType=VARCHAR}, #{webUrl,jdbcType=VARCHAR},
#{partack,jdbcType=VARCHAR}, #{enabled,jdbcType=VARCHAR}, #{delFlag,jdbcType=VARCHAR},
#{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP},#{revJson,jdbcType=VARCHAR})
SELECT LAST_INSERT_ID()
insert into sys_organization
orgId,
parentId,
headquartersId,
areaId,
parentIds,
parentJson,
name,
sort,
type,
address,
master,
phone,
webUrl,
partack,
enabled,
delFlag,
createTime,
updateTime,
revJson,
#{orgId,jdbcType=INTEGER},
#{parentId,jdbcType=INTEGER},
#{headquartersId,jdbcType=INTEGER},
#{areaId,jdbcType=INTEGER},
#{parentIds,jdbcType=VARCHAR},
#{parentJson,jdbcType=VARCHAR},
#{name,jdbcType=VARCHAR},
#{sort,jdbcType=INTEGER},
#{type,jdbcType=VARCHAR},
#{address,jdbcType=VARCHAR},
#{master,jdbcType=VARCHAR},
#{phone,jdbcType=VARCHAR},
#{webUrl,jdbcType=VARCHAR},
#{partack,jdbcType=VARCHAR},
#{enabled,jdbcType=VARCHAR},
#{delFlag,jdbcType=VARCHAR},
#{createTime,jdbcType=TIMESTAMP},
#{updateTime,jdbcType=TIMESTAMP},
#{revJson,jdbcType=VARCHAR},
update sys_organization
orgId = #{orgId,jdbcType=INTEGER},
parentId = #{parentId,jdbcType=INTEGER},
headquartersId = #{headquartersId,jdbcType=INTEGER},
areaId = #{areaId,jdbcType=INTEGER},
parentIds = #{parentIds,jdbcType=VARCHAR},
parentJson = #{parentJson,jdbcType=VARCHAR},
name = #{name,jdbcType=VARCHAR},
sort = #{sort,jdbcType=INTEGER},
type = #{type,jdbcType=VARCHAR},
address = #{address,jdbcType=VARCHAR},
master = #{master,jdbcType=VARCHAR},
phone = #{phone,jdbcType=VARCHAR},
webUrl = #{webUrl,jdbcType=VARCHAR},
partack = #{partack,jdbcType=VARCHAR},
enabled = #{enabled,jdbcType=VARCHAR},
delFlag = #{delFlag,jdbcType=VARCHAR},
createTime = #{createTime,jdbcType=TIMESTAMP},
updateTime = #{updateTime,jdbcType=TIMESTAMP},
revJson = #{revJson,jdbcType=VARCHAR},
where id = #{id,jdbcType=INTEGER}
and orgId=#{orgId}
orgId = #{orgId,jdbcType=INTEGER},
parentId = #{parentId,jdbcType=INTEGER},
headquartersId = #{headquartersId,jdbcType=INTEGER},
areaId = #{areaId,jdbcType=INTEGER},
name like concat('%', #{name}, '%'),
type = #{type,jdbcType=VARCHAR},
partack = #{partack,jdbcType=VARCHAR},
enabled = #{enabled,jdbcType=VARCHAR},
delFlag = #{delFlag,jdbcType=VARCHAR},