diff --git a/inspur-service/inspur-admin/pom.xml b/inspur-service/inspur-admin/pom.xml index 81b820a..9e5f11b 100644 --- a/inspur-service/inspur-admin/pom.xml +++ b/inspur-service/inspur-admin/pom.xml @@ -78,6 +78,12 @@ 3.8.7 compile + + com.inspur + inspur-operations + 3.8.7 + compile + diff --git a/inspur-service/inspur-admin/src/main/java/com/inspur/web/controller/operations/CourseOnlineInfoController.java b/inspur-service/inspur-admin/src/main/java/com/inspur/web/controller/operations/CourseOnlineInfoController.java new file mode 100644 index 0000000..3f8e31d --- /dev/null +++ b/inspur-service/inspur-admin/src/main/java/com/inspur/web/controller/operations/CourseOnlineInfoController.java @@ -0,0 +1,115 @@ +package com.inspur.web.controller.operations; + +import java.util.List; +import javax.servlet.http.HttpServletResponse; + +import com.inspur.operations.domain.CourseOnlineInfo; +import com.inspur.operations.service.ICourseOnlineInfoService; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.PutMapping; +import org.springframework.web.bind.annotation.DeleteMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; +import com.inspur.common.annotation.Log; +import com.inspur.common.core.controller.BaseController; +import com.inspur.common.core.domain.AjaxResult; +import com.inspur.common.enums.BusinessType; +import com.inspur.common.utils.poi.ExcelUtil; +import com.inspur.common.core.page.TableDataInfo; + +/** + * 在线课程信息Controller + * + * @author inspur + * @date 2024-04-26 + */ +@RestController +@RequestMapping("/operations/courseOnline") +public class CourseOnlineInfoController extends BaseController +{ + @Autowired + private ICourseOnlineInfoService courseOnlineInfoService; + + /** + * 查询在线课程信息列表 + */ + @PreAuthorize("@ss.hasPermi('operations:courseOnline:list')") + @GetMapping("/list") + public TableDataInfo list(CourseOnlineInfo courseOnlineInfo) + { + startPage(); + List list = courseOnlineInfoService.selectCourseOnlineInfoList(courseOnlineInfo); + return getDataTable(list); + } + + /** + * 导出在线课程信息列表 + */ + @PreAuthorize("@ss.hasPermi('operations:courseOnline:export')") + @Log(title = "在线课程信息", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(HttpServletResponse response, CourseOnlineInfo courseOnlineInfo) + { + List list = courseOnlineInfoService.selectCourseOnlineInfoList(courseOnlineInfo); + ExcelUtil util = new ExcelUtil(CourseOnlineInfo.class); + util.exportExcel(response, list, "在线课程信息数据"); + } + + /** + * 获取在线课程信息详细信息 + */ + @PreAuthorize("@ss.hasPermi('operations:courseOnline:query')") + @GetMapping(value = "/{classId}") + public AjaxResult getInfo(@PathVariable("classId") String classId) + { + return success(courseOnlineInfoService.selectCourseOnlineInfoByClassId(classId)); + } + + /** + * 新增在线课程信息 + */ + @PreAuthorize("@ss.hasPermi('operations:courseOnline:add')") + @Log(title = "在线课程信息", businessType = BusinessType.INSERT) + @PostMapping + public AjaxResult add(@RequestBody CourseOnlineInfo courseOnlineInfo) + { + return toAjax(courseOnlineInfoService.insertCourseOnlineInfo(courseOnlineInfo)); + } + + /** + * 修改在线课程信息 + */ + @PreAuthorize("@ss.hasPermi('operations:courseOnline:edit')") + @Log(title = "在线课程信息", businessType = BusinessType.UPDATE) + @PutMapping + public AjaxResult edit(@RequestBody CourseOnlineInfo courseOnlineInfo) + { + return toAjax(courseOnlineInfoService.updateCourseOnlineInfo(courseOnlineInfo)); + } + + /** + * 删除在线课程信息 + */ + @PreAuthorize("@ss.hasPermi('operations:courseOnline:remove')") + @Log(title = "在线课程信息", businessType = BusinessType.DELETE) + @DeleteMapping("/{classIds}") + public AjaxResult remove(@PathVariable String[] classIds) + { + return toAjax(courseOnlineInfoService.deleteCourseOnlineInfoByClassIds(classIds)); + } + + /** + * 修改在线课程信息状态 + */ + @PreAuthorize("@ss.hasPermi('operations:courseOnline:changeStatus')") + @Log(title = "在线课程信息修改状态", businessType = BusinessType.OTHER) + @PostMapping("/changeStatus") + public AjaxResult changeStatus(@RequestBody CourseOnlineInfo courseOnlineInfo){ + return toAjax(courseOnlineInfoService.updateCourseOnlineInfo(courseOnlineInfo)); + } +} diff --git a/inspur-service/inspur-operations/pom.xml b/inspur-service/inspur-operations/pom.xml new file mode 100644 index 0000000..9e261a7 --- /dev/null +++ b/inspur-service/inspur-operations/pom.xml @@ -0,0 +1,36 @@ + + + 4.0.0 + + com.inspur + inspur + 3.8.7 + + + inspur-operations + + + 8 + 8 + UTF-8 + + + + + com.inspur + inspur-common + + + org.projectlombok + lombok + + + cn.hutool + hutool-all + 5.0.7 + + + + \ No newline at end of file diff --git a/inspur-service/inspur-operations/src/main/java/com/inspur/operations/domain/CourseOnlineInfo.java b/inspur-service/inspur-operations/src/main/java/com/inspur/operations/domain/CourseOnlineInfo.java new file mode 100644 index 0000000..4e10120 --- /dev/null +++ b/inspur-service/inspur-operations/src/main/java/com/inspur/operations/domain/CourseOnlineInfo.java @@ -0,0 +1,85 @@ +package com.inspur.operations.domain; + +import java.util.Date; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.inspur.common.annotation.Excel; +import com.inspur.common.core.domain.BaseEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; +import org.springframework.format.annotation.DateTimeFormat; + +/** + * 在线课程信息对象 course_online_info + * + * @author inspur + * @date 2024-04-26 + */ +@EqualsAndHashCode(callSuper = true) +@Data +public class CourseOnlineInfo extends BaseEntity { + private static final long serialVersionUID = 1L; + + /** + * 主键 + */ + private String classId; + + /** + * 课程名称 + */ + @Excel(name = "课程名称") + private String className; + + /** + * 课程类型 + */ + @Excel(name = "课程类型") + private String classType; + + /** + * 课程讲师 + */ + @Excel(name = "课程讲师") + private String classLecturer; + + /** + * 课程参与者 + */ + @Excel(name = "课程参与者") + private String classParticipant; + + /** + * 课程描述 + */ + @Excel(name = "课程描述") + private String classDescription; + + /** + * 课程开始时间 + */ + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") + @Excel(name = "课程开始时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss") + private Date classStartTime; + + /** + * 课程结束时间 + */ + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") + @Excel(name = "课程结束时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss") + private Date classEndTime; + + /** + * 参加方式 + */ + @Excel(name = "参加方式") + private String classJoinMethod; + + /** + * 状态:0 未启用,1 已启用 + */ + @Excel(name = "状态",dictType = "sys_normal_disable") + private String status; +} diff --git a/inspur-service/inspur-operations/src/main/java/com/inspur/operations/mapper/CourseOnlineInfoMapper.java b/inspur-service/inspur-operations/src/main/java/com/inspur/operations/mapper/CourseOnlineInfoMapper.java new file mode 100644 index 0000000..a7151ea --- /dev/null +++ b/inspur-service/inspur-operations/src/main/java/com/inspur/operations/mapper/CourseOnlineInfoMapper.java @@ -0,0 +1,61 @@ +package com.inspur.operations.mapper; + +import java.util.List; +import com.inspur.operations.domain.CourseOnlineInfo; + +/** + * 在线课程信息Mapper接口 + * + * @author inspur + * @date 2024-04-26 + */ +public interface CourseOnlineInfoMapper +{ + /** + * 查询在线课程信息 + * + * @param classId 在线课程信息主键 + * @return 在线课程信息 + */ + public CourseOnlineInfo selectCourseOnlineInfoByClassId(String classId); + + /** + * 查询在线课程信息列表 + * + * @param courseOnlineInfo 在线课程信息 + * @return 在线课程信息集合 + */ + public List selectCourseOnlineInfoList(CourseOnlineInfo courseOnlineInfo); + + /** + * 新增在线课程信息 + * + * @param courseOnlineInfo 在线课程信息 + * @return 结果 + */ + public int insertCourseOnlineInfo(CourseOnlineInfo courseOnlineInfo); + + /** + * 修改在线课程信息 + * + * @param courseOnlineInfo 在线课程信息 + * @return 结果 + */ + public int updateCourseOnlineInfo(CourseOnlineInfo courseOnlineInfo); + + /** + * 删除在线课程信息 + * + * @param classId 在线课程信息主键 + * @return 结果 + */ + public int deleteCourseOnlineInfoByClassId(String classId); + + /** + * 批量删除在线课程信息 + * + * @param classIds 需要删除的数据主键集合 + * @return 结果 + */ + public int deleteCourseOnlineInfoByClassIds(String[] classIds); +} diff --git a/inspur-service/inspur-operations/src/main/java/com/inspur/operations/service/ICourseOnlineInfoService.java b/inspur-service/inspur-operations/src/main/java/com/inspur/operations/service/ICourseOnlineInfoService.java new file mode 100644 index 0000000..bec12da --- /dev/null +++ b/inspur-service/inspur-operations/src/main/java/com/inspur/operations/service/ICourseOnlineInfoService.java @@ -0,0 +1,61 @@ +package com.inspur.operations.service; + +import java.util.List; +import com.inspur.operations.domain.CourseOnlineInfo; + +/** + * 在线课程信息Service接口 + * + * @author inspur + * @date 2024-04-26 + */ +public interface ICourseOnlineInfoService +{ + /** + * 查询在线课程信息 + * + * @param classId 在线课程信息主键 + * @return 在线课程信息 + */ + public CourseOnlineInfo selectCourseOnlineInfoByClassId(String classId); + + /** + * 查询在线课程信息列表 + * + * @param courseOnlineInfo 在线课程信息 + * @return 在线课程信息集合 + */ + public List selectCourseOnlineInfoList(CourseOnlineInfo courseOnlineInfo); + + /** + * 新增在线课程信息 + * + * @param courseOnlineInfo 在线课程信息 + * @return 结果 + */ + public int insertCourseOnlineInfo(CourseOnlineInfo courseOnlineInfo); + + /** + * 修改在线课程信息 + * + * @param courseOnlineInfo 在线课程信息 + * @return 结果 + */ + public int updateCourseOnlineInfo(CourseOnlineInfo courseOnlineInfo); + + /** + * 批量删除在线课程信息 + * + * @param classIds 需要删除的在线课程信息主键集合 + * @return 结果 + */ + public int deleteCourseOnlineInfoByClassIds(String[] classIds); + + /** + * 删除在线课程信息信息 + * + * @param classId 在线课程信息主键 + * @return 结果 + */ + public int deleteCourseOnlineInfoByClassId(String classId); +} diff --git a/inspur-service/inspur-operations/src/main/java/com/inspur/operations/service/impl/CourseOnlineInfoServiceImpl.java b/inspur-service/inspur-operations/src/main/java/com/inspur/operations/service/impl/CourseOnlineInfoServiceImpl.java new file mode 100644 index 0000000..f84bf73 --- /dev/null +++ b/inspur-service/inspur-operations/src/main/java/com/inspur/operations/service/impl/CourseOnlineInfoServiceImpl.java @@ -0,0 +1,98 @@ +package com.inspur.operations.service.impl; + +import java.util.List; +import com.inspur.common.utils.DateUtils; +import com.inspur.common.utils.uuid.IdUtils; +import com.inspur.operations.domain.CourseOnlineInfo; +import com.inspur.operations.mapper.CourseOnlineInfoMapper; +import com.inspur.operations.service.ICourseOnlineInfoService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +/** + * 在线课程信息Service业务层处理 + * + * @author inspur + * @date 2024-04-26 + */ +@Service +public class CourseOnlineInfoServiceImpl implements ICourseOnlineInfoService +{ + @Autowired + private CourseOnlineInfoMapper courseOnlineInfoMapper; + + /** + * 查询在线课程信息 + * + * @param classId 在线课程信息主键 + * @return 在线课程信息 + */ + @Override + public CourseOnlineInfo selectCourseOnlineInfoByClassId(String classId) + { + return courseOnlineInfoMapper.selectCourseOnlineInfoByClassId(classId); + } + + /** + * 查询在线课程信息列表 + * + * @param courseOnlineInfo 在线课程信息 + * @return 在线课程信息 + */ + @Override + public List selectCourseOnlineInfoList(CourseOnlineInfo courseOnlineInfo) + { + return courseOnlineInfoMapper.selectCourseOnlineInfoList(courseOnlineInfo); + } + + /** + * 新增在线课程信息 + * + * @param courseOnlineInfo 在线课程信息 + * @return 结果 + */ + @Override + public int insertCourseOnlineInfo(CourseOnlineInfo courseOnlineInfo) + { + courseOnlineInfo.setCreateTime(DateUtils.getNowDate()); + courseOnlineInfo.setClassId(IdUtils.fastSimpleUUID()); + return courseOnlineInfoMapper.insertCourseOnlineInfo(courseOnlineInfo); + } + + /** + * 修改在线课程信息 + * + * @param courseOnlineInfo 在线课程信息 + * @return 结果 + */ + @Override + public int updateCourseOnlineInfo(CourseOnlineInfo courseOnlineInfo) + { + courseOnlineInfo.setUpdateTime(DateUtils.getNowDate()); + return courseOnlineInfoMapper.updateCourseOnlineInfo(courseOnlineInfo); + } + + /** + * 批量删除在线课程信息 + * + * @param classIds 需要删除的在线课程信息主键 + * @return 结果 + */ + @Override + public int deleteCourseOnlineInfoByClassIds(String[] classIds) + { + return courseOnlineInfoMapper.deleteCourseOnlineInfoByClassIds(classIds); + } + + /** + * 删除在线课程信息信息 + * + * @param classId 在线课程信息主键 + * @return 结果 + */ + @Override + public int deleteCourseOnlineInfoByClassId(String classId) + { + return courseOnlineInfoMapper.deleteCourseOnlineInfoByClassId(classId); + } +} diff --git a/inspur-service/inspur-operations/src/main/resources/mapper/CourseOnlineInfoMapper.xml b/inspur-service/inspur-operations/src/main/resources/mapper/CourseOnlineInfoMapper.xml new file mode 100644 index 0000000..38951e3 --- /dev/null +++ b/inspur-service/inspur-operations/src/main/resources/mapper/CourseOnlineInfoMapper.xml @@ -0,0 +1,109 @@ + + + + + + + + + + + + + + + + + + + + + + + select class_id, class_name, class_type, class_lecturer, class_participant, class_description, class_start_time, class_end_time, class_join_method, status, create_by, create_time, update_by, update_time from course_online_info + + + + + + + + insert into course_online_info + + class_id, + class_name, + class_type, + class_lecturer, + class_participant, + class_description, + class_start_time, + class_end_time, + class_join_method, + status, + create_by, + create_time, + update_by, + update_time, + + + #{classId}, + #{className}, + #{classType}, + #{classLecturer}, + #{classParticipant}, + #{classDescription}, + #{classStartTime}, + #{classEndTime}, + #{classJoinMethod}, + #{status}, + #{createBy}, + #{createTime}, + #{updateBy}, + #{updateTime}, + + + + + update course_online_info + + class_name = #{className}, + class_type = #{classType}, + class_lecturer = #{classLecturer}, + class_participant = #{classParticipant}, + class_description = #{classDescription}, + class_start_time = #{classStartTime}, + class_end_time = #{classEndTime}, + class_join_method = #{classJoinMethod}, + status = #{status}, + create_by = #{createBy}, + create_time = #{createTime}, + update_by = #{updateBy}, + update_time = #{updateTime}, + + where class_id = #{classId} + + + + delete from course_online_info where class_id = #{classId} + + + + delete from course_online_info where class_id in + + #{classId} + + + \ No newline at end of file diff --git a/inspur-service/pom.xml b/inspur-service/pom.xml index dfb4dc7..f4dc1bf 100644 --- a/inspur-service/pom.xml +++ b/inspur-service/pom.xml @@ -187,6 +187,7 @@ inspur-om inspur-order inspur-knowledgeBase + inspur-operations pom diff --git a/inspur-ui/src/api/operations/courseOnline.js b/inspur-ui/src/api/operations/courseOnline.js new file mode 100644 index 0000000..caf04ae --- /dev/null +++ b/inspur-ui/src/api/operations/courseOnline.js @@ -0,0 +1,53 @@ +import request from '@/utils/request' + +// 查询在线课程信息列表 +export function listCourseOnline(query) { + return request({ + url: '/operations/courseOnline/list', + method: 'get', + params: query + }) +} + +// 查询在线课程信息详细 +export function getCourseOnline(classId) { + return request({ + url: '/operations/courseOnline/' + classId, + method: 'get' + }) +} + +// 新增在线课程信息 +export function addCourseOnline(data) { + return request({ + url: '/operations/courseOnline', + method: 'post', + data: data + }) +} + +// 修改在线课程信息 +export function updateCourseOnline(data) { + return request({ + url: '/operations/courseOnline', + method: 'put', + data: data + }) +} + +// 删除在线课程信息 +export function delCourseOnline(classId) { + return request({ + url: '/operations/courseOnline/' + classId, + method: 'delete' + }) +} + +// 修改在线课程信息状态 +export function changeStatus(data) { + return request({ + url: '/operations/courseOnline/changeStatus', + method: 'post', + data: data + }) +} diff --git a/inspur-ui/src/views/operations/courseOnline/index.vue b/inspur-ui/src/views/operations/courseOnline/index.vue new file mode 100644 index 0000000..772c89b --- /dev/null +++ b/inspur-ui/src/views/operations/courseOnline/index.vue @@ -0,0 +1,396 @@ + + +