diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/manager/TdMeetingManager.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/manager/TdMeetingManager.java new file mode 100644 index 0000000..17a8f6f --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/manager/TdMeetingManager.java @@ -0,0 +1,58 @@ +package com.ruoyi.web.controller.manager; + +import cn.hutool.core.convert.Convert; +import com.ruoyi.common.utils.ShiroUtils; +import com.ruoyi.common.utils.StringUtils; +import com.ruoyi.system.domain.TdMeeting; +import com.ruoyi.system.service.TdMeetingService; +import org.springframework.stereotype.Component; + +import javax.annotation.Resource; +import java.util.Arrays; +import java.util.Date; +import java.util.List; + +/** + * packageName com.ruoyi.web.controller.manager + * + * @author wangxy + * @version JDK 8 + * @className TdMeetingManager + * @date 2024/8/6 + * @description 会议 + */ +@Component +public class TdMeetingManager { + + @Resource + private TdMeetingService meetingService; + + + public List selectTdMeetingList(TdMeeting tdMeeting) { + return meetingService.selectTdMeetingList(tdMeeting); + } + + + public boolean saveOrUpdate(TdMeeting tdMeeting) { + if (StringUtils.isNotBlank(tdMeeting.getId())) { + tdMeeting.setUpdateBy(ShiroUtils.getSysUser().getLoginName()); + tdMeeting.setUpdateTime(new Date()); + } else { + tdMeeting.setCreateBy(ShiroUtils.getSysUser().getLoginName()); + tdMeeting.setCreateTime(new Date()); + } + return meetingService.saveOrUpdate(tdMeeting); + } + + + public TdMeeting selectTdMeeting(String id) { + return meetingService.getById(id); + } + + public boolean deleteTdMeetingByids(String ids) { + List list = Arrays.asList(Convert.toStrArray(ids)); + return meetingService.removeByIds(list); + } + + +} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/meet/TdMeetingController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/meet/TdMeetingController.java new file mode 100644 index 0000000..dd77099 --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/meet/TdMeetingController.java @@ -0,0 +1,110 @@ +package com.ruoyi.web.controller.system.meet; + +import com.ruoyi.common.annotation.Log; +import com.ruoyi.common.core.controller.BaseController; +import com.ruoyi.common.core.domain.AjaxResult; +import com.ruoyi.common.core.page.TableDataInfo; +import com.ruoyi.common.enums.BusinessType; +import com.ruoyi.system.domain.TdMeeting; +import com.ruoyi.web.controller.manager.TdMeetingManager; +import org.apache.shiro.authz.annotation.RequiresPermissions; +import org.springframework.stereotype.Controller; +import org.springframework.ui.ModelMap; +import org.springframework.web.bind.annotation.*; + +import javax.annotation.Resource; +import java.util.List; + +/** + * packageName com.ruoyi.web.controller.system.meet + * + * @author wangxy + * @version JDK 8 + * @className TdMeetingController + * @date 2024/8/6 + * @description 会议管理 + */ +@Controller +@RequestMapping("/system/tdmeeting") +public class TdMeetingController extends BaseController { + + + private String prefix = "system/tdmeeting"; + + @Resource + private TdMeetingManager meetingManager; + + + @RequiresPermissions("system:tdmeeting:view") + @GetMapping() + public String tdmeeting() { + return prefix + "/tdmeeting"; + } + + /** + * 会议列表 + */ + @RequiresPermissions("system:tdmeeting:list") + @PostMapping("/list") + @ResponseBody + public TableDataInfo list(TdMeeting tdMeeting) { + startPage(); + List tdMeetings = meetingManager.selectTdMeetingList(tdMeeting); + return getDataTable(tdMeetings); + } + + + /** + * 新增会议 + */ + @GetMapping("/add") + public String add() { + return prefix + "/add"; + } + + /** + * 新增会议 + */ + @RequiresPermissions("system:tdmeeting:add") + @Log(title = "涉密会议", businessType = BusinessType.INSERT) + @PostMapping("/add") + @ResponseBody + public AjaxResult addSave(TdMeeting tdMeeting) { + return toAjax(meetingManager.saveOrUpdate(tdMeeting)); + } + + /** + * 修改会议 + */ + @RequiresPermissions("system:tdmeeting:edit") + @GetMapping("/edit/{id}") + public String edit(@PathVariable("id") String id, ModelMap mmap) { + TdMeeting meeting = meetingManager.selectTdMeeting(id); + mmap.put("meeting", meeting); + return prefix + "/edit"; + } + + /** + * 修改会议 + */ + @RequiresPermissions("system:tdmeeting:edit") + @Log(title = "涉密会议", businessType = BusinessType.UPDATE) + @PostMapping("/edit") + @ResponseBody + public AjaxResult editSave(TdMeeting tdMeeting) { + return toAjax(meetingManager.saveOrUpdate(tdMeeting)); + } + + /** + * 删除会议 + */ + @RequiresPermissions("system:tdmeeting:remove") + @Log(title = "涉密会议", businessType = BusinessType.DELETE) + @PostMapping("/remove") + @ResponseBody + public AjaxResult remove(String ids) { + return toAjax(meetingManager.deleteTdMeetingByids(ids)); + } + + +} diff --git a/ruoyi-admin/src/main/resources/templates/system/tdmeeting/tdmeeting.html b/ruoyi-admin/src/main/resources/templates/system/tdmeeting/tdmeeting.html new file mode 100644 index 0000000..9cacba8 --- /dev/null +++ b/ruoyi-admin/src/main/resources/templates/system/tdmeeting/tdmeeting.html @@ -0,0 +1,286 @@ + + + + + + +
+
+
+
+
+
    +
  • + + +
  • +
  • + + +
  • +
  • + + +
  • + +
  • + + +
  • +
  • +  搜索 +  重置 +
  • +
