Commit 058a597e by 阮思源

修改截取

parent 6e6ebce5
...@@ -645,10 +645,11 @@ public class BookKeywordBizImpl implements BookKeywordBiz { ...@@ -645,10 +645,11 @@ public class BookKeywordBizImpl implements BookKeywordBiz {
if (i == 1 || i == 2) { if (i == 1 || i == 2) {
text = text + "🔥"; text = text + "🔥";
} }
String content = text + i + "." + bookGroupServe.getServeName() + bookGroupServe.getShortUrl() + "\n"; String toAdd = i + "." + bookGroupServe.getServeName() + bookGroupServe.getShortUrl() + "\n";
String content = text + toAdd;
if (content.length() > LE) { if (content.length() > LE) {
sendText(sendTextDTO, text); sendText(sendTextDTO, text);
text = ""; text = toAdd;
} else { } else {
text = content; text = content;
} }
...@@ -662,10 +663,11 @@ public class BookKeywordBizImpl implements BookKeywordBiz { ...@@ -662,10 +663,11 @@ public class BookKeywordBizImpl implements BookKeywordBiz {
//获取社群码下的分类 //获取社群码下的分类
List<ListClassifyVO> listClassifyVOS = bookGroupClassifyBiz.listAllClassify(bookGroupId); List<ListClassifyVO> listClassifyVOS = bookGroupClassifyBiz.listAllClassify(bookGroupId);
if (!ListUtils.isEmpty(listClassifyVOS)) { if (!ListUtils.isEmpty(listClassifyVOS)) {
String content = text + "======================\n"; String toAdd = "======================\n";
String content = text + toAdd;
if (content.length() > LE) { if (content.length() > LE) {
sendText(sendTextDTO, text); sendText(sendTextDTO, text);
text = ""; text = toAdd;
} else { } else {
text = content; text = content;
} }
...@@ -673,22 +675,31 @@ public class BookKeywordBizImpl implements BookKeywordBiz { ...@@ -673,22 +675,31 @@ public class BookKeywordBizImpl implements BookKeywordBiz {
ListClassifyVO listClassifyVO = listClassifyVOS.get(0); ListClassifyVO listClassifyVO = listClassifyVOS.get(0);
//如果只有一个分类 //如果只有一个分类
//发送欢迎语 //发送欢迎语
String contents = text + "☕本书还配有交流群“" + listClassifyVO.getClassify() + "”," + listClassifyVO.getClassifyIntroduce() + ",点击下方邀请链接,即可进群"; String toAdds = "☕本书还配有交流群“" + listClassifyVO.getClassify() + "”," + listClassifyVO.getClassifyIntroduce() + ",点击下方邀请链接,即可进群";
String contents = text + toAdds;
if (contents.length() > LE) { if (contents.length() > LE) {
sendText(sendTextDTO, text); sendText(sendTextDTO, text);
text = ""; text = toAdds;
} else { } else {
text = contents; text = contents;
} }
sendText(sendTextDTO, text); sendText(sendTextDTO, text);
dealGroupInvite(sendTextDTO, listClassifyVO.getId(), listClassifyVO.getChangeNumber()); dealGroupInvite(sendTextDTO, listClassifyVO.getId(), listClassifyVO.getChangeNumber());
} else { } else {
text = text + "☕本书还配有以下交流群,选择你想加入的微信群,回复群名称,我会拉你入群!\n"; String toAdds = "☕本书还配有以下交流群,选择你想加入的微信群,回复群名称,我会拉你入群!\n";
String inContents = text + toAdds;
if (inContents.length() > LE) {
sendText(sendTextDTO, text);
text = toAdds;
} else {
text = inContents;
}
for (ListClassifyVO listClassifyVO : listClassifyVOS) { for (ListClassifyVO listClassifyVO : listClassifyVOS) {
String contents = text + "☑" + listClassifyVO.getClassify() + ":" + listClassifyVO.getClassifyIntroduce() + "\n"; String toAddIn = "☑" + listClassifyVO.getClassify() + ":" + listClassifyVO.getClassifyIntroduce() + "\n";
String contents = text + toAddIn;
if (contents.length() > LE) { if (contents.length() > LE) {
sendText(sendTextDTO, text); sendText(sendTextDTO, text);
text = ""; text = toAddIn;
} else { } else {
text = contents; text = contents;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment