|
@@ -2,11 +2,14 @@ package com.ym.service.Impl;
|
|
|
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
import com.ym.dao.HereWhiteDao;
|
|
|
+import com.ym.mec.biz.dal.dao.SysConfigDao;
|
|
|
import com.ym.mec.common.exception.BizException;
|
|
|
import com.ym.mec.util.http.HttpUtil;
|
|
|
import com.ym.pojo.HereWhite;
|
|
|
import com.ym.service.HereWhiteService;
|
|
|
import com.ym.service.RoomService;
|
|
|
+import org.apache.commons.lang3.RandomStringUtils;
|
|
|
+import org.apache.commons.lang3.StringUtils;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.beans.factory.annotation.Value;
|
|
|
import org.springframework.stereotype.Service;
|
|
@@ -28,6 +31,8 @@ public class HereWhiteServiceImpl implements HereWhiteService {
|
|
|
private HereWhiteDao hereWhiteDao;
|
|
|
@Autowired
|
|
|
private RoomService roomService;
|
|
|
+ @Autowired
|
|
|
+ private SysConfigDao sysConfigDao;
|
|
|
|
|
|
@Override
|
|
|
@Transactional(rollbackFor = Exception.class)
|
|
@@ -57,6 +62,10 @@ public class HereWhiteServiceImpl implements HereWhiteService {
|
|
|
hereWhite.setRoomToken(jsonObject.getJSONObject("msg").getString("roomToken"));
|
|
|
hereWhite.setUpdatedAt(date);
|
|
|
hereWhite.setCreatedAt(date);
|
|
|
+ String flag = sysConfigDao.findConfigValue("rongyun_here_white_flag");
|
|
|
+ if(StringUtils.equals("1",flag)){
|
|
|
+ hereWhite.setRandomNumeric(RandomStringUtils.randomNumeric(22));
|
|
|
+ }
|
|
|
hereWhiteDao.save(hereWhite);
|
|
|
}
|
|
|
return hereWhite;
|