1
This commit is contained in:
@@ -9,7 +9,6 @@ import com.alibaba.fastjson2.JSONObject;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import org.apache.rocketmq.spring.core.RocketMQTemplate;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
@@ -17,6 +16,7 @@ import org.springframework.core.env.Environment;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
@@ -103,6 +103,8 @@ public class WXUtil {
|
||||
List<String> strings = splitStringByLength(content, 3072);
|
||||
int count = 1;
|
||||
for (String string : strings) {
|
||||
// 因为引入了消息队列,所以在每条消息都加上时间戳 格式化成 yyyy-MM-dd HH:mm:ss
|
||||
string = "[" + DateUtil.format(new Date(), "yyyy-MM-dd HH:mm:ss") + "] \r" + string;
|
||||
if (strings.size() > 1) {
|
||||
string = "---长消息---第:" + count + "条 " + "\r" + string;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user