+
+
+
+ + +
+
+
+
+
+ + + + diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/domain/TdMeeting.java b/ruoyi-system/src/main/java/com/ruoyi/system/domain/TdMeeting.java index a14a81d..44a7081 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/domain/TdMeeting.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/domain/TdMeeting.java @@ -2,8 +2,9 @@ package com.ruoyi.system.domain; import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.TableId; -import java.io.Serializable; import java.util.Date; + +import com.ruoyi.common.core.domain.BaseEntity; import lombok.Data; import lombok.EqualsAndHashCode; import lombok.experimental.Accessors; @@ -16,7 +17,7 @@ import lombok.experimental.Accessors; @Data @EqualsAndHashCode(callSuper = false) @Accessors(chain = true) -public class TdMeeting implements Serializable { +public class TdMeeting extends BaseEntity { /** * id */ @@ -73,11 +74,6 @@ public class TdMeeting implements Serializable { */ private String fileId; - /** - * 备注 - */ - private String remarks; - /** * 文件名称 */ diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/mapper/TdMeetingMapper.java b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/TdMeetingMapper.java index 6134b60..58a127f 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/mapper/TdMeetingMapper.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/TdMeetingMapper.java @@ -2,6 +2,9 @@ package com.ruoyi.system.mapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.ruoyi.system.domain.TdMeeting; +import org.apache.ibatis.annotations.Mapper; + +import java.util.List; /** * @author 13560 @@ -9,8 +12,12 @@ import com.ruoyi.system.domain.TdMeeting; * @createDate 2024-08-06 09:30:17 * @Entity generator.domain.TdMeeting */ +@Mapper public interface TdMeetingMapper extends BaseMapper { + + public List selectTdMeetingList(TdMeeting tdMeeting); + } diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/TdMeetingService.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/TdMeetingService.java index 8c9d12a..38e23ac 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/service/TdMeetingService.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/service/TdMeetingService.java @@ -3,6 +3,8 @@ package com.ruoyi.system.service; import com.baomidou.mybatisplus.extension.service.IService; import com.ruoyi.system.domain.TdMeeting; +import java.util.List; + /** * @author 13560 * @description 针对表【td_meeting】的数据库操作Service @@ -10,4 +12,7 @@ import com.ruoyi.system.domain.TdMeeting; */ public interface TdMeetingService extends IService { + + public List selectTdMeetingList(TdMeeting tdMeeting); + } diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/TdMeetingServiceImpl.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/TdMeetingServiceImpl.java index eb0d346..57a7968 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/TdMeetingServiceImpl.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/TdMeetingServiceImpl.java @@ -6,6 +6,9 @@ import com.ruoyi.system.mapper.TdMeetingMapper; import com.ruoyi.system.service.TdMeetingService; import org.springframework.stereotype.Service; +import javax.annotation.Resource; +import java.util.List; + /** * @author 13560 * @description 针对表【td_meeting】的数据库操作Service实现 @@ -15,6 +18,13 @@ import org.springframework.stereotype.Service; public class TdMeetingServiceImpl extends ServiceImpl implements TdMeetingService { + @Resource + private TdMeetingMapper meetingMapper; + + @Override + public List selectTdMeetingList(TdMeeting tdMeeting) { + return meetingMapper.selectTdMeetingList(tdMeeting); + } } diff --git a/ruoyi-system/src/main/resources/mapper/system/TdMeetingMapper.xml b/ruoyi-system/src/main/resources/mapper/system/TdMeetingMapper.xml index a4b6e89..00e8d56 100644 --- a/ruoyi-system/src/main/resources/mapper/system/TdMeetingMapper.xml +++ b/ruoyi-system/src/main/resources/mapper/system/TdMeetingMapper.xml @@ -16,15 +16,34 @@ - + + + + + id,meeting_title,meeting_time, meeting_address,meeting_usernum,meeting_host, meeting_type,meeting_state,agenda, - summary,file_id,remarks, - file_name + summary,file_id, + file_name,create_by, create_time, update_by, update_time, remark +