a.id AS "id",
a.user_id AS "user.id",
a.paper_id AS "paperId",
a.paper_name AS "paperName",
a.test_date AS "testDate",
a.points AS "points",
a.tests_type AS "testsType",
a.question_ids AS "questionIds"
INSERT INTO edu_user_tests(
id,
user_id,
paper_id,
paper_name,
test_date,
points,
tests_type,
question_ids
) VALUES (
#{id},
#{user.id},
#{paperId},
#{paperName},
#{testDate},
#{points},
#{testsType},
#{questionIds}
)
UPDATE edu_user_tests SET
user_id = #{user.id},
paper_id = #{paperId},
paper_name = #{paperName},
test_date = #{testDate},
points = #{points},
tests_type = #{testsType},
question_ids = #{questionIds}
WHERE id = #{id}
DELETE FROM edu_user_tests
WHERE id = #{id}
UPDATE edu_user_tests SET
del_flag = #{DEL_FLAG_DELETE}
WHERE id = #{id}