package com.icloud.server.scala.engine.filter

import com.icloud.server.scala.engine.contect.Context
import com.icloud.server.scala.engine.service.{Alipaye, Goodspaye, Wxpaye}

import scala.jdk.CollectionConverters._


abstract class AbstractFilter {
  def filter(context:Context,goodspays:Goodspaye):Goodspaye= {
    goodspays.wxpayes=
    goodspays.wxpayes.asScala.filter(x=>WxisAccept(context,x)).asJava
    goodspays.alipays=
    goodspays.alipays.asScala.filter(x=>AliisAccept(context,x)).asJava
   goodspays
  }
  def WxisAccept(context:Context,wxpaye:Wxpaye):Boolean
  def AliisAccept(context:Context,alipaye:Alipaye):Boolean
}
