瀏覽代碼

网络教室

zouxuan 3 年之前
父節點
當前提交
d0c1030077

+ 4 - 4
cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/dao/RongyunHereWhiteDao.java → cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/dao/ImNetworkHereWhiteDao.java

@@ -1,7 +1,7 @@
 package com.yonge.cooleshow.biz.dal.dao;
 
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import com.yonge.cooleshow.biz.dal.entity.ImNetWorkHereWhite;
+import com.yonge.cooleshow.biz.dal.entity.ImNetworkHereWhite;
 import org.apache.ibatis.annotations.Param;
 
 /**
@@ -10,10 +10,10 @@ import org.apache.ibatis.annotations.Param;
  * @author zx
  * @since 2022-06-13 18:16:23
  */
-public interface RongyunHereWhiteDao extends BaseMapper<ImNetWorkHereWhite> {
+public interface ImNetworkHereWhiteDao extends BaseMapper<ImNetworkHereWhite> {
 
-    ImNetWorkHereWhite findByCourseScheduleIdLock(@Param("courseScheduleId") Long courseScheduleId);
+    ImNetworkHereWhite findByCourseScheduleIdLock(@Param("courseScheduleId") Long courseScheduleId);
 
-    ImNetWorkHereWhite findByCourseScheduleId(@Param("courseScheduleId") Long courseScheduleId);
+    ImNetworkHereWhite findByCourseScheduleId(@Param("courseScheduleId") Long courseScheduleId);
 }
 

+ 1 - 1
cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/entity/ImNetWorkHereWhite.java → cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/entity/ImNetworkHereWhite.java

@@ -17,7 +17,7 @@ import java.util.Date;
  * @since 2022-06-13 18:16:23
  */
 @ApiModel(value = "im_network_here_white")
-public class ImNetWorkHereWhite implements Serializable {
+public class ImNetworkHereWhite implements Serializable {
     @TableId(value = "id_", type = IdType.AUTO)
     @ApiModelProperty(value = "白板id,")
     private Integer id;

+ 19 - 0
cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/service/ImNetworkHereWhiteService.java

@@ -0,0 +1,19 @@
+package com.yonge.cooleshow.biz.dal.service;
+
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.yonge.cooleshow.biz.dal.dao.ImNetworkHereWhiteDao;
+import com.yonge.cooleshow.biz.dal.entity.ImNetworkHereWhite;
+
+/**
+ * (RongyunHereWhite)表服务接口
+ *
+ * @author zx
+ * @since 2022-06-13 18:16:24
+ */
+public interface ImNetworkHereWhiteService extends IService<ImNetworkHereWhite> {
+
+    ImNetworkHereWhiteDao getDao();
+
+    ImNetworkHereWhite create(String name, Integer userNum, Long courseScheduleId) throws Exception;
+}
+

+ 0 - 19
cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/service/RongyunHereWhiteService.java

@@ -1,19 +0,0 @@
-package com.yonge.cooleshow.biz.dal.service;
-
-import com.baomidou.mybatisplus.extension.service.IService;
-import com.yonge.cooleshow.biz.dal.dao.RongyunHereWhiteDao;
-import com.yonge.cooleshow.biz.dal.entity.ImNetWorkHereWhite;
-
-/**
- * (RongyunHereWhite)表服务接口
- *
- * @author zx
- * @since 2022-06-13 18:16:24
- */
-public interface RongyunHereWhiteService extends IService<ImNetWorkHereWhite> {
-
-    RongyunHereWhiteDao getDao();
-
-    ImNetWorkHereWhite create(String name, Integer userNum, Long courseScheduleId) throws Exception;
-}
-

+ 24 - 24
cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/service/impl/RongyunHereWhiteServiceImpl.java → cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/service/impl/ImNetworkHereWhiteServiceImpl.java

@@ -2,9 +2,9 @@ package com.yonge.cooleshow.biz.dal.service.impl;
 
 import com.alibaba.fastjson.JSONObject;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import com.yonge.cooleshow.biz.dal.dao.RongyunHereWhiteDao;
-import com.yonge.cooleshow.biz.dal.entity.ImNetWorkHereWhite;
-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.utils.http.HttpUtil;
 import org.slf4j.Logger;
@@ -24,9 +24,9 @@ import java.util.Map;
  * @since 2022-06-13 18:16:24
  */
 @Service("rongyunHereWhiteService")
-public class RongyunHereWhiteServiceImpl extends ServiceImpl<RongyunHereWhiteDao, ImNetWorkHereWhite> 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}")
     private String hereWhiteUrl;
@@ -34,13 +34,13 @@ public class RongyunHereWhiteServiceImpl extends ServiceImpl<RongyunHereWhiteDao
     private String hereWhiteToken;
 
     @Override
-    public RongyunHereWhiteDao getDao() {
+    public ImNetworkHereWhiteDao getDao() {
         return this.baseMapper;
     }
 
     @Override
     @Transactional(rollbackFor = Exception.class)
-    public ImNetWorkHereWhite create(String name, Integer userNum, Long courseScheduleId) throws Exception {
+    public ImNetworkHereWhite create(String name, Integer userNum, Long courseScheduleId) throws Exception {
         log.error("create HereWhite name:{},userNum:{},courseScheduleId:{}",name,userNum,courseScheduleId);
         JSONObject json = new JSONObject();
         json.put("name",name);
@@ -49,26 +49,26 @@ public class RongyunHereWhiteServiceImpl extends ServiceImpl<RongyunHereWhiteDao
         String url = "/room?token=" + hereWhiteToken;
         JSONObject jsonObject = JSONObject.parseObject(requestParam(json, url));
         if(jsonObject.getString("code").equals("200")){
-            ImNetWorkHereWhite imNetWorkHereWhite = this.getDao().findByCourseScheduleIdLock(courseScheduleId);
-            if(imNetWorkHereWhite == null){
+            ImNetworkHereWhite imNetworkHereWhite = this.getDao().findByCourseScheduleIdLock(courseScheduleId);
+            if(imNetworkHereWhite == null){
                 JSONObject room = jsonObject.getJSONObject("msg").getJSONObject("room");
-                imNetWorkHereWhite = new ImNetWorkHereWhite();
+                imNetworkHereWhite = new ImNetworkHereWhite();
                 Date date = new Date();
-                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);
+                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 imNetWorkHereWhite;
+            return imNetworkHereWhite;
         }else {
             throw new BizException(jsonObject.getString("msg"));
         }

+ 2 - 2
cooleshow-user/user-biz/src/main/resources/config/mybatis/RongyunHereWhiteMapper.xml → cooleshow-user/user-biz/src/main/resources/config/mybatis/ImNetworkHereWhiteDao.xml

@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-<mapper namespace="com.yonge.cooleshow.biz.dal.dao.RongyunHereWhiteDao">
-    <resultMap id="BaseResultMap" type="com.yonge.cooleshow.biz.dal.entity.ImNetWorkHereWhite">
+<mapper namespace="com.yonge.cooleshow.biz.dal.dao.ImNetworkHereWhiteDao">
+    <resultMap id="BaseResultMap" type="com.yonge.cooleshow.biz.dal.entity.ImNetworkHereWhite">
         <id column="id_" jdbcType="INTEGER" property="id"/>
         <result column="course_schedule_id_" jdbcType="INTEGER" property="courseScheduleId"/>
         <result column="name_" jdbcType="VARCHAR" property="name"/>

+ 4 - 4
cooleshow-user/user-classroom/src/main/java/com/yonge/cooleshow/classroom/controller/HereWhiteController.java

@@ -1,8 +1,8 @@
 package com.yonge.cooleshow.classroom.controller;
 
 import com.yonge.cooleshow.biz.dal.dto.HereWhiteDto;
-import com.yonge.cooleshow.biz.dal.entity.ImNetWorkHereWhite;
-import com.yonge.cooleshow.biz.dal.service.RongyunHereWhiteService;
+import com.yonge.cooleshow.biz.dal.entity.ImNetworkHereWhite;
+import com.yonge.cooleshow.biz.dal.service.ImNetworkHereWhiteService;
 import com.yonge.cooleshow.common.controller.BaseController;
 import com.yonge.cooleshow.common.entity.HttpResponseResult;
 import io.swagger.annotations.ApiOperation;
@@ -17,11 +17,11 @@ import org.springframework.web.bind.annotation.RestController;
 public class HereWhiteController extends BaseController {
 
     @Autowired
-    private RongyunHereWhiteService hereWhiteService;
+    private ImNetworkHereWhiteService hereWhiteService;
 
     @ApiOperation("创建白板,默认全部采用零时白板")
     @PostMapping(value = "create")
-    public HttpResponseResult<ImNetWorkHereWhite> userAdd(@RequestBody HereWhiteDto hereWhiteDto) throws Exception {
+    public HttpResponseResult<ImNetworkHereWhite> userAdd(@RequestBody HereWhiteDto hereWhiteDto) throws Exception {
         return succeed(hereWhiteService.create(hereWhiteDto.getName(), hereWhiteDto.getUserNum(),hereWhiteDto.getCourseScheduleId()));
     }
 }