|
|
@@ -5,13 +5,18 @@ import com.jfinal.plugin.activerecord.Db;
|
|
|
import com.jfinal.plugin.activerecord.Record;
|
|
|
import common.model.Address;
|
|
|
import common.model.V2Lp;
|
|
|
+import common.utils.http.MyPaginate;
|
|
|
+import common.utils.model.TableUtil;
|
|
|
import modules.address.AddressService;
|
|
|
+import modules.address.lp.LpService;
|
|
|
|
|
|
import java.util.List;
|
|
|
|
|
|
public class V2LpService {
|
|
|
@Inject
|
|
|
private AddressService addressService;
|
|
|
+ @Inject
|
|
|
+ private LpService lpService;
|
|
|
|
|
|
public boolean append(V2Lp v2Lp, Address address) {
|
|
|
boolean isAddressExist = addressService.isAddressExist(address);
|
|
|
@@ -35,7 +40,7 @@ public class V2LpService {
|
|
|
return Db.template("address.findByChainIdAndHash", "t_v2_lp", chainId, hash).findFirst();
|
|
|
}
|
|
|
|
|
|
- public List<Record> findByChainId(int chainId, int pageNumber, int pageSize) {
|
|
|
- return Db.template("address.findByChainId", "t_v2_lp", chainId).paginate(pageNumber, pageSize).getList();
|
|
|
+ public List<Record> findByChainId(int chainId, MyPaginate p) {
|
|
|
+ return lpService.findLpByChainId(TableUtil.getTableName(V2Lp.class), chainId, p);
|
|
|
}
|
|
|
}
|