|  | @@ -2,9 +2,9 @@ package com.yonge.cooleshow.biz.dal.service.impl;
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  |  import com.alibaba.fastjson.JSONObject;
 |  |  import com.alibaba.fastjson.JSONObject;
 | 
											
												
													
														|  |  import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 |  |  import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 | 
											
												
													
														|  | -import com.yonge.cooleshow.biz.dal.dao.RongyunHereWhiteDao;
 |  | 
 | 
											
												
													
														|  | -import com.yonge.cooleshow.biz.dal.entity.HereWhite;
 |  | 
 | 
											
												
													
														|  | -import com.yonge.cooleshow.biz.dal.service.RongyunHereWhiteService;
 |  | 
 | 
											
												
													
														|  | 
 |  | +import com.yonge.cooleshow.biz.dal.dao.ImNetworkHereWhiteDao;
 | 
											
												
													
														|  | 
 |  | +import com.yonge.cooleshow.biz.dal.entity.ImNetworkHereWhite;
 | 
											
												
													
														|  | 
 |  | +import com.yonge.cooleshow.biz.dal.service.ImNetworkHereWhiteService;
 | 
											
												
													
														|  |  import com.yonge.toolset.base.exception.BizException;
 |  |  import com.yonge.toolset.base.exception.BizException;
 | 
											
												
													
														|  |  import com.yonge.toolset.utils.http.HttpUtil;
 |  |  import com.yonge.toolset.utils.http.HttpUtil;
 | 
											
												
													
														|  |  import org.slf4j.Logger;
 |  |  import org.slf4j.Logger;
 | 
											
										
											
												
													
														|  | @@ -24,9 +24,9 @@ import java.util.Map;
 | 
											
												
													
														|  |   * @since 2022-06-13 18:16:24
 |  |   * @since 2022-06-13 18:16:24
 | 
											
												
													
														|  |   */
 |  |   */
 | 
											
												
													
														|  |  @Service("rongyunHereWhiteService")
 |  |  @Service("rongyunHereWhiteService")
 | 
											
												
													
														|  | -public class RongyunHereWhiteServiceImpl extends ServiceImpl<RongyunHereWhiteDao, HereWhite> implements RongyunHereWhiteService {
 |  | 
 | 
											
												
													
														|  | 
 |  | +public class ImNetworkHereWhiteServiceImpl extends ServiceImpl<ImNetworkHereWhiteDao, ImNetworkHereWhite> implements ImNetworkHereWhiteService {
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  | -    private final static Logger log = LoggerFactory.getLogger(RongyunHereWhiteServiceImpl.class);
 |  | 
 | 
											
												
													
														|  | 
 |  | +    private final static Logger log = LoggerFactory.getLogger(ImNetworkHereWhiteServiceImpl.class);
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  |      @Value("${cn.rongcloud.hereWhite.url}")
 |  |      @Value("${cn.rongcloud.hereWhite.url}")
 | 
											
												
													
														|  |      private String hereWhiteUrl;
 |  |      private String hereWhiteUrl;
 | 
											
										
											
												
													
														|  | @@ -34,13 +34,13 @@ public class RongyunHereWhiteServiceImpl extends ServiceImpl<RongyunHereWhiteDao
 | 
											
												
													
														|  |      private String hereWhiteToken;
 |  |      private String hereWhiteToken;
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  |      @Override
 |  |      @Override
 | 
											
												
													
														|  | -    public RongyunHereWhiteDao getDao() {
 |  | 
 | 
											
												
													
														|  | 
 |  | +    public ImNetworkHereWhiteDao getDao() {
 | 
											
												
													
														|  |          return this.baseMapper;
 |  |          return this.baseMapper;
 | 
											
												
													
														|  |      }
 |  |      }
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  |      @Override
 |  |      @Override
 | 
											
												
													
														|  |      @Transactional(rollbackFor = Exception.class)
 |  |      @Transactional(rollbackFor = Exception.class)
 | 
											
												
													
														|  | -    public HereWhite create(String name, Integer userNum, Integer courseScheduleId) throws Exception {
 |  | 
 | 
											
												
													
														|  | 
 |  | +    public ImNetworkHereWhite create(String name, Integer userNum, Long courseScheduleId) throws Exception {
 | 
											
												
													
														|  |          log.error("create HereWhite name:{},userNum:{},courseScheduleId:{}",name,userNum,courseScheduleId);
 |  |          log.error("create HereWhite name:{},userNum:{},courseScheduleId:{}",name,userNum,courseScheduleId);
 | 
											
												
													
														|  |          JSONObject json = new JSONObject();
 |  |          JSONObject json = new JSONObject();
 | 
											
												
													
														|  |          json.put("name",name);
 |  |          json.put("name",name);
 | 
											
										
											
												
													
														|  | @@ -49,26 +49,26 @@ public class RongyunHereWhiteServiceImpl extends ServiceImpl<RongyunHereWhiteDao
 | 
											
												
													
														|  |          String url = "/room?token=" + hereWhiteToken;
 |  |          String url = "/room?token=" + hereWhiteToken;
 | 
											
												
													
														|  |          JSONObject jsonObject = JSONObject.parseObject(requestParam(json, url));
 |  |          JSONObject jsonObject = JSONObject.parseObject(requestParam(json, url));
 | 
											
												
													
														|  |          if(jsonObject.getString("code").equals("200")){
 |  |          if(jsonObject.getString("code").equals("200")){
 | 
											
												
													
														|  | -            HereWhite hereWhite = this.getDao().findByCourseScheduleIdLock(courseScheduleId);
 |  | 
 | 
											
												
													
														|  | -            if(hereWhite == null){
 |  | 
 | 
											
												
													
														|  | 
 |  | +            ImNetworkHereWhite imNetworkHereWhite = this.getDao().findByCourseScheduleIdLock(courseScheduleId);
 | 
											
												
													
														|  | 
 |  | +            if(imNetworkHereWhite == null){
 | 
											
												
													
														|  |                  JSONObject room = jsonObject.getJSONObject("msg").getJSONObject("room");
 |  |                  JSONObject room = jsonObject.getJSONObject("msg").getJSONObject("room");
 | 
											
												
													
														|  | -                hereWhite = new HereWhite();
 |  | 
 | 
											
												
													
														|  | 
 |  | +                imNetworkHereWhite = new ImNetworkHereWhite();
 | 
											
												
													
														|  |                  Date date = new Date();
 |  |                  Date date = new Date();
 | 
											
												
													
														|  | -                hereWhite.setCourseScheduleId(courseScheduleId);
 |  | 
 | 
											
												
													
														|  | -                hereWhite.setName(room.getString("name"));
 |  | 
 | 
											
												
													
														|  | -                hereWhite.setLimit(room.getInteger("limit"));
 |  | 
 | 
											
												
													
														|  | -                hereWhite.setTeamId(room.getInteger("teamId"));
 |  | 
 | 
											
												
													
														|  | -                hereWhite.setAdminId(room.getInteger("adminId"));
 |  | 
 | 
											
												
													
														|  | -                hereWhite.setMode(room.getString("mode"));
 |  | 
 | 
											
												
													
														|  | -                hereWhite.setTemplate(room.getString("template"));
 |  | 
 | 
											
												
													
														|  | -                hereWhite.setRegion(room.getString("region"));
 |  | 
 | 
											
												
													
														|  | -                hereWhite.setUuid(room.getString("uuid"));
 |  | 
 | 
											
												
													
														|  | -                hereWhite.setRoomToken(jsonObject.getJSONObject("msg").getString("roomToken"));
 |  | 
 | 
											
												
													
														|  | -                hereWhite.setUpdatedAt(date);
 |  | 
 | 
											
												
													
														|  | -                hereWhite.setCreatedAt(date);
 |  | 
 | 
											
												
													
														|  | -                baseMapper.insert(hereWhite);
 |  | 
 | 
											
												
													
														|  | 
 |  | +                imNetworkHereWhite.setCourseScheduleId(courseScheduleId);
 | 
											
												
													
														|  | 
 |  | +                imNetworkHereWhite.setName(room.getString("name"));
 | 
											
												
													
														|  | 
 |  | +                imNetworkHereWhite.setLimit(room.getInteger("limit"));
 | 
											
												
													
														|  | 
 |  | +                imNetworkHereWhite.setTeamId(room.getInteger("teamId"));
 | 
											
												
													
														|  | 
 |  | +                imNetworkHereWhite.setAdminId(room.getInteger("adminId"));
 | 
											
												
													
														|  | 
 |  | +                imNetworkHereWhite.setMode(room.getString("mode"));
 | 
											
												
													
														|  | 
 |  | +                imNetworkHereWhite.setTemplate(room.getString("template"));
 | 
											
												
													
														|  | 
 |  | +                imNetworkHereWhite.setRegion(room.getString("region"));
 | 
											
												
													
														|  | 
 |  | +                imNetworkHereWhite.setUuid(room.getString("uuid"));
 | 
											
												
													
														|  | 
 |  | +                imNetworkHereWhite.setRoomToken(jsonObject.getJSONObject("msg").getString("roomToken"));
 | 
											
												
													
														|  | 
 |  | +                imNetworkHereWhite.setUpdatedAt(date);
 | 
											
												
													
														|  | 
 |  | +                imNetworkHereWhite.setCreatedAt(date);
 | 
											
												
													
														|  | 
 |  | +                baseMapper.insert(imNetworkHereWhite);
 | 
											
												
													
														|  |              }
 |  |              }
 | 
											
												
													
														|  | -            return hereWhite;
 |  | 
 | 
											
												
													
														|  | 
 |  | +            return imNetworkHereWhite;
 | 
											
												
													
														|  |          }else {
 |  |          }else {
 | 
											
												
													
														|  |              throw new BizException(jsonObject.getString("msg"));
 |  |              throw new BizException(jsonObject.getString("msg"));
 | 
											
												
													
														|  |          }
 |  |          }
 |