|
|
@@ -164,6 +164,60 @@ public class EthMevController extends Controller {
|
|
|
renderJson(MyRet.create().setOk().setMsg("查询成功").setData(ethMevList));
|
|
|
}
|
|
|
|
|
|
+ @Before(AuthInterceptor.class)
|
|
|
+ public void findByHashOrBlockOrDataVaguePending() {
|
|
|
+ String block = getPara("block");
|
|
|
+ String hash = getPara("hash");
|
|
|
+ String dataVague = getPara("dataVague");
|
|
|
+ String limit1Str = getPara("limit1");
|
|
|
+ String limit2Str = getPara("limit2");
|
|
|
+ int limit1 = 0;
|
|
|
+ int limit2 = 200;
|
|
|
+
|
|
|
+ if (!StrKit.isBlank(dataVague)) {
|
|
|
+ dataVague = "%" + dataVague + "%";
|
|
|
+ }
|
|
|
+
|
|
|
+ if (!StrKit.isBlank(limit1Str) && !StrKit.isBlank(limit2Str)) {
|
|
|
+ limit1 = getParaToInt("limit1");
|
|
|
+ limit2 = getParaToInt("limit2");
|
|
|
+ }
|
|
|
+
|
|
|
+ String sql = "";
|
|
|
+ List<EthMev> ethMevList = null;
|
|
|
+ if (StrKit.isBlank(getPara("block"))
|
|
|
+ && StrKit.isBlank(getPara("hash"))
|
|
|
+ && StrKit.isBlank(getPara("dataVague"))) {
|
|
|
+ sql = "select * from t_ethereum_mev_v1 where block regexp '[-]' order by block desc limit ?,?";
|
|
|
+ ethMevList = EthMev.dao.find(sql, limit1, limit2);
|
|
|
+ } else if (StrKit.isBlank(getPara("block")) && StrKit.isBlank(getPara("hash"))) {
|
|
|
+ sql = "select * from t_ethereum_mev_v1 where block regexp '[-]' and data like ? order by block desc limit ?,?";
|
|
|
+ ethMevList = EthMev.dao.find(sql, dataVague, limit1, limit2);
|
|
|
+ } else if (StrKit.isBlank(getPara("block")) && StrKit.isBlank(getPara("dataVague"))) {
|
|
|
+ sql = "select * from t_ethereum_mev_v1 where block regexp '[-]' and hash=? order by block desc limit ?,?";
|
|
|
+ ethMevList = EthMev.dao.find(sql, hash, limit1, limit2);
|
|
|
+ } else if (StrKit.isBlank(getPara("hash")) && StrKit.isBlank(getPara("dataVague"))) {
|
|
|
+ sql = "select * from t_ethereum_mev_v1 where block=? order by block desc limit ?,?";
|
|
|
+ ethMevList = EthMev.dao.find(sql, block, limit1, limit2);
|
|
|
+ } else if (StrKit.isBlank(getPara("block"))) {
|
|
|
+ sql = "select * from t_ethereum_mev_v1 where block regexp '[-]' and hash=? and data like ? order by block desc limit ?,?";
|
|
|
+ ethMevList = EthMev.dao.find(sql, hash, dataVague, limit1, limit2);
|
|
|
+ } else if (StrKit.isBlank(getPara("hash"))) {
|
|
|
+ sql = "select * from t_ethereum_mev_v1 where block=? and data like ? order by block desc limit ?,?";
|
|
|
+ ethMevList = EthMev.dao.find(sql, block, dataVague, limit1, limit2);
|
|
|
+ } else if (StrKit.isBlank(getPara("dataVague"))) {
|
|
|
+ sql = "select * from t_ethereum_mev_v1 where block=? and hash=? order by block desc limit ?,?";
|
|
|
+ ethMevList = EthMev.dao.find(sql, block, hash, limit1, limit2);
|
|
|
+ } else {
|
|
|
+ sql = "select * from t_ethereum_mev_v1 where block=? and hash=? and data like ? order by block desc limit ?,?";
|
|
|
+ ethMevList = EthMev.dao.find(sql, block, hash, dataVague, limit1, limit2);
|
|
|
+ }
|
|
|
+
|
|
|
+ service.buildDataObjByEthMevList(ethMevList);
|
|
|
+
|
|
|
+ renderJson(MyRet.create().setOk().setMsg("查询成功").setData(ethMevList));
|
|
|
+ }
|
|
|
+
|
|
|
@Before(AuthInterceptor.class)
|
|
|
public void findByJsonCondition() {
|
|
|
String jsonConditionStr = getPara("jsonCondition");
|