a.id AS "id", a.coupon_name AS "couponName", a.coupon_type AS "couponType", a.face_price AS "facePrice", a.effective_period AS "effectivePeriod", a.explains AS "explains", a.target AS "target", 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.effective_date AS "effectiveDate", a.valid_date AS "validDate", a.num AS "num", a.del_flag AS "delFlag" INSERT INTO sys_coupon_def( id, coupon_name, coupon_type, face_price, effective_period, explains, target, create_by, create_date, update_by, update_date, remarks, del_flag ) VALUES ( #{id}, #{couponName}, #{couponType}, #{facePrice}, #{effectivePeriod}, #{explains}, #{target}, #{createBy.id}, #{createDate}, #{updateBy.id}, #{updateDate}, #{remarks}, #{delFlag} ) UPDATE sys_coupon_def SET coupon_name = #{couponName}, coupon_type = #{couponType}, face_price = #{facePrice}, effective_period = #{effectivePeriod}, explains = #{explains}, target = #{target}, update_by = #{updateBy.id}, update_date = #{updateDate}, remarks = #{remarks} WHERE id = #{id} UPDATE sys_coupon_def SET del_flag = #{DEL_FLAG_DELETE} WHERE id = #{id}