|
@@ -13,6 +13,7 @@ import com.zanxiang.game.module.manage.pojo.params.KfWebSocketMsgParam;
|
|
|
import com.zanxiang.game.module.manage.service.*;
|
|
|
import com.zanxiang.game.module.mybatis.entity.*;
|
|
|
import com.zanxiang.game.module.mybatis.mapper.KfRoomMapper;
|
|
|
+import com.zanxiang.module.util.JsonUtil;
|
|
|
import com.zanxiang.module.util.bean.BeanUtil;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
@@ -161,7 +162,7 @@ public class KfRoomServiceImpl extends ServiceImpl<KfRoomMapper, KfRoom> impleme
|
|
|
.last("limit 1"));
|
|
|
if (kfRoomMsg != null) {
|
|
|
if (Objects.equals(kfRoomMsg.getMsgType(), KfRoomMsgTypeEnum.KF_MSG_TYPE_TEXT.getValue())) {
|
|
|
- KfWebSocketMsgDTO.MsgContentBean msgContent = BeanUtil.copy(kfRoomMsg.getContent(), KfWebSocketMsgDTO.MsgContentBean.class);
|
|
|
+ KfWebSocketMsgDTO.MsgContentBean msgContent = JsonUtil.toObj(kfRoomMsg.getContent(), KfWebSocketMsgDTO.MsgContentBean.class);
|
|
|
roomBean.setLastMsg(msgContent.getText());
|
|
|
}
|
|
|
if (Objects.equals(kfRoomMsg.getMsgType(), KfRoomMsgTypeEnum.KF_MSG_TYPE_IMAGE.getValue())) {
|