mapper
<!-- 判断订单属于某些商户 -->
<if test="merchantIds != null and merchantIds.size() > 0">
and MERCHANT_ID in
<foreach item="merId" index="index" collection="merchantIds" open="(" separator="," close=")">
#{merId}
</foreach>
</if>
pojo
//临时查询字段 商户id集合
private List<String> merchantIds;
public List<String> getMerchantIds() {
return merchantIds;
}
public void setMerchantIds(List<String> merchantIds) {
this.merchantIds = merchantIds;
}