master
wangning 7 years ago
parent 5055bcdd23
commit 954ea54a74

@ -130,74 +130,74 @@ public class PartnerManageControllerTest {
}
@Test
public void toMel_Zoe_All() {
List<JSONObject> clients = clientMapper.testList("194");
String manager_id = "a1ffa1f6-3dc5-4dbe-bc00-ffc185c5ebc6";
clients.forEach(p -> {
JSONObject manager = new JSONObject();
manager.put("org_id", 1);
manager.put("manager_id", manager_id);
String clientMoniker = p.getString("client_moniker");
JSONObject jsonObject = new JSONObject();
jsonObject.put("type", "add");
jsonObject.put("start_date", new Date());
JSONObject user = new JSONObject();
user.put("manager_id", manager_id);
user.put("display_name", "Melbourne-Zoe");
user.put("proportion", "0.5");
List<JSONObject> users = new ArrayList<>();
users.add(user);
jsonObject.put("users", users);
try {
clientManager.updateClientBDUsers(manager, clientMoniker, jsonObject);
} catch (Exception e) {
e.printStackTrace();
}
});
}
@Test
public void toSyd_Zoe_All() {
String manager_id = "215";
List<JSONObject> clients = clientMapper.testList("110");
List<JSONObject> clients106 = clientMapper.testList("106");
List<JSONObject> clients240 = clientMapper.testList("240");
List<JSONObject> clients200 = clientMapper.testList("200");
clients.addAll(clients106);
clients.addAll(clients200);
clients.addAll(clients240);
clients.forEach(p -> {
JSONObject manager = new JSONObject();
manager.put("org_id", 1);
manager.put("manager_id", manager_id);
String clientMoniker = p.getString("client_moniker");
JSONObject jsonObject = new JSONObject();
jsonObject.put("type", "add");
jsonObject.put("start_date", new Date());
JSONObject user = new JSONObject();
user.put("manager_id", manager_id);
user.put("display_name", "Sydney-Zoe");
user.put("proportion", "0.5");
List<JSONObject> users = new ArrayList<>();
users.add(user);
jsonObject.put("users", users);
try {
clientManager.updateClientBDUsers(manager, clientMoniker, jsonObject);
} catch (Exception e) {
e.printStackTrace();
}
});
}
// @Test
// public void toMel_Zoe_All() {
//
// List<JSONObject> clients = clientMapper.testList("194");
//
// String manager_id = "a1ffa1f6-3dc5-4dbe-bc00-ffc185c5ebc6";
//
// clients.forEach(p -> {
// JSONObject manager = new JSONObject();
// manager.put("org_id", 1);
// manager.put("manager_id", manager_id);
// String clientMoniker = p.getString("client_moniker");
// JSONObject jsonObject = new JSONObject();
// jsonObject.put("type", "add");
// jsonObject.put("start_date", new Date());
//
// JSONObject user = new JSONObject();
// user.put("manager_id", manager_id);
// user.put("display_name", "Melbourne-Zoe");
// user.put("proportion", "0.5");
// List<JSONObject> users = new ArrayList<>();
// users.add(user);
// jsonObject.put("users", users);
// try {
// clientManager.updateClientBDUsers(manager, clientMoniker, jsonObject);
// } catch (Exception e) {
// e.printStackTrace();
// }
//
// });
//
// }
//
// @Test
// public void toSyd_Zoe_All() {
// String manager_id = "215";
// List<JSONObject> clients = clientMapper.testList("110");
// List<JSONObject> clients106 = clientMapper.testList("106");
// List<JSONObject> clients240 = clientMapper.testList("240");
// List<JSONObject> clients200 = clientMapper.testList("200");
// clients.addAll(clients106);
// clients.addAll(clients200);
// clients.addAll(clients240);
//
// clients.forEach(p -> {
// JSONObject manager = new JSONObject();
// manager.put("org_id", 1);
// manager.put("manager_id", manager_id);
// String clientMoniker = p.getString("client_moniker");
// JSONObject jsonObject = new JSONObject();
// jsonObject.put("type", "add");
// jsonObject.put("start_date", new Date());
//
// JSONObject user = new JSONObject();
// user.put("manager_id", manager_id);
// user.put("display_name", "Sydney-Zoe");
// user.put("proportion", "0.5");
// List<JSONObject> users = new ArrayList<>();
// users.add(user);
// jsonObject.put("users", users);
// try {
// clientManager.updateClientBDUsers(manager, clientMoniker, jsonObject);
// } catch (Exception e) {
// e.printStackTrace();
// }
//
// });
//
// }
}
Loading…
Cancel
Save