Commit 86d26e98 by 林永健

Merge remote-tracking branch 'origin/v2.0.1' into v2.0.1

2 parents 5250bb00 e6379388
...@@ -88,18 +88,19 @@ public class ControllerDisTasksDemo { ...@@ -88,18 +88,19 @@ public class ControllerDisTasksDemo {
System.out.println("入参" + JSONObject.toJSONString(multiValueMap)); System.out.println("入参" + JSONObject.toJSONString(multiValueMap));
post = SopHelper.post(multiValueMap, Object.class, ConfigUtils.getProperty("scrm.baseurl")+baseurl, method); post = SopHelper.post(multiValueMap, Object.class, ConfigUtils.getProperty("scrm.baseurl")+baseurl, method);
System.out.println("返回" + JSONObject.toJSONString(post)); System.out.println("返回" + JSONObject.toJSONString(post));
map.put("sendTask",post); map.put("sendTaskRes",post);
// 新增任务记录 // 新增任务记录
RestTemplate restTemplate = new RestTemplate(); RestTemplate restTemplate = new RestTemplate();
Object o = restTemplate.postForObject(ConfigUtils.getProperty("scrm.sopurl")+taskUrl, sopNodeTaskInfoList, Object.class); Object o = restTemplate.postForObject(ConfigUtils.getProperty("scrm.sopurl")+taskUrl, sopNodeTaskInfoList, Object.class);
map.put("sendTask",post); map.put("sendTaskLogRes",o);
} catch (Exception e) { } catch (Exception e) {
throw new RuntimeException(e); e.printStackTrace();
map.put("errMessage",e.getMessage());
} }
return (JSONObject) JSONObject.toJSON(post);
} }
return null; map.put("message","未找到匹配客户");
return (JSONObject) JSONObject.toJSON(map);
} }
} }
\ No newline at end of file \ No newline at end of file
...@@ -42,11 +42,9 @@ public class ControllerGetEntCusDemo { ...@@ -42,11 +42,9 @@ public class ControllerGetEntCusDemo {
try { try {
String merchantId = SopHelper.getValueFromJsonString(instParam, String merchantId = SopHelper.getValueFromJsonString(instParam,
"merchantId"); "merchantId");
String instDefalutName = SopHelper.getValueFromJsonString(instParam, "stages", "stage1",
"value");
multiValueMap.add("merchantId",merchantId); multiValueMap.add("merchantId",merchantId);
multiValueMap.add("instId",sopInst.getInstId()); multiValueMap.add("instId",sopInst.getInstId());
multiValueMap.add("instDefalutName",instDefalutName); multiValueMap.add("instDefalutName","初始化阶段");
System.out.println("入参" + JSONObject.toJSONString(multiValueMap)); System.out.println("入参" + JSONObject.toJSONString(multiValueMap));
post = SopHelper.post(multiValueMap, Object.class, ConfigUtils.getProperty("scrm.baseurl")+ baseurl, method); post = SopHelper.post(multiValueMap, Object.class, ConfigUtils.getProperty("scrm.baseurl")+ baseurl, method);
System.out.println("返回" + JSONObject.toJSONString(post)); System.out.println("返回" + JSONObject.toJSONString(post));
......
...@@ -30,11 +30,9 @@ public class ControllerGetGrCusDemo { ...@@ -30,11 +30,9 @@ public class ControllerGetGrCusDemo {
try { try {
String merchantId = SopHelper.getValueFromJsonString(instParam, String merchantId = SopHelper.getValueFromJsonString(instParam,
"merchantId"); "merchantId");
String instDefalutName = SopHelper.getValueFromJsonString(instParam, "stages", "stage1",
"value");
multiValueMap.add("merchantId",merchantId); multiValueMap.add("merchantId",merchantId);
multiValueMap.add("instId",sopInst.getInstId()); multiValueMap.add("instId",sopInst.getInstId());
multiValueMap.add("instDefalutName",instDefalutName); multiValueMap.add("instDefalutName","初始化阶段");
System.out.println("入参" + JSONObject.toJSONString(multiValueMap)); System.out.println("入参" + JSONObject.toJSONString(multiValueMap));
post = SopHelper.post(multiValueMap, Object.class, ConfigUtils.getProperty("scrm.baseurl")+ baseurl, method); post = SopHelper.post(multiValueMap, Object.class, ConfigUtils.getProperty("scrm.baseurl")+ baseurl, method);
System.out.println("返回" + JSONObject.toJSONString(post)); System.out.println("返回" + JSONObject.toJSONString(post));
......
...@@ -13,6 +13,7 @@ import com.alibaba.fastjson.JSON; ...@@ -13,6 +13,7 @@ import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Arrays; import java.util.Arrays;
import java.util.HashMap;
import java.util.Iterator; import java.util.Iterator;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
...@@ -35,7 +36,9 @@ public class ControllerSendMessageDemo { ...@@ -35,7 +36,9 @@ public class ControllerSendMessageDemo {
public static JSON execute(JSON param) { public static JSON execute(JSON param) {
// 将JSON字符串转换为Map // 将JSON字符串转换为Map
// 将Map中的数据放入MultiValueMap中 // 将Map中的数据放入MultiValueMap中
Map map = new HashMap();
Object post = null; Object post = null;
try {
MultiValueMap<String, String> multiValueMap = new LinkedMultiValueMap<>(); MultiValueMap<String, String> multiValueMap = new LinkedMultiValueMap<>();
SopExecutorResult excustorParam = SopHelper.getExcustorParam(param); SopExecutorResult excustorParam = SopHelper.getExcustorParam(param);
Map<String, Object> resultData = excustorParam.getResultData(); Map<String, Object> resultData = excustorParam.getResultData();
...@@ -82,13 +85,19 @@ public class ControllerSendMessageDemo { ...@@ -82,13 +85,19 @@ public class ControllerSendMessageDemo {
} }
RestTemplate restTemplate = new RestTemplate(); RestTemplate restTemplate = new RestTemplate();
System.out.println("发送消息参数" + JSONObject.toJSONString(customerTouchModel)); System.out.println("发送消息参数" + JSONObject.toJSONString(customerTouchModel));
post = restTemplate.postForObject(ConfigUtils.getProperty("sop.baseurl") + sendCustomerUrl, post = restTemplate.postForObject(
ConfigUtils.getProperty("sop.baseurl") + sendCustomerUrl,
customerTouchModel, Object.class); customerTouchModel, Object.class);
System.out.println("发送消息参数结果" + JSONObject.toJSONString(post)); System.out.println("发送消息参数结果" + JSONObject.toJSONString(post));
return (JSONObject) JSONObject.toJSON(collect); return (JSONObject) JSONObject.toJSON(collect);
} }
} }
return null; map.put("message","未找到匹配客户");
} catch (Exception e) {
e.printStackTrace();
map.put("errMessage", e.getMessage());
}
return (JSONObject) JSONObject.toJSON(map);
} }
/** /**
...@@ -106,7 +115,7 @@ public class ControllerSendMessageDemo { ...@@ -106,7 +115,7 @@ public class ControllerSendMessageDemo {
List<CustomerInfo> value, String nodeParam, SopInst sopInst, SopInstNode sopInstNode, List<CustomerInfo> value, String nodeParam, SopInst sopInst, SopInstNode sopInstNode,
List<SopTaskExecuteStaffModel> sopTaskExecuteStaffModels) { List<SopTaskExecuteStaffModel> sopTaskExecuteStaffModels) {
buildDefaultParam(customerTouchModel, sopInst, sopInstNode, nodeParam, buildDefaultParam(customerTouchModel, sopInst, sopInstNode, nodeParam,
sopTaskExecuteStaffModels); sopTaskExecuteStaffModels, false);
List<String> collect = value.stream() List<String> collect = value.stream()
.filter(index -> StringUtils.isNotEmpty(index.getCustomerPhone())) .filter(index -> StringUtils.isNotEmpty(index.getCustomerPhone()))
.map(CustomerInfo::getExternalUserId).collect( .map(CustomerInfo::getExternalUserId).collect(
...@@ -120,21 +129,24 @@ public class ControllerSendMessageDemo { ...@@ -120,21 +129,24 @@ public class ControllerSendMessageDemo {
private static void buildDefaultParam(CustomerTouchModel customerTouchModel, SopInst sopInst, private static void buildDefaultParam(CustomerTouchModel customerTouchModel, SopInst sopInst,
SopInstNode sopInstNode, String nodeParam, SopInstNode sopInstNode, String nodeParam,
List<SopTaskExecuteStaffModel> sopTaskExecuteStaffModels) { List<SopTaskExecuteStaffModel> sopTaskExecuteStaffModels, boolean flag) {
String taskParam = SopHelper.getListValueFromJsonString(nodeParam, "taskParam"); String taskParam = SopHelper.getListValueFromJsonString(nodeParam, "taskParam");
String contentlists = SopHelper.getListValueFromJsonString(taskParam, "attachments"); String contentlists = SopHelper.getListValueFromJsonString(taskParam, "attachments");
customerTouchModel.setInstId(sopInst.getInstId()); customerTouchModel.setInstId(sopInst.getInstId());
customerTouchModel.setNodeId(sopInstNode.getNodeId()); customerTouchModel.setNodeId(sopInstNode.getNodeId());
String supMerchantNo = SopHelper.getValueFromJsonString(sopInst.getInstParam(),"customData", "supMerchantNo"); String supMerchantNo = SopHelper.getValueFromJsonString(sopInst.getInstParam(), "customData",
"supMerchantNo");
String merchantId = SopHelper.getValueFromJsonString(sopInst.getInstParam(), "merchantId"); String merchantId = SopHelper.getValueFromJsonString(sopInst.getInstParam(), "merchantId");
String merchantName = SopHelper.getValueFromJsonString(sopInst.getInstParam(), "merchantName");
customerTouchModel.setMerchantId(Integer.parseInt(merchantId)); customerTouchModel.setMerchantId(Integer.parseInt(merchantId));
setConverContentList(contentlists, customerTouchModel, sopInst.getInstId(), setConverContentList(contentlists, customerTouchModel, sopInst.getInstId(),
sopInstNode.getNodeId(), merchantId); sopInstNode.getNodeId(), merchantId, merchantName, flag);
customerTouchModel.setSupMerchantNo(Integer.parseInt(supMerchantNo)); customerTouchModel.setSupMerchantNo(Integer.parseInt(supMerchantNo));
} }
private static void setConverContentList(String contentlists, private static void setConverContentList(String contentlists,
CustomerTouchModel customerTouchModel, String instId, Integer nodeId, String merchantId) { CustomerTouchModel customerTouchModel, String instId, Integer nodeId, String merchantId,
String merchantName, boolean flag) {
List<CustomerTouchSourceModel> customerTouchSourceModels = JSONObject.parseArray(contentlists, List<CustomerTouchSourceModel> customerTouchSourceModels = JSONObject.parseArray(contentlists,
CustomerTouchSourceModel.class); CustomerTouchSourceModel.class);
if (CollectionUtils.isNotEmpty(customerTouchSourceModels)) { if (CollectionUtils.isNotEmpty(customerTouchSourceModels)) {
...@@ -146,6 +158,15 @@ public class ControllerSendMessageDemo { ...@@ -146,6 +158,15 @@ public class ControllerSendMessageDemo {
.replace("{3}", instId); .replace("{3}", instId);
customerTouchSourceModel.setAttContent(replace); customerTouchSourceModel.setAttContent(replace);
} }
if (1 == attType.intValue()) {
String attContent = customerTouchSourceModel.getAttContent();
if (flag) {
String replace = "【" + merchantName + "】" + attContent;
customerTouchSourceModel.setAttContent(replace);
} else {
customerTouchSourceModel.setAttContent(attContent);
}
}
} }
} }
customerTouchModel.setContentList(customerTouchSourceModels); customerTouchModel.setContentList(customerTouchSourceModels);
...@@ -165,7 +186,7 @@ public class ControllerSendMessageDemo { ...@@ -165,7 +186,7 @@ public class ControllerSendMessageDemo {
List<CustomerInfo> value, String nodeParam, SopInst sopInst, SopInstNode sopInstNode, List<CustomerInfo> value, String nodeParam, SopInst sopInst, SopInstNode sopInstNode,
List<SopTaskExecuteStaffModel> sopTaskExecuteStaffModels) { List<SopTaskExecuteStaffModel> sopTaskExecuteStaffModels) {
buildDefaultParam(customerTouchModel, sopInst, sopInstNode, nodeParam, buildDefaultParam(customerTouchModel, sopInst, sopInstNode, nodeParam,
sopTaskExecuteStaffModels); sopTaskExecuteStaffModels, true);
List<String> phones = value.stream() List<String> phones = value.stream()
.filter(index -> StringUtils.isNotEmpty(index.getCustomerPhone())) .filter(index -> StringUtils.isNotEmpty(index.getCustomerPhone()))
.map(CustomerInfo::getCustomerPhone).collect( .map(CustomerInfo::getCustomerPhone).collect(
......
...@@ -38,7 +38,9 @@ public class ControllerSendRemindDemo { ...@@ -38,7 +38,9 @@ public class ControllerSendRemindDemo {
public static JSON execute(JSON param) { public static JSON execute(JSON param) {
// 将JSON字符串转换为Map // 将JSON字符串转换为Map
// 将Map中的数据放入MultiValueMap中 // 将Map中的数据放入MultiValueMap中
Map map=new HashMap();
Object post = null; Object post = null;
try {
MultiValueMap<String, String> multiValueMap = new LinkedMultiValueMap<>(); MultiValueMap<String, String> multiValueMap = new LinkedMultiValueMap<>();
SopExecutorResult excustorParam = SopHelper.getExcustorParam(param); SopExecutorResult excustorParam = SopHelper.getExcustorParam(param);
Map<String, Object> resultData = excustorParam.getResultData(); Map<String, Object> resultData = excustorParam.getResultData();
...@@ -63,15 +65,16 @@ public class ControllerSendRemindDemo { ...@@ -63,15 +65,16 @@ public class ControllerSendRemindDemo {
Map<String, List<CustomerInfo>> collect = customerInfoList.stream() Map<String, List<CustomerInfo>> collect = customerInfoList.stream()
.collect(Collectors.groupingBy(CustomerInfo::getUserId)); .collect(Collectors.groupingBy(CustomerInfo::getUserId));
Iterator<Entry<String, List<CustomerInfo>>> iterator = collect.entrySet().iterator(); Iterator<Entry<String, List<CustomerInfo>>> iterator = collect.entrySet().iterator();
List<SopTaskExecuteStaffModel> sopTaskExecuteStaffModels=new ArrayList<>(); List<SopTaskExecuteStaffModel> sopTaskExecuteStaffModels = new ArrayList<>();
SopTaskToStaffExecuteModel customerTouchModel = new SopTaskToStaffExecuteModel(); SopTaskToStaffExecuteModel customerTouchModel = new SopTaskToStaffExecuteModel();
while (iterator.hasNext()) { while (iterator.hasNext()) {
SopTaskExecuteStaffModel sopTaskExecuteStaffModel=new SopTaskExecuteStaffModel(); SopTaskExecuteStaffModel sopTaskExecuteStaffModel = new SopTaskExecuteStaffModel();
Entry<String, List<CustomerInfo>> next = iterator.next(); Entry<String, List<CustomerInfo>> next = iterator.next();
String key = next.getKey(); String key = next.getKey();
List<CustomerInfo> value = next.getValue(); List<CustomerInfo> value = next.getValue();
// 过滤条件为空,或者过滤条件存在 // 过滤条件为空,或者过滤条件存在
if (CollectionUtils.isEmpty(filterUserList) || (CollectionUtils.isNotEmpty(filterUserList) if (CollectionUtils.isEmpty(filterUserList) || (
CollectionUtils.isNotEmpty(filterUserList)
&& filterUserList.contains(key))) { && filterUserList.contains(key))) {
List<String> externalUserList = value.stream() List<String> externalUserList = value.stream()
.filter(index -> StringUtils.isNotEmpty(index.getExternalUserId())) .filter(index -> StringUtils.isNotEmpty(index.getExternalUserId()))
...@@ -80,18 +83,28 @@ public class ControllerSendRemindDemo { ...@@ -80,18 +83,28 @@ public class ControllerSendRemindDemo {
sopTaskExecuteStaffModel.setSendUserId(key); sopTaskExecuteStaffModel.setSendUserId(key);
sopTaskExecuteStaffModel.setSendExternalUserId(externalUserList); sopTaskExecuteStaffModel.setSendExternalUserId(externalUserList);
sopTaskExecuteStaffModels.add(sopTaskExecuteStaffModel); sopTaskExecuteStaffModels.add(sopTaskExecuteStaffModel);
customerTouchModel.setExecuteStaffRequestList(sopTaskExecuteStaffModels);
buildDefaultParam(customerTouchModel, sopInst, sopInstNode, nodeParam,nodeBatch.getNodeBatchNo(),batch.getBatchNo());
} }
} }
if(CollectionUtils.isNotEmpty(sopTaskExecuteStaffModels)) {
customerTouchModel.setExecuteStaffRequestList(sopTaskExecuteStaffModels);
buildDefaultParam(customerTouchModel, sopInst, sopInstNode, nodeParam,
nodeBatch.getNodeBatchNo(), batch.getBatchNo());
RestTemplate restTemplate = new RestTemplate(); RestTemplate restTemplate = new RestTemplate();
System.out.println("发送提醒参数"+JSONObject.toJSONString(customerTouchModel)); System.out.println("发送提醒参数" + JSONObject.toJSONString(customerTouchModel));
post = restTemplate.postForObject(ConfigUtils.getProperty("sop.baseurl")+sendStaffUrl, customerTouchModel, Object.class); post = restTemplate.postForObject(ConfigUtils.getProperty("sop.baseurl") + sendStaffUrl,
System.out.println("发送提醒参数结果"+JSONObject.toJSONString(customerTouchModel)); customerTouchModel, Object.class);
System.out.println("发送提醒参数结果" + JSONObject.toJSONString(customerTouchModel));
return (JSONObject) JSONObject.toJSON(collect); return (JSONObject) JSONObject.toJSON(collect);
} }
map.put("message","未找到匹配客户");
}
}
map.put("message","未找到匹配客户");
} catch (Exception e) {
e.printStackTrace();
map.put("errMessage",e.getMessage());
} }
return null; return (JSONObject) JSONObject.toJSON(map);
} }
/** /**
...@@ -104,7 +117,8 @@ public class ControllerSendRemindDemo { ...@@ -104,7 +117,8 @@ public class ControllerSendRemindDemo {
* @param notebatchNo 节点批次号 * @param notebatchNo 节点批次号
* @param batchNo 实例批次号 * @param batchNo 实例批次号
*/ */
private static void buildDefaultParam(SopTaskToStaffExecuteModel customerTouchModel, SopInst sopInst, private static void buildDefaultParam(SopTaskToStaffExecuteModel customerTouchModel,
SopInst sopInst,
SopInstNode sopInstNode, String nodeParam, String notebatchNo, String batchNo) { SopInstNode sopInstNode, String nodeParam, String notebatchNo, String batchNo) {
String taskParam = SopHelper.getListValueFromJsonString(nodeParam, "taskParam"); String taskParam = SopHelper.getListValueFromJsonString(nodeParam, "taskParam");
String noticeContent = SopHelper.getValueFromJsonString(taskParam, "content"); String noticeContent = SopHelper.getValueFromJsonString(taskParam, "content");
...@@ -113,15 +127,20 @@ public class ControllerSendRemindDemo { ...@@ -113,15 +127,20 @@ public class ControllerSendRemindDemo {
int size = sopTaskExecuteStaffModel.getSendExternalUserId().size(); int size = sopTaskExecuteStaffModel.getSendExternalUserId().size();
String replace = noticeContent.replace("{客户人数}", size + ""); String replace = noticeContent.replace("{客户人数}", size + "");
// 链接追加参数 // 链接追加参数
customerTouchModel.setUrl(ConfigUtils.getProperty("notict.url")+"?notebatchNo="+notebatchNo+"&batchNo="+ customerTouchModel.setUrl(
batchNo+"&nodeId="+sopInstNode.getNodeId()+"&userId="+sopTaskExecuteStaffModel.getSendUserId()+"&noticeContent="+replace); ConfigUtils.getProperty("notict.url") + "?notebatchNo=" + notebatchNo + "&batchNo=" +
batchNo + "&nodeId=" + sopInstNode.getInstNodeId() + "&userId="
+ sopTaskExecuteStaffModel.getSendUserId() + "&noticeContent=" + replace);
customerTouchModel.setTitle("客户跟进提醒"); customerTouchModel.setTitle("客户跟进提醒");
customerTouchModel.setDescription("您有"+sopTaskExecuteStaffModel.getSendExternalUserId().size()+"位客户的待跟进,请及时跟进。"); customerTouchModel.setDescription(
"您有" + sopTaskExecuteStaffModel.getSendExternalUserId().size()
+ "位客户的待跟进,请及时跟进。");
String msgtype = SopHelper.getValueFromJsonString(nodeParam, "msgtype"); String msgtype = SopHelper.getValueFromJsonString(nodeParam, "msgtype");
customerTouchModel.setInstId(sopInst.getInstId()); customerTouchModel.setInstId(sopInst.getInstId());
customerTouchModel.setType("textcard"); customerTouchModel.setType("textcard");
customerTouchModel.setNodeId(sopInstNode.getNodeId()); customerTouchModel.setNodeId(sopInstNode.getNodeId());
String supMerchantNo = SopHelper.getValueFromJsonString(sopInst.getInstParam(),"customData", "supMerchantNo"); String supMerchantNo = SopHelper.getValueFromJsonString(sopInst.getInstParam(), "customData",
"supMerchantNo");
String merchantId = SopHelper.getValueFromJsonString(sopInst.getInstParam(), "merchantId"); String merchantId = SopHelper.getValueFromJsonString(sopInst.getInstParam(), "merchantId");
customerTouchModel.setMerchantId(Integer.parseInt(merchantId)); customerTouchModel.setMerchantId(Integer.parseInt(merchantId));
customerTouchModel.setSupMerchantNo(Integer.parseInt(supMerchantNo)); customerTouchModel.setSupMerchantNo(Integer.parseInt(supMerchantNo));
......
...@@ -85,7 +85,7 @@ public class JavaNodeTestApplication { ...@@ -85,7 +85,7 @@ public class JavaNodeTestApplication {
customerInfo.setCustomerPhone("13476670746"); customerInfo.setCustomerPhone("13476670746");
customerInfo.setFollowStaffPhone("13476670746"); customerInfo.setFollowStaffPhone("13476670746");
customerInfo.setSopJourneyStage("潜客"); customerInfo.setSopJourneyStage("潜客");
customerInfo.setSopJourneyStageEnterTime(DateUtils.parse("2024-01-04")); customerInfo.setSopJourneyStageEnterTime(DateUtils.parse("2024-01-07"));
resultData.put("user2", Arrays.asList(customerInfo)); resultData.put("user2", Arrays.asList(customerInfo));
SopStruct sopStruct = sopService.loadSop("xblc7"); SopStruct sopStruct = sopService.loadSop("xblc7");
SopInstNode sopInstNode = sopStruct.getInstNodeMap().get(3); SopInstNode sopInstNode = sopStruct.getInstNodeMap().get(3);
...@@ -260,6 +260,7 @@ public class JavaNodeTestApplication { ...@@ -260,6 +260,7 @@ public class JavaNodeTestApplication {
String ControllerSendMessageDemo = JavaFileToString.getString( String ControllerSendMessageDemo = JavaFileToString.getString(
"F:\\360MoveData\\Users\\11\\Desktop\\企微SAAS\\2023\\12\\sop\\process\\platform-process-server\\platform-process\\src\\main\\java\\cn\\com\\glsx\\process\\modules\\sop\\java\\example\\ControllerSendMessageDemo.java", "F:\\360MoveData\\Users\\11\\Desktop\\企微SAAS\\2023\\12\\sop\\process\\platform-process-server\\platform-process\\src\\main\\java\\cn\\com\\glsx\\process\\modules\\sop\\java\\example\\ControllerSendMessageDemo.java",
"ControllerSendMessageDemo"); "ControllerSendMessageDemo");
System.out.println(ControllerSendMessageDemo);
SopTplNodeProto sopTplNodeProto=new SopTplNodeProto(); SopTplNodeProto sopTplNodeProto=new SopTplNodeProto();
sopTplNodeProto.setId(7); sopTplNodeProto.setId(7);
sopTplNodeProto.setNodeContentDef(ControllerSendMessageDemo); sopTplNodeProto.setNodeContentDef(ControllerSendMessageDemo);
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!