独行之狼
4 years ago
11 changed files with 251 additions and 30 deletions
Binary file not shown.
Binary file not shown.
@ -0,0 +1,41 @@
|
||||
package com.fr.plugin.market.update; |
||||
|
||||
import com.fr.intelli.record.Focus; |
||||
import com.fr.intelli.record.Original; |
||||
import com.fr.record.analyzer.EnableMetrics; |
||||
import com.fr.script.AbstractFunction; |
||||
import com.fr.stable.Primitive; |
||||
import com.fr.stable.fun.Authorize; |
||||
|
||||
import java.io.IOException; |
||||
|
||||
@EnableMetrics |
||||
@Authorize(callSignKey = FunConstants.PLUGIN_ID) |
||||
public class FRForwardMarket extends AbstractFunction { |
||||
@Focus(id = FunConstants.PLUGIN_ID, text = "Plugin-Test_Function_FRForwardMarket", source = Original.PLUGIN) |
||||
public Object run(Object[] args) { |
||||
if(!FunConstants.author()){ |
||||
return FunConstants.AUTHOR_ERROR; |
||||
} |
||||
String checkRes = FunConstants.CheckArgs(args,2 ); |
||||
if (!checkRes.equals(FunConstants.CHECK_PASS)) { |
||||
return Primitive.ERROR_VALUE + checkRes; |
||||
} |
||||
|
||||
String forwardType = args[0].toString(); |
||||
String forwardArgs = args[1].toString(); |
||||
|
||||
String result; |
||||
try { |
||||
result= FunConstants.GetForwardData(forwardType,forwardArgs); |
||||
} catch (IOException e) { |
||||
return Primitive.ERROR_VALUE; |
||||
} |
||||
if(result==FunConstants.ARGS_ERROR){ |
||||
return Primitive.ERROR_VALUE; |
||||
} |
||||
return result; |
||||
} |
||||
|
||||
|
||||
} |
@ -0,0 +1,44 @@
|
||||
package com.fr.plugin.market.update; |
||||
|
||||
import com.fr.intelli.record.Focus; |
||||
import com.fr.intelli.record.Original; |
||||
import com.fr.log.FineLoggerFactory; |
||||
import com.fr.record.analyzer.EnableMetrics; |
||||
import com.fr.script.AbstractFunction; |
||||
import com.fr.stable.ArrayUtils; |
||||
import com.fr.stable.Primitive; |
||||
import com.fr.stable.fun.Authorize; |
||||
import org.jsoup.Jsoup; |
||||
import org.jsoup.nodes.Document; |
||||
import java.io.IOException; |
||||
|
||||
@EnableMetrics |
||||
@Authorize(callSignKey = FunConstants.PLUGIN_ID) |
||||
public class FRGoldSilver extends AbstractFunction { |
||||
@Focus(id = FunConstants.PLUGIN_ID, text = "Plugin-Test_Function_FRGoldMarket", source = Original.PLUGIN) |
||||
public Object run(Object[] args) { |
||||
if(!FunConstants.author()){ |
||||
return FunConstants.AUTHOR_ERROR; |
||||
} |
||||
String checkRes = FunConstants.CheckArgs(args,2 ); |
||||
if (!checkRes.equals(FunConstants.CHECK_PASS)) { |
||||
return Primitive.ERROR_VALUE + checkRes; |
||||
} |
||||
|
||||
String goldType = args[0].toString(); |
||||
String goldArgs = args[1].toString(); |
||||
|
||||
String result; |
||||
try { |
||||
result= FunConstants.GetGoldData(goldType,goldArgs); |
||||
} catch (IOException e) { |
||||
return Primitive.ERROR_VALUE; |
||||
} |
||||
if(result==FunConstants.ARGS_ERROR){ |
||||
return Primitive.ERROR_VALUE; |
||||
} |
||||
return result; |
||||
} |
||||
|
||||
|
||||
} |
@ -0,0 +1,40 @@
|
||||
package com.fr.plugin.market.update; |
||||
|
||||
import com.fr.intelli.record.Focus; |
||||
import com.fr.intelli.record.Original; |
||||
import com.fr.record.analyzer.EnableMetrics; |
||||
import com.fr.script.AbstractFunction; |
||||
import com.fr.stable.Primitive; |
||||
import com.fr.stable.fun.Authorize; |
||||
import java.io.IOException; |
||||
|
||||
@EnableMetrics |
||||
@Authorize(callSignKey = FunConstants.PLUGIN_ID) |
||||
public class FRMarketIndex extends AbstractFunction { |
||||
@Focus(id = FunConstants.PLUGIN_ID, text = "Plugin-Test_Function_FRMarketIndex", source = Original.PLUGIN) |
||||
public Object run(Object[] args) { |
||||
if(!FunConstants.author()){ |
||||
return FunConstants.AUTHOR_ERROR; |
||||
} |
||||
String checkRes = FunConstants.CheckArgs(args,2 ); |
||||
if (!checkRes.equals(FunConstants.CHECK_PASS)) { |
||||
return Primitive.ERROR_VALUE + checkRes; |
||||
} |
||||
|
||||
String indexType = args[0].toString(); |
||||
String indexArgs = args[1].toString(); |
||||
|
||||
String result; |
||||
try { |
||||
result= FunConstants.GetIndexData(indexType,indexArgs); |
||||
} catch (IOException e) { |
||||
return Primitive.ERROR_VALUE; |
||||
} |
||||
if(result==FunConstants.ARGS_ERROR){ |
||||
return Primitive.ERROR_VALUE; |
||||
} |
||||
return result; |
||||
} |
||||
|
||||
|
||||
} |
Loading…
Reference in new issue