1.dao中
public Integer saveMutualEvaluation(MutualEvaluation evaluation);
2.dao.xml中
<insert id="saveMutualEvaluation" parameterType="MutualEvaluation" useGeneratedKeys="true" keyProperty="evaluateId" keyColumn="EVALUATE_ID" >
INSERT INTO pisp_mutual_evaluation (
EVALUATE_FROM,
EVALUATE_TO,
CONTENT,
STAR,
CREATE_TIME,
WAYBILL_NO,
TYPE
)
VALUES
(
#{evaluateFrom},
#{evaluateTo},
#{content},
#{star},
#{createTime},
#{waybillNo},
#{type}
)
<selectKey keyProperty="evaluateId" resultType="int" order="AFTER">
SELECT LAST_INSERT_ID();
</selectKey>
</insert>