当在mybatis中用not in 时,需要用${LocalOrderNo}这样的形式来代替,而不能用#{LocalOrderNo}(把它当成一个整体的字符串了)
"SELECT * FROM common_payorder AS cp "
+" WHERE cp.`PaymentType`=#{paymentType} AND cp.`PayStatus`=#{payStatus}"
+" AND cp.createDate>=#{createDate}"
+" And cp.localorderno not in (${LocalOrderNo}) "