|
@@ -4,6 +4,7 @@ import com.alibaba.fastjson.JSONObject;
|
|
|
import com.fjhx.message.MessageNotice;
|
|
|
import com.fjhx.message.enums.MsgSourceEnum;
|
|
|
import com.fjhx.rocketmq.Message;
|
|
|
+import com.fjhx.rocketmq.message.service.StockMessageService;
|
|
|
import com.fjhx.rocketmq.service.RocketMqService;
|
|
|
import org.apache.commons.collections4.CollectionUtils;
|
|
|
import org.apache.rocketmq.client.producer.SendCallback;
|
|
@@ -31,6 +32,9 @@ public class RocketMqServiceImpl implements RocketMqService {
|
|
|
|
|
|
@Autowired
|
|
|
private IUserClient iUserClient;
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ private StockMessageService stockMessageService;
|
|
|
|
|
|
* 普通消息
|
|
|
* @param msg
|
|
@@ -100,10 +104,11 @@ public class RocketMqServiceImpl implements RocketMqService {
|
|
|
notice.setContent(content);
|
|
|
notice.setMsgType(msgType);
|
|
|
notice.setUserId(userId);
|
|
|
- notice.setCreateTime(new Date());
|
|
|
+ notice.setCreatedTime(new Date());
|
|
|
notices.add(notice);
|
|
|
}
|
|
|
|
|
|
+ stockMessageService.saveBatch(notices);
|
|
|
try {
|
|
|
|
|
|
|