a.id AS "id",
a.name AS "tuser.id",
a.office_id AS "office.id",
a.cost AS "cost",
a.reason AS "reason",
a.create_by AS "createBy.id",
a.create_date AS "createDate",
a.update_by AS "updateBy.id",
a.update_date AS "updateDate",
a.remarks AS "remarks",
a.del_flag AS "delFlag",
a.proc_ins_id AS "procInsId",
tuser.name AS "tuser.name",
office.name AS "office.name"
LEFT JOIN sys_user tuser ON tuser.id = a.name
LEFT JOIN sys_office office ON office.id = a.office_id
INSERT INTO test_activiti_expense(
id,
name,
office_id,
cost,
reason,
create_by,
create_date,
update_by,
update_date,
remarks,
del_flag,
proc_ins_id
) VALUES (
#{id},
#{tuser.id},
#{office.id},
#{cost},
#{reason},
#{createBy.id},
#{createDate},
#{updateBy.id},
#{updateDate},
#{remarks},
#{delFlag},
#{procInsId}
)
UPDATE test_activiti_expense SET
name = #{tuser.id},
office_id = #{office.id},
cost = #{cost},
reason = #{reason},
update_by = #{updateBy.id},
update_date = #{updateDate},
remarks = #{remarks},
proc_ins_id = #{procInsId}
WHERE id = #{id}
DELETE FROM test_activiti_expense
WHERE id = #{id}
UPDATE test_activiti_expense SET
del_flag = #{DEL_FLAG_DELETE}
WHERE id = #{id}