class test{
findOne(){
}
findAll(){
}
}
class test1 extends test{
...
wrap(p){
}
handle(){
return this.wrap(this.findOne())
}
haddle1(){
return this.wrap(this.findAll())
}
}
test1每个方法使用都要使用wrap预处理,去掉wrap包括后,怎样让每个handle执行时自动wrap包括执行比如new test1().handle()时自动wrap执行,不能像这样wrap(new test().handle()).
挂一层代理试试?