diff --git a/Plugins/Mineplex.ChestConverter/src/mineplex/chestConverter/AccountTask.java b/Plugins/Mineplex.ChestConverter/src/mineplex/chestConverter/AccountTask.java new file mode 100644 index 000000000..f9433b184 --- /dev/null +++ b/Plugins/Mineplex.ChestConverter/src/mineplex/chestConverter/AccountTask.java @@ -0,0 +1,7 @@ +package mineplex.chestConverter; + +public class AccountTask +{ + public String Task; + public String UUID; +} diff --git a/Plugins/Mineplex.ChestConverter/src/mineplex/chestConverter/AsyncJsonWebCall.java b/Plugins/Mineplex.ChestConverter/src/mineplex/chestConverter/AsyncJsonWebCall.java new file mode 100644 index 000000000..63e3812e3 --- /dev/null +++ b/Plugins/Mineplex.ChestConverter/src/mineplex/chestConverter/AsyncJsonWebCall.java @@ -0,0 +1,63 @@ +package mineplex.chestConverter; + +import mineplex.core.common.util.Callback; + +public class AsyncJsonWebCall extends JsonWebCall +{ + public AsyncJsonWebCall(String url) + { + super(url); + } + + public void Execute() + { + Thread asyncThread = new Thread(new Runnable() + { + public void run() + { + AsyncJsonWebCall.super.Execute(); + } + }); + + asyncThread.start(); + } + + public void Execute(final Object argument) + { + Thread asyncThread = new Thread(new Runnable() + { + public void run() + { + AsyncJsonWebCall.super.Execute(argument); + } + }); + + asyncThread.start(); + } + + public void Execute(final Class callbackClass, final Callback callback) + { + Thread asyncThread = new Thread(new Runnable() + { + public void run() + { + AsyncJsonWebCall.super.Execute(callbackClass, callback); + } + }); + + asyncThread.start(); + } + + public void Execute(final Class callbackClass, final Callback callback, final Object argument) + { + Thread asyncThread = new Thread(new Runnable() + { + public void run() + { + AsyncJsonWebCall.super.Execute(callbackClass, callback, argument); + } + }); + + asyncThread.start(); + } +} diff --git a/Plugins/Mineplex.ChestConverter/src/mineplex/chestConverter/ChestConverter.java b/Plugins/Mineplex.ChestConverter/src/mineplex/chestConverter/ChestConverter.java index a9ddea664..98be01049 100644 --- a/Plugins/Mineplex.ChestConverter/src/mineplex/chestConverter/ChestConverter.java +++ b/Plugins/Mineplex.ChestConverter/src/mineplex/chestConverter/ChestConverter.java @@ -1,8 +1,10 @@ package mineplex.chestConverter; import java.text.SimpleDateFormat; +import java.util.ArrayList; import java.util.Date; import java.util.HashMap; +import java.util.List; import java.util.logging.Logger; public class ChestConverter @@ -13,29 +15,41 @@ public class ChestConverter public static void main (String args[]) { _repository = new ChestConverterRepository(); - int count = 5000; + int count = 0; + int batchAmount = 5000; + + HashMap tasks = _repository.getTaskList(); while (true) { long time = System.currentTimeMillis(); - HashMap playerMap = _repository.retrieveKeyInventoryBatch(count); + HashMap> playerMap = new HashMap>(); - if (playerMap.size() == 0) + + List taskList = _repository.getTasks(count, batchAmount); + + if (taskList.size() == 0) return; - _repository.incrementClient(playerMap, false); - _repository.deleteKeys(count); + for (AccountTask task : taskList) + { + if (!playerMap.containsKey(task.UUID)) + playerMap.put(task.UUID, new ArrayList()); + + playerMap.get(task.UUID).add(tasks.get(task.Task)); + } + + _repository.incrementClients(playerMap); try { - log("Natural sleep. " + count + " took " + (System.currentTimeMillis() - time) / 1000 + " seconds."); - Thread.sleep(250); + count += batchAmount; + log("Natural sleep. " + batchAmount + " took " + (System.currentTimeMillis() - time) / 1000 + " seconds. Count = " + + count); + Thread.sleep(100); } catch (InterruptedException e) { e.printStackTrace(); } - - break; } } diff --git a/Plugins/Mineplex.ChestConverter/src/mineplex/chestConverter/ChestConverterRepository.java b/Plugins/Mineplex.ChestConverter/src/mineplex/chestConverter/ChestConverterRepository.java index 0970b1b4e..302a6ef0e 100644 --- a/Plugins/Mineplex.ChestConverter/src/mineplex/chestConverter/ChestConverterRepository.java +++ b/Plugins/Mineplex.ChestConverter/src/mineplex/chestConverter/ChestConverterRepository.java @@ -5,23 +5,20 @@ import java.sql.DriverManager; import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.SQLException; +import java.sql.Statement; +import java.util.ArrayList; import java.util.HashMap; +import java.util.List; import java.util.Map.Entry; public class ChestConverterRepository { - private String _connectionString = "jdbc:mysql://db.mineplex.com:3306/Account"; + private String _connectionString = "jdbc:mysql://db.mineplex.com:3306/Account?allowMultiQueries=true"; private String _userName = "root"; private String _password = "tAbechAk3wR7tuTh"; - private static String RETRIEVE_CHESTS = "SELECT A.uuid, count FROM accountInventory INNER JOIN accounts AS A ON A.id = accountInventory.accountId WHERE itemId = 56 AND count > 0 ORDER BY accountInventory.id LIMIT ?;"; - private static String RETRIEVE_KEYS = "SELECT A.uuid, count FROM accountInventory INNER JOIN accounts AS A ON A.id = accountInventory.accountId WHERE itemId = 67 AND count > 0 ORDER BY accountInventory.id LIMIT ?;"; - - private static String DELETE_CHESTS = "DELETE FROM accountInventory WHERE itemId = 56 ORDER BY accountInventory.id LIMIT ?"; - private static String DELETE_KEYS = "DELETE FROM accountInventory WHERE itemId = 67 ORDER BY accountInventory.id LIMIT ?"; - - private static String INSERT_CLIENT_INVENTORY = "INSERT INTO accountInventory (accountId, itemId, count) SELECT accounts.id, ?, ? FROM accounts WHERE accounts.uuid = ? ON DUPLICATE KEY UPDATE count=count + VALUES(count);"; - private static String UPDATE_CLIENT_INVENTORY = "UPDATE accountInventory AS AI INNER JOIN accounts ON AI.accountId = accounts.id SET AI.count = AI.count + ? WHERE accounts.uuid = ? AND AI.itemId = ?;"; + private static String ADD_ACCOUNT_TASK = "INSERT INTO accountTasks (accountId, taskId) VALUES (?, ?);"; + private static String RETRIEVE_TASKS = "SELECT id, name FROM tasks;"; private static Connection _connection; @@ -56,24 +53,24 @@ public class ChestConverterRepository } } - public HashMap retrieveChestInventoryBatch(int count) + public HashMap getTaskList() { - HashMap playerList = new HashMap(); - + HashMap tasks = new HashMap(); PreparedStatement preparedStatement = null; try { if (_connection == null || _connection.isClosed()) _connection = DriverManager.getConnection(_connectionString, _userName, _password); + + preparedStatement = _connection.prepareStatement(RETRIEVE_TASKS); + preparedStatement.execute(); - preparedStatement = _connection.prepareStatement(RETRIEVE_CHESTS); - preparedStatement.setInt(1, count); - ResultSet resultSet = preparedStatement.executeQuery(); + ResultSet resultSet = preparedStatement.getResultSet(); while (resultSet.next()) { - playerList.put(resultSet.getString(1), resultSet.getInt(2)); + tasks.put(resultSet.getString(2), resultSet.getInt(1)); } } catch (Exception exception) @@ -95,133 +92,64 @@ public class ChestConverterRepository } } - return playerList; + return tasks; } - public HashMap retrieveKeyInventoryBatch(int count) + public List getTasks(int skip, int count) + { + return new JsonWebCall("http://accounts.mineplex.com/PlayerAccount/GetTasksByCount").Execute(new com.google.gson.reflect.TypeToken>(){}.getType(), new SearchConf(skip, count)); + } + + public void incrementClients(HashMap> playerList) { - HashMap playerList = new HashMap(); - PreparedStatement preparedStatement = null; + Statement statement = null; try { if (_connection == null || _connection.isClosed()) _connection = DriverManager.getConnection(_connectionString, _userName, _password); - preparedStatement = _connection.prepareStatement(RETRIEVE_KEYS); - preparedStatement.setInt(1, count); - ResultSet resultSet = preparedStatement.executeQuery(); - - while (resultSet.next()) + statement = _connection.createStatement(); + HashMap> playerIdList = new HashMap>(); + String queryString = ""; + for (Entry> entry : playerList.entrySet()) { - playerList.put(resultSet.getString(1), resultSet.getInt(2)); + queryString += "SELECT id FROM accounts WHERE accounts.uuid = '" + entry.getKey() + "' LIMIT 1;"; } - } - catch (Exception exception) - { - exception.printStackTrace(); - } - finally - { - if (preparedStatement != null) + + statement.execute(queryString); + statement.getUpdateCount(); + + for (Entry> entry : playerList.entrySet()) { - try + ResultSet resultSet = statement.getResultSet(); + + while (resultSet.next()) { - preparedStatement.close(); - } - catch (SQLException e) - { - e.printStackTrace(); + for (Integer taskId : entry.getValue()) + { + if (!playerIdList.containsKey(resultSet.getInt(1))) + playerIdList.put(resultSet.getInt(1), new ArrayList()); + + playerIdList.get(resultSet.getInt(1)).add(taskId); + } } + statement.getMoreResults(); } - } - - return playerList; - } - - public void incrementClient(HashMap playerList, boolean chest) - { - PreparedStatement preparedStatement = null; - - try - { - if (_connection == null || _connection.isClosed()) - _connection = DriverManager.getConnection(_connectionString, _userName, _password); - preparedStatement = _connection.prepareStatement(UPDATE_CLIENT_INVENTORY); - - for (Entry entry : playerList.entrySet()) + preparedStatement = _connection.prepareStatement(ADD_ACCOUNT_TASK); + System.out.println("adding to mysql db."); + for (Entry> entry : playerIdList.entrySet()) { - preparedStatement.setInt(1, entry.getValue()); - preparedStatement.setString(2, entry.getKey()); - preparedStatement.setInt(3, chest ? 690 : 692); - - preparedStatement.addBatch(); - - if (chest) + for (Integer taskId : entry.getValue()) { - if (entry.getValue() > 20) - { - preparedStatement.setInt(1, 1); - preparedStatement.setString(2, entry.getKey()); - preparedStatement.setInt(3, 692); - - preparedStatement.addBatch(); - } - - if (entry.getValue() > 50) - { - preparedStatement.setInt(1, 1); - preparedStatement.setString(2, entry.getKey()); - preparedStatement.setInt(3, 691); - - preparedStatement.addBatch(); - } + preparedStatement.setInt(1, entry.getKey()); + preparedStatement.setInt(2, taskId); + preparedStatement.addBatch(); } } - int[] rowsAffected = preparedStatement.executeBatch(); - int i = 0; - - preparedStatement.close(); - preparedStatement = _connection.prepareStatement(INSERT_CLIENT_INVENTORY); - - for (Entry entry : playerList.entrySet()) - { - if (rowsAffected[i] < 1) - { - preparedStatement.setInt(1, chest ? 690 : 692); - preparedStatement.setInt(2, entry.getValue()); - preparedStatement.setString(3, entry.getKey()); - - preparedStatement.addBatch(); - - if (chest) - { - if (entry.getValue() > 20) - { - preparedStatement.setInt(1, 692); - preparedStatement.setInt(2, 1); - preparedStatement.setString(3, entry.getKey()); - - preparedStatement.addBatch(); - } - - if (entry.getValue() > 50) - { - preparedStatement.setInt(1, 691); - preparedStatement.setInt(2, 1); - preparedStatement.setString(3, entry.getKey()); - - preparedStatement.addBatch(); - } - } - } - - i++; - } - preparedStatement.executeBatch(); } catch (Exception exception) @@ -243,74 +171,4 @@ public class ChestConverterRepository } } } - - public void deleteChests(int count) - { - PreparedStatement preparedStatement = null; - - try - { - if (_connection == null || _connection.isClosed()) - _connection = DriverManager.getConnection(_connectionString, _userName, _password); - - preparedStatement = _connection.prepareStatement(DELETE_CHESTS); - preparedStatement.setInt(1, count); - preparedStatement.executeUpdate(); - - System.out.println("Deleting " + count + " inventory records."); - } - catch (Exception exception) - { - exception.printStackTrace(); - } - finally - { - if (preparedStatement != null) - { - try - { - preparedStatement.close(); - } - catch (SQLException e) - { - e.printStackTrace(); - } - } - } - } - - public void deleteKeys(int count) - { - PreparedStatement preparedStatement = null; - - try - { - if (_connection == null || _connection.isClosed()) - _connection = DriverManager.getConnection(_connectionString, _userName, _password); - - preparedStatement = _connection.prepareStatement(DELETE_KEYS); - preparedStatement.setInt(1, count); - preparedStatement.executeUpdate(); - - System.out.println("Deleting " + count + " inventory records."); - } - catch (Exception exception) - { - exception.printStackTrace(); - } - finally - { - if (preparedStatement != null) - { - try - { - preparedStatement.close(); - } - catch (SQLException e) - { - e.printStackTrace(); - } - } - } - } } diff --git a/Plugins/Mineplex.ChestConverter/src/mineplex/chestConverter/JsonWebCall.java b/Plugins/Mineplex.ChestConverter/src/mineplex/chestConverter/JsonWebCall.java new file mode 100644 index 000000000..b16829d57 --- /dev/null +++ b/Plugins/Mineplex.ChestConverter/src/mineplex/chestConverter/JsonWebCall.java @@ -0,0 +1,359 @@ +package mineplex.chestConverter; + +import java.io.BufferedReader; +import java.io.IOException; +import java.io.InputStream; +import java.io.InputStreamReader; +import java.lang.reflect.Type; + +import mineplex.core.common.util.Callback; +import mineplex.core.common.util.UtilSystem; + +import org.apache.http.HttpResponse; +import org.apache.http.client.HttpClient; +import org.apache.http.client.methods.HttpPost; +import org.apache.http.conn.scheme.PlainSocketFactory; +import org.apache.http.conn.scheme.Scheme; +import org.apache.http.conn.scheme.SchemeRegistry; +import org.apache.http.entity.StringEntity; +import org.apache.http.impl.client.DefaultHttpClient; +import org.apache.http.impl.conn.PoolingClientConnectionManager; +import org.apache.http.message.BasicHeader; +import org.apache.http.protocol.HTTP; + +import com.google.gson.Gson; + +public class JsonWebCall +{ + private String _url; + private PoolingClientConnectionManager _connectionManager; + + public JsonWebCall(String url) + { + _url = url; + + SchemeRegistry schemeRegistry = new SchemeRegistry(); + schemeRegistry.register(new Scheme("http", 80, PlainSocketFactory.getSocketFactory())); + + _connectionManager = new PoolingClientConnectionManager(schemeRegistry); + _connectionManager.setMaxTotal(200); + _connectionManager.setDefaultMaxPerRoute(20); + } + + public String ExecuteReturnStream(Object argument) + { + HttpClient httpClient = new DefaultHttpClient(_connectionManager); + InputStream in = null; + String result = null; + + try + { + HttpResponse response; + + Gson gson = new Gson(); + HttpPost request = new HttpPost(_url); + + if (argument != null) + { + StringEntity params = new StringEntity(gson.toJson(argument)); + params.setContentType(new BasicHeader(HTTP.CONTENT_TYPE, "application/json")); + request.setEntity(params); + } + + response = httpClient.execute(request); + + if (response != null) + { + in = response.getEntity().getContent(); + result = convertStreamToString(in); + } + } + catch (Exception ex) + { + System.out.println("Error executing JsonWebCall: \n" + ex.getMessage()); + System.out.println("Result: \n" + result); + + for (StackTraceElement trace : ex.getStackTrace()) + { + System.out.println(trace); + } + } + finally + { + httpClient.getConnectionManager().shutdown(); + + if (in != null) + { + try + { + in.close(); + } + catch (IOException e) + { + e.printStackTrace(); + } + } + } + + return result; + } + + public void Execute() + { + Execute((Object)null); + } + + public void Execute(Object argument) + { + HttpClient httpClient = new DefaultHttpClient(_connectionManager); + InputStream in = null; + + try + { + Gson gson = new Gson(); + HttpPost request = new HttpPost(_url); + + if (argument != null) + { + StringEntity params = new StringEntity(gson.toJson(argument)); + params.setContentType(new BasicHeader(HTTP.CONTENT_TYPE, "application/json")); + request.setEntity(params); + } + + httpClient.execute(request); + } + catch (Exception ex) + { + System.out.println("JsonWebCall.Execute() Error:\n" + ex.getMessage()); + + for (StackTraceElement trace : ex.getStackTrace()) + { + System.out.println(trace); + } + } + finally + { + httpClient.getConnectionManager().shutdown(); + + if (in != null) + { + try + { + in.close(); + } + catch (IOException e) + { + e.printStackTrace(); + } + } + } + } + + public T Execute(Class returnClass) + { + return Execute(returnClass, (Object)null); + } + + public T Execute(Type returnType, Object argument) + { + HttpClient httpClient = new DefaultHttpClient(_connectionManager); + InputStream in = null; + T returnData = null; + String result = null; + + try + { + HttpResponse response; + + Gson gson = new Gson(); + HttpPost request = new HttpPost(_url); + + if (argument != null) + { + StringEntity params = new StringEntity(gson.toJson(argument)); + params.setContentType(new BasicHeader(HTTP.CONTENT_TYPE, "application/json")); + request.setEntity(params); + } + + response = httpClient.execute(request); + + if (response != null) + { + in = response.getEntity().getContent(); + + result = convertStreamToString(in); + returnData = new Gson().fromJson(result, returnType); + } + } + catch (Exception ex) + { + System.out.println("Error executing JsonWebCall: \n" + ex.getMessage()); + System.out.println("Result: \n" + result); + + for (StackTraceElement trace : ex.getStackTrace()) + { + System.out.println(trace); + } + } + finally + { + httpClient.getConnectionManager().shutdown(); + + if (in != null) + { + try + { + in.close(); + } + catch (IOException e) + { + e.printStackTrace(); + } + } + } + + return returnData; + } + + public T Execute(Class returnClass, Object argument) + { + HttpClient httpClient = new DefaultHttpClient(_connectionManager); + InputStream in = null; + T returnData = null; + String result = null; + + try + { + HttpResponse response; + + Gson gson = new Gson(); + HttpPost request = new HttpPost(_url); + + if (argument != null) + { + StringEntity params = new StringEntity(gson.toJson(argument)); + params.setContentType(new BasicHeader(HTTP.CONTENT_TYPE, "application/json")); + request.setEntity(params); + } + + response = httpClient.execute(request); + + if (response != null) + { + in = response.getEntity().getContent(); + + result = convertStreamToString(in); + returnData = new Gson().fromJson(result, returnClass); + } + } + catch (Exception ex) + { + System.out.println("Error executing JsonWebCall: \n" + ex.getMessage()); + System.out.println("Result: \n" + result); + + for (StackTraceElement trace : ex.getStackTrace()) + { + System.out.println(trace); + } + } + finally + { + httpClient.getConnectionManager().shutdown(); + + if (in != null) + { + try + { + in.close(); + } + catch (IOException e) + { + e.printStackTrace(); + } + } + } + + return returnData; + } + + public void Execute(Class callbackClass, Callback callback) + { + Execute(callbackClass, callback, (Object)null); + } + + public void Execute(Class callbackClass, Callback callback, Object argument) + { + HttpClient httpClient = new DefaultHttpClient(_connectionManager); + InputStream in = null; + String result = null; + + try + { + HttpResponse response; + + Gson gson = new Gson(); + HttpPost request = new HttpPost(_url); + + if (argument != null) + { + StringEntity params = new StringEntity(gson.toJson(argument)); + params.setContentType(new BasicHeader(HTTP.CONTENT_TYPE, "application/json")); + request.setEntity(params); + } + + response = httpClient.execute(request); + + if (response != null && callback != null) + { + in = response.getEntity().getContent(); + + result = convertStreamToString(in); + callback.run(new Gson().fromJson(result, callbackClass)); + } + } + catch (Exception ex) + { + System.out.println("Error executing JsonWebCall: \n" + ex.getMessage()); + UtilSystem.printStackTrace(ex.getStackTrace()); + System.out.println("Result: \n" + result); + } + finally + { + httpClient.getConnectionManager().shutdown(); + + if (in != null) + { + try + { + in.close(); + } + catch (IOException e) + { + e.printStackTrace(); + } + } + } + } + + protected String convertStreamToString(InputStream is) + { + BufferedReader reader = new BufferedReader(new InputStreamReader(is)); + StringBuilder sb = new StringBuilder(); + + String line = null; + try { + while ((line = reader.readLine()) != null) { + sb.append(line + "\n"); + } + } catch (IOException e) { + e.printStackTrace(); + } finally { + try { + is.close(); + } catch (IOException e) { + e.printStackTrace(); + } + } + return sb.toString(); + } +} diff --git a/Plugins/Mineplex.ChestConverter/src/mineplex/chestConverter/SearchConf.java b/Plugins/Mineplex.ChestConverter/src/mineplex/chestConverter/SearchConf.java new file mode 100644 index 000000000..36c80fa46 --- /dev/null +++ b/Plugins/Mineplex.ChestConverter/src/mineplex/chestConverter/SearchConf.java @@ -0,0 +1,13 @@ +package mineplex.chestConverter; + +public class SearchConf +{ + public SearchConf(int skip, int count) + { + Skip = skip; + Count = count; + } + + public int Skip; + public int Count; +} diff --git a/Website/LOC.Core/LOC.Core.csproj b/Website/LOC.Core/LOC.Core.csproj index a52e4b798..c4601f0a9 100644 --- a/Website/LOC.Core/LOC.Core.csproj +++ b/Website/LOC.Core/LOC.Core.csproj @@ -76,6 +76,7 @@ + diff --git a/Website/LOC.Core/SearchConf.cs b/Website/LOC.Core/SearchConf.cs new file mode 100644 index 000000000..b6489ca78 --- /dev/null +++ b/Website/LOC.Core/SearchConf.cs @@ -0,0 +1,13 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace LOC.Core +{ + public class SearchConf + { + public int Skip { get; set; } + public int Count { get; set; } + } +} diff --git a/Website/LOC.Website.Common/Models/AccountAdministrator.cs b/Website/LOC.Website.Common/Models/AccountAdministrator.cs index 8d0c23f74..9d7bbd417 100644 --- a/Website/LOC.Website.Common/Models/AccountAdministrator.cs +++ b/Website/LOC.Website.Common/Models/AccountAdministrator.cs @@ -72,13 +72,13 @@ return accounts; } - public List GetTasksByCount(int count) + public List GetTasksByCount(SearchConf searchConf) { var tasks = new List(); using (var repository = _repositoryFactory.CreateRepository()) { - var gameTasks = repository.GetAll().OrderBy(x => x.GameTaskId).Take(count).Include(x => x.Account).ToList(); + var gameTasks = repository.GetAll().OrderBy(x => x.GameTaskId).Skip(searchConf.Skip).Take(searchConf.Count).Include(x => x.Account).ToList(); foreach (var task in gameTasks) { diff --git a/Website/LOC.Website.Common/Models/IAccountAdministrator.cs b/Website/LOC.Website.Common/Models/IAccountAdministrator.cs index afcb11d4e..1e6a1522f 100644 --- a/Website/LOC.Website.Common/Models/IAccountAdministrator.cs +++ b/Website/LOC.Website.Common/Models/IAccountAdministrator.cs @@ -6,6 +6,7 @@ using Core.Model.Sales; using Core.Tokens; using Core.Tokens.Client; + using LOC.Core; public interface IAccountAdministrator { @@ -42,6 +43,6 @@ ClientToken GetAccountByUUID(string uuid); - List GetTasksByCount(int count); + List GetTasksByCount(SearchConf searchConf); } } diff --git a/Website/LOC.Website.Web/Controllers/PlayerAccountController.cs b/Website/LOC.Website.Web/Controllers/PlayerAccountController.cs index 1f6e02b55..fe4efc6a9 100644 --- a/Website/LOC.Website.Web/Controllers/PlayerAccountController.cs +++ b/Website/LOC.Website.Web/Controllers/PlayerAccountController.cs @@ -9,6 +9,7 @@ using Core.Tokens.Client; using Newtonsoft.Json; using System.Collections.Generic; + using LOC.Core; public class PlayerAccountController : Controller { @@ -40,9 +41,9 @@ } [HttpPost] - public ActionResult GetTasksByCount(int count) + public ActionResult GetTasksByCount(SearchConf searchConf) { - var tasks = _accountAdministrator.GetTasksByCount(count); + var tasks = _accountAdministrator.GetTasksByCount(searchConf); var json = JsonConvert.SerializeObject(tasks); return Content(json, "application/json"); diff --git a/Website/LOC.Website.Web/LOC.Website.Web.Publish.xml b/Website/LOC.Website.Web/LOC.Website.Web.Publish.xml index 72e6fb292..4d7cdc038 100644 --- a/Website/LOC.Website.Web/LOC.Website.Web.Publish.xml +++ b/Website/LOC.Website.Web/LOC.Website.Web.Publish.xml @@ -1,12 +1,12 @@  + - @@ -17,8 +17,10 @@ - + + + @@ -26,8 +28,8 @@ - + @@ -41,26 +43,27 @@ - + + + + - + - - - + @@ -71,32 +74,32 @@ - + + - - + - - - + + + - - + + @@ -104,40 +107,41 @@ - - + - + - + - + + + - + - + + - - + @@ -148,53 +152,49 @@ - + - - - - + - - - + + - - + - + - - + + - + + @@ -203,72 +203,74 @@ - - + + - + - + - - + - + - + - + + - + - + - - + + - + - - + + - - + + - + + + @@ -281,40 +283,36 @@ - - - + + - - + - + - - + - @@ -323,8 +321,9 @@ + - + @@ -335,22 +334,21 @@ - - + - - + + @@ -358,6 +356,8 @@ + + @@ -365,17 +365,17 @@ + - + - @@ -383,22 +383,22 @@ + - + - - - + + - + @@ -409,62 +409,64 @@ - + - + + + + + + - - + - + - + - - + - - - + + - + - + @@ -472,66 +474,66 @@ - - + + - + - - + + - - + - - + - - + + - - + + - + - - - - - + + + + + - + + + @@ -542,24 +544,24 @@ - + - - + - + - + + @@ -569,14 +571,13 @@ - + - @@ -586,7 +587,7 @@ - + @@ -597,22 +598,20 @@ - - + + - - - + @@ -620,18 +619,22 @@ + - - + + + - + + + @@ -645,89 +648,87 @@ + - + - + - - - + - - + - + + + + + + - - - + - + - - - + - + - - + - + - + - + @@ -735,66 +736,67 @@ - + - + - - - - + + + - + - + - - + - - + + + - - + + - + - - - - - + + + + + - + + + @@ -805,24 +807,24 @@ - + - - + - + - + + @@ -832,14 +834,13 @@ - + - @@ -849,7 +850,7 @@ - + @@ -860,22 +861,20 @@ - - + + - - - + @@ -883,6 +882,7 @@ + @@ -891,10 +891,13 @@ + - + + + @@ -908,89 +911,87 @@ + - + - + - - - + - - + - + + + + + + - - - - - + - + - - + - + - + - + @@ -998,58 +999,57 @@ - + - + - - + + - - + - - + - - + + + - - + + - + - - - - - + + + + + - + \ No newline at end of file diff --git a/Website/LOCWebsite.suo b/Website/LOCWebsite.suo index 2fd6e5bcf..f7fc52970 100644 Binary files a/Website/LOCWebsite.suo and b/Website/LOCWebsite.suo differ