<insert id="insert" parameterType="com.ps.psdf.ScoreSettlePo"> insert into t_score_settel (score_settel_id, member_code, order_no, product_code, product_name, pay_way, payable_amount, payable_score, consumer_date, consumer_org, sys_no, settel_type, remark, insert_time, insert_oper, update_time, update_oper) values ( cast(#{scoreSettelId} as NUMERIC), #{memberCode}, #{orderNo}, #{productCode}, #{productName}, #{payWay}, <choose> <when test="payableAmount != null and payableAmount != ''"> cast(#{payableAmount} as NUMERIC), </when> <otherwise> null, </otherwise> </choose> <choose> <when test="payableScore != null and payableScore != ''"> cast(#{payableScore} as NUMERIC), </when> <otherwise> null, </otherwise> </choose> #{consumerDate}, #{consumerOrg}, #{sysNo}, #{settelType}, #{remark}, #{insertTime}, #{insertOper}, #{updateTime}, #{updateOper}) </insert>