From 8c6c12027736264704f4827b942aa34f66608aa3 Mon Sep 17 00:00:00 2001
From: cgx <2606784146@qq.com>
Date: Thu, 13 Feb 2025 17:11:09 +0800
Subject: [PATCH] =?UTF-8?q?=E5=85=AC=E5=91=8A=E6=8E=A5=E5=8F=A3?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
admin-hanhai-vue/src/views/notice/TbNoticeList.vue | 177 +++++++++++++++++++++
.../src/views/notice/modules/TbNoticeForm.vue | 114 +++++++++++++
.../notice/modules/TbNoticeModal.Style#Drawer.vue | 84 ++++++++++
.../src/views/notice/modules/TbNoticeModal.vue | 60 +++++++
.../java/org/jeecg/config/shiro/ShiroConfig.java | 2 +
.../tbNotice/controller/TbNoticeController.java | 156 ++++++++++++++++++
.../jeecg/modules/tbNotice/entity/TbNotice.java | 65 ++++++++
.../modules/tbNotice/mapper/TbNoticeMapper.java | 14 ++
.../modules/tbNotice/mapper/xml/TbNoticeMapper.xml | 5 +
.../modules/tbNotice/service/ITbNoticeService.java | 14 ++
.../tbNotice/service/impl/TbNoticeServiceImpl.java | 19 +++
.../jeecg/modules/tbNotice/vue/TbNoticeList.vue | 177 +++++++++++++++++++++
.../modules/tbNotice/vue/modules/TbNoticeForm.vue | 109 +++++++++++++
.../vue/modules/TbNoticeModal.Style#Drawer.vue | 84 ++++++++++
.../modules/tbNotice/vue/modules/TbNoticeModal.vue | 60 +++++++
.../jeecg/modules/tbNotice/vue3/TbNotice.api.ts | 61 +++++++
.../jeecg/modules/tbNotice/vue3/TbNotice.data.ts | 33 ++++
.../jeecg/modules/tbNotice/vue3/TbNoticeList.vue | 162 +++++++++++++++++++
.../tbNotice/vue3/components/TbNoticeModal.vue | 58 +++++++
.../userCode/controller/IndexController.java | 21 +++
.../service/impl/AppletLoginServiceImpl.java | 14 +-
21 files changed, 1476 insertions(+), 13 deletions(-)
create mode 100644 admin-hanhai-vue/src/views/notice/TbNoticeList.vue
create mode 100644 admin-hanhai-vue/src/views/notice/modules/TbNoticeForm.vue
create mode 100644 admin-hanhai-vue/src/views/notice/modules/TbNoticeModal.Style#Drawer.vue
create mode 100644 admin-hanhai-vue/src/views/notice/modules/TbNoticeModal.vue
create mode 100644 jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/tbNotice/controller/TbNoticeController.java
create mode 100644 jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/tbNotice/entity/TbNotice.java
create mode 100644 jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/tbNotice/mapper/TbNoticeMapper.java
create mode 100644 jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/tbNotice/mapper/xml/TbNoticeMapper.xml
create mode 100644 jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/tbNotice/service/ITbNoticeService.java
create mode 100644 jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/tbNotice/service/impl/TbNoticeServiceImpl.java
create mode 100644 jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/tbNotice/vue/TbNoticeList.vue
create mode 100644 jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/tbNotice/vue/modules/TbNoticeForm.vue
create mode 100644 jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/tbNotice/vue/modules/TbNoticeModal.Style#Drawer.vue
create mode 100644 jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/tbNotice/vue/modules/TbNoticeModal.vue
create mode 100644 jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/tbNotice/vue3/TbNotice.api.ts
create mode 100644 jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/tbNotice/vue3/TbNotice.data.ts
create mode 100644 jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/tbNotice/vue3/TbNoticeList.vue
create mode 100644 jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/tbNotice/vue3/components/TbNoticeModal.vue
diff --git a/admin-hanhai-vue/src/views/notice/TbNoticeList.vue b/admin-hanhai-vue/src/views/notice/TbNoticeList.vue
new file mode 100644
index 0000000..440000a
--- /dev/null
+++ b/admin-hanhai-vue/src/views/notice/TbNoticeList.vue
@@ -0,0 +1,177 @@
+
+
+
+
+
+
+
+
+
新增
+
导出
+
+ 导入
+
+
+
+
+
+ 删除
+
+ 批量操作
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 无图片
+
+
+
+ 无文件
+
+ 下载
+
+
+
+
+ 编辑
+
+
+
+ 更多
+
+
+ 详情
+
+
+ handleDelete(record.id)">
+ 删除
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/admin-hanhai-vue/src/views/notice/modules/TbNoticeForm.vue b/admin-hanhai-vue/src/views/notice/modules/TbNoticeForm.vue
new file mode 100644
index 0000000..fb81859
--- /dev/null
+++ b/admin-hanhai-vue/src/views/notice/modules/TbNoticeForm.vue
@@ -0,0 +1,114 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/admin-hanhai-vue/src/views/notice/modules/TbNoticeModal.Style#Drawer.vue b/admin-hanhai-vue/src/views/notice/modules/TbNoticeModal.Style#Drawer.vue
new file mode 100644
index 0000000..a7c395c
--- /dev/null
+++ b/admin-hanhai-vue/src/views/notice/modules/TbNoticeModal.Style#Drawer.vue
@@ -0,0 +1,84 @@
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/admin-hanhai-vue/src/views/notice/modules/TbNoticeModal.vue b/admin-hanhai-vue/src/views/notice/modules/TbNoticeModal.vue
new file mode 100644
index 0000000..e43fdfc
--- /dev/null
+++ b/admin-hanhai-vue/src/views/notice/modules/TbNoticeModal.vue
@@ -0,0 +1,60 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/config/shiro/ShiroConfig.java b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/config/shiro/ShiroConfig.java
index 66a5a96..a5896e7 100644
--- a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/config/shiro/ShiroConfig.java
+++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/config/shiro/ShiroConfig.java
@@ -81,6 +81,8 @@ public class ShiroConfig {
filterChainDefinitionMap.put("/index/taskList", "anon");
filterChainDefinitionMap.put("/index/picList", "anon");
+ filterChainDefinitionMap.put("/index/noticeList", "anon");
+ filterChainDefinitionMap.put("/index/getNotice", "anon");
filterChainDefinitionMap.put("/user/login", "anon");
filterChainDefinitionMap.put("/user/bindPhone", "anon");
diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/tbNotice/controller/TbNoticeController.java b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/tbNotice/controller/TbNoticeController.java
new file mode 100644
index 0000000..27817f0
--- /dev/null
+++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/tbNotice/controller/TbNoticeController.java
@@ -0,0 +1,156 @@
+package org.jeecg.modules.tbNotice.controller;
+
+import java.util.Arrays;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import org.jeecg.common.api.vo.Result;
+import org.jeecg.common.system.query.QueryGenerator;
+import org.jeecg.modules.tbNotice.entity.TbNotice;
+import org.jeecg.modules.tbNotice.service.ITbNoticeService;
+
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import lombok.extern.slf4j.Slf4j;
+
+import org.jeecg.common.system.base.controller.JeecgController;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+import org.springframework.web.servlet.ModelAndView;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import org.jeecg.common.aspect.annotation.AutoLog;
+
+ /**
+ * @Description: 公告表
+ * @Author: jeecg-boot
+ * @Date: 2025-02-13
+ * @Version: V1.0
+ */
+@Api(tags="公告表")
+@RestController
+@RequestMapping("/tbNotice/tbNotice")
+@Slf4j
+public class TbNoticeController extends JeecgController {
+ @Autowired
+ private ITbNoticeService tbNoticeService;
+
+ /**
+ * 分页列表查询
+ *
+ * @param tbNotice
+ * @param pageNo
+ * @param pageSize
+ * @param req
+ * @return
+ */
+ //@AutoLog(value = "公告表-分页列表查询")
+ @ApiOperation(value="公告表-分页列表查询", notes="公告表-分页列表查询")
+ @GetMapping(value = "/list")
+ public Result> queryPageList(TbNotice tbNotice,
+ @RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
+ @RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
+ HttpServletRequest req) {
+ QueryWrapper queryWrapper = QueryGenerator.initQueryWrapper(tbNotice, req.getParameterMap());
+ Page page = new Page(pageNo, pageSize);
+ IPage pageList = tbNoticeService.page(page, queryWrapper);
+ return Result.OK(pageList);
+ }
+
+ /**
+ * 添加
+ *
+ * @param tbNotice
+ * @return
+ */
+ @AutoLog(value = "公告表-添加")
+ @ApiOperation(value="公告表-添加", notes="公告表-添加")
+ @PostMapping(value = "/add")
+ public Result add(@RequestBody TbNotice tbNotice) {
+ tbNoticeService.save(tbNotice);
+ return Result.OK("添加成功!");
+ }
+
+ /**
+ * 编辑
+ *
+ * @param tbNotice
+ * @return
+ */
+ @AutoLog(value = "公告表-编辑")
+ @ApiOperation(value="公告表-编辑", notes="公告表-编辑")
+ @RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST})
+ public Result edit(@RequestBody TbNotice tbNotice) {
+ tbNoticeService.updateById(tbNotice);
+ return Result.OK("编辑成功!");
+ }
+
+ /**
+ * 通过id删除
+ *
+ * @param id
+ * @return
+ */
+ @AutoLog(value = "公告表-通过id删除")
+ @ApiOperation(value="公告表-通过id删除", notes="公告表-通过id删除")
+ @DeleteMapping(value = "/delete")
+ public Result delete(@RequestParam(name="id",required=true) String id) {
+ tbNoticeService.removeById(id);
+ return Result.OK("删除成功!");
+ }
+
+ /**
+ * 批量删除
+ *
+ * @param ids
+ * @return
+ */
+ @AutoLog(value = "公告表-批量删除")
+ @ApiOperation(value="公告表-批量删除", notes="公告表-批量删除")
+ @DeleteMapping(value = "/deleteBatch")
+ public Result deleteBatch(@RequestParam(name="ids",required=true) String ids) {
+ this.tbNoticeService.removeByIds(Arrays.asList(ids.split(",")));
+ return Result.OK("批量删除成功!");
+ }
+
+ /**
+ * 通过id查询
+ *
+ * @param id
+ * @return
+ */
+ //@AutoLog(value = "公告表-通过id查询")
+ @ApiOperation(value="公告表-通过id查询", notes="公告表-通过id查询")
+ @GetMapping(value = "/queryById")
+ public Result queryById(@RequestParam(name="id",required=true) String id) {
+ TbNotice tbNotice = tbNoticeService.getById(id);
+ if(tbNotice==null) {
+ return Result.error("未找到对应数据");
+ }
+ return Result.OK(tbNotice);
+ }
+
+ /**
+ * 导出excel
+ *
+ * @param request
+ * @param tbNotice
+ */
+ @RequestMapping(value = "/exportXls")
+ public ModelAndView exportXls(HttpServletRequest request, TbNotice tbNotice) {
+ return super.exportXls(request, tbNotice, TbNotice.class, "公告表");
+ }
+
+ /**
+ * 通过excel导入数据
+ *
+ * @param request
+ * @param response
+ * @return
+ */
+ @RequestMapping(value = "/importExcel", method = RequestMethod.POST)
+ public Result> importExcel(HttpServletRequest request, HttpServletResponse response) {
+ return super.importExcel(request, response, TbNotice.class);
+ }
+
+}
diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/tbNotice/entity/TbNotice.java b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/tbNotice/entity/TbNotice.java
new file mode 100644
index 0000000..d0534ae
--- /dev/null
+++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/tbNotice/entity/TbNotice.java
@@ -0,0 +1,65 @@
+package org.jeecg.modules.tbNotice.entity;
+
+import java.io.Serializable;
+import java.io.UnsupportedEncodingException;
+import java.util.Date;
+import java.math.BigDecimal;
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import lombok.Data;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import org.springframework.format.annotation.DateTimeFormat;
+import org.jeecgframework.poi.excel.annotation.Excel;
+import org.jeecg.common.aspect.annotation.Dict;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.EqualsAndHashCode;
+import lombok.experimental.Accessors;
+
+/**
+ * @Description: 公告表
+ * @Author: jeecg-boot
+ * @Date: 2025-02-13
+ * @Version: V1.0
+ */
+@Data
+@TableName("tb_notice")
+@Accessors(chain = true)
+@EqualsAndHashCode(callSuper = false)
+@ApiModel(value="tb_notice对象", description="公告表")
+public class TbNotice implements Serializable {
+ private static final long serialVersionUID = 1L;
+
+ /**主键*/
+ @TableId(type = IdType.ASSIGN_ID)
+ @ApiModelProperty(value = "主键")
+ private java.lang.String id;
+ /**创建人*/
+ @ApiModelProperty(value = "创建人")
+ private java.lang.String createBy;
+ /**创建日期*/
+ @ApiModelProperty(value = "创建日期")
+ private java.util.Date createTime;
+ /**更新人*/
+ @ApiModelProperty(value = "更新人")
+ private java.lang.String updateBy;
+ /**更新日期*/
+ @ApiModelProperty(value = "更新日期")
+ private java.util.Date updateTime;
+ /**所属部门*/
+ @ApiModelProperty(value = "所属部门")
+ private java.lang.String sysOrgCode;
+ /**标题*/
+ @Excel(name = "标题", width = 15)
+ @ApiModelProperty(value = "标题")
+ private java.lang.String title;
+ /**内容*/
+ @Excel(name = "内容", width = 15)
+ @ApiModelProperty(value = "内容")
+ private java.lang.String content;
+ /**排序*/
+ @Excel(name = "排序", width = 15)
+ @ApiModelProperty(value = "排序")
+ private java.lang.Integer sort;
+}
diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/tbNotice/mapper/TbNoticeMapper.java b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/tbNotice/mapper/TbNoticeMapper.java
new file mode 100644
index 0000000..906875a
--- /dev/null
+++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/tbNotice/mapper/TbNoticeMapper.java
@@ -0,0 +1,14 @@
+package org.jeecg.modules.tbNotice.mapper;
+
+import org.jeecg.modules.tbNotice.entity.TbNotice;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+
+/**
+ * @Description: 公告表
+ * @Author: jeecg-boot
+ * @Date: 2025-02-13
+ * @Version: V1.0
+ */
+public interface TbNoticeMapper extends BaseMapper {
+
+}
diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/tbNotice/mapper/xml/TbNoticeMapper.xml b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/tbNotice/mapper/xml/TbNoticeMapper.xml
new file mode 100644
index 0000000..e693112
--- /dev/null
+++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/tbNotice/mapper/xml/TbNoticeMapper.xml
@@ -0,0 +1,5 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/tbNotice/service/ITbNoticeService.java b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/tbNotice/service/ITbNoticeService.java
new file mode 100644
index 0000000..c473c2d
--- /dev/null
+++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/tbNotice/service/ITbNoticeService.java
@@ -0,0 +1,14 @@
+package org.jeecg.modules.tbNotice.service;
+
+import org.jeecg.modules.tbNotice.entity.TbNotice;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+/**
+ * @Description: 公告表
+ * @Author: jeecg-boot
+ * @Date: 2025-02-13
+ * @Version: V1.0
+ */
+public interface ITbNoticeService extends IService {
+
+}
diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/tbNotice/service/impl/TbNoticeServiceImpl.java b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/tbNotice/service/impl/TbNoticeServiceImpl.java
new file mode 100644
index 0000000..94d02d2
--- /dev/null
+++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/tbNotice/service/impl/TbNoticeServiceImpl.java
@@ -0,0 +1,19 @@
+package org.jeecg.modules.tbNotice.service.impl;
+
+import org.jeecg.modules.tbNotice.entity.TbNotice;
+import org.jeecg.modules.tbNotice.mapper.TbNoticeMapper;
+import org.jeecg.modules.tbNotice.service.ITbNoticeService;
+import org.springframework.stereotype.Service;
+
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+
+/**
+ * @Description: 公告表
+ * @Author: jeecg-boot
+ * @Date: 2025-02-13
+ * @Version: V1.0
+ */
+@Service
+public class TbNoticeServiceImpl extends ServiceImpl implements ITbNoticeService {
+
+}
diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/tbNotice/vue/TbNoticeList.vue b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/tbNotice/vue/TbNoticeList.vue
new file mode 100644
index 0000000..440000a
--- /dev/null
+++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/tbNotice/vue/TbNoticeList.vue
@@ -0,0 +1,177 @@
+
+
+
+
+
+
+
+
+
新增
+
导出
+
+ 导入
+
+
+
+
+
+ 删除
+
+ 批量操作
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 无图片
+
+
+
+ 无文件
+
+ 下载
+
+
+
+
+ 编辑
+
+
+
+ 更多
+
+
+ 详情
+
+
+ handleDelete(record.id)">
+ 删除
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/tbNotice/vue/modules/TbNoticeForm.vue b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/tbNotice/vue/modules/TbNoticeForm.vue
new file mode 100644
index 0000000..579ef87
--- /dev/null
+++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/tbNotice/vue/modules/TbNoticeForm.vue
@@ -0,0 +1,109 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/tbNotice/vue/modules/TbNoticeModal.Style#Drawer.vue b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/tbNotice/vue/modules/TbNoticeModal.Style#Drawer.vue
new file mode 100644
index 0000000..a7c395c
--- /dev/null
+++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/tbNotice/vue/modules/TbNoticeModal.Style#Drawer.vue
@@ -0,0 +1,84 @@
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/tbNotice/vue/modules/TbNoticeModal.vue b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/tbNotice/vue/modules/TbNoticeModal.vue
new file mode 100644
index 0000000..e43fdfc
--- /dev/null
+++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/tbNotice/vue/modules/TbNoticeModal.vue
@@ -0,0 +1,60 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/tbNotice/vue3/TbNotice.api.ts b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/tbNotice/vue3/TbNotice.api.ts
new file mode 100644
index 0000000..728bf9e
--- /dev/null
+++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/tbNotice/vue3/TbNotice.api.ts
@@ -0,0 +1,61 @@
+import {defHttp} from '/@/utils/http/axios';
+import {Modal} from 'ant-design-vue';
+
+enum Api {
+ list = '/tbNotice/tbNotice/list',
+ save='/tbNotice/tbNotice/add',
+ edit='/tbNotice/tbNotice/edit',
+ deleteOne = '/tbNotice/tbNotice/delete',
+ deleteBatch = '/tbNotice/tbNotice/deleteBatch',
+ importExcel = '/tbNotice/tbNotice/importExcel',
+ exportXls = '/tbNotice/tbNotice/exportXls',
+}
+/**
+ * 导出api
+ * @param params
+ */
+export const getExportUrl = Api.exportXls;
+/**
+ * 导入api
+ */
+export const getImportUrl = Api.importExcel;
+/**
+ * 列表接口
+ * @param params
+ */
+export const list = (params) =>
+ defHttp.get({url: Api.list, params});
+
+/**
+ * 删除单个
+ */
+export const deleteOne = (params,handleSuccess) => {
+ return defHttp.delete({url: Api.deleteOne, params}, {joinParamsToUrl: true}).then(() => {
+ handleSuccess();
+ });
+}
+/**
+ * 批量删除
+ * @param params
+ */
+export const batchDelete = (params, handleSuccess) => {
+ Modal.confirm({
+ title: '确认删除',
+ content: '是否删除选中数据',
+ okText: '确认',
+ cancelText: '取消',
+ onOk: () => {
+ return defHttp.delete({url: Api.deleteBatch, data: params}, {joinParamsToUrl: true}).then(() => {
+ handleSuccess();
+ });
+ }
+ });
+}
+/**
+ * 保存或者更新
+ * @param params
+ */
+export const saveOrUpdate = (params, isUpdate) => {
+ let url = isUpdate ? Api.edit : Api.save;
+ return defHttp.post({url: url, params});
+}
diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/tbNotice/vue3/TbNotice.data.ts b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/tbNotice/vue3/TbNotice.data.ts
new file mode 100644
index 0000000..50b1e94
--- /dev/null
+++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/tbNotice/vue3/TbNotice.data.ts
@@ -0,0 +1,33 @@
+import {BasicColumn} from '/@/components/Table';
+import {FormSchema} from '/@/components/Table';
+import { rules} from '/@/utils/helper/validator';
+import { render } from '/@/utils/common/renderUtils';
+//列表数据
+export const columns: BasicColumn[] = [
+ {
+ title: '标题',
+ align:"center",
+ dataIndex: 'title'
+ },
+ {
+ title: '排序',
+ align:"center",
+ dataIndex: 'sort'
+ },
+];
+//查询数据
+export const searchFormSchema: FormSchema[] = [
+];
+//表单数据
+export const formSchema: FormSchema[] = [
+ {
+ label: '标题',
+ field: 'title',
+ component: 'Input',
+ },
+ {
+ label: '排序',
+ field: 'sort',
+ component: 'InputNumber',
+ },
+];
diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/tbNotice/vue3/TbNoticeList.vue b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/tbNotice/vue3/TbNoticeList.vue
new file mode 100644
index 0000000..b881581
--- /dev/null
+++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/tbNotice/vue3/TbNoticeList.vue
@@ -0,0 +1,162 @@
+
+
+
+
+
+
+ 新增
+ 导出
+ 导入
+
+
+
+
+
+ 删除
+
+
+
+ 批量操作
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 无文件
+ 下载
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/tbNotice/vue3/components/TbNoticeModal.vue b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/tbNotice/vue3/components/TbNoticeModal.vue
new file mode 100644
index 0000000..23222c8
--- /dev/null
+++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/tbNotice/vue3/components/TbNoticeModal.vue
@@ -0,0 +1,58 @@
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/jeecg-boot-module-system/src/main/java/org/jeecg/modules/userCode/controller/IndexController.java b/jeecg-boot-module-system/src/main/java/org/jeecg/modules/userCode/controller/IndexController.java
index a71206e..7c797cd 100644
--- a/jeecg-boot-module-system/src/main/java/org/jeecg/modules/userCode/controller/IndexController.java
+++ b/jeecg-boot-module-system/src/main/java/org/jeecg/modules/userCode/controller/IndexController.java
@@ -7,6 +7,7 @@ import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.jeecg.common.api.vo.Result;
+import org.jeecg.common.system.base.controller.JeecgController;
import org.jeecg.common.system.query.QueryGenerator;
import org.jeecg.common.util.RedisUtil;
import org.jeecg.config.shiro.ShiroRealm;
@@ -17,6 +18,8 @@ import org.jeecg.modules.industry.service.ITbIndustryService;
import org.jeecg.modules.postBean.SuggestReq;
import org.jeecg.modules.tbConf.entity.TbConf;
import org.jeecg.modules.tbConf.service.ITbConfService;
+import org.jeecg.modules.tbNotice.entity.TbNotice;
+import org.jeecg.modules.tbNotice.service.ITbNoticeService;
import org.jeecg.modules.tbSuggest.entity.TbSuggest;
import org.jeecg.modules.tbSuggest.service.ITbSuggestService;
import org.jeecg.modules.tbTask.service.ITbTaskService;
@@ -63,6 +66,9 @@ public class IndexController {
@Resource
private TaskMapper TaskMapper;
+ @Autowired
+ private ITbNoticeService tbNoticeService;
+
@ApiOperation(value = "我的头像昵称,平台客户电话等信息")
@RequestMapping(value = "/index", method = RequestMethod.POST)
public Result index(@RequestHeader("X-Access-Token") String token) {
@@ -83,6 +89,21 @@ public class IndexController {
}
+ @ApiOperation(value="公告列表", notes="公告列表")
+ @GetMapping(value = "/noticeList")
+ public Result> noticeList() {
+ List list = tbNoticeService.list();
+ return Result.OK(list);
+ }
+
+
+ @ApiOperation(value="公告详情", notes="公告详情")
+ @GetMapping(value = "/getNotice")
+ public Result getNotice(@RequestParam(name = "id", required = true) String id) {
+ TbNotice byId = tbNoticeService.getById(id);
+ return Result.OK(byId);
+ }
+
diff --git a/jeecg-boot-module-system/src/main/java/org/jeecg/modules/userCode/service/impl/AppletLoginServiceImpl.java b/jeecg-boot-module-system/src/main/java/org/jeecg/modules/userCode/service/impl/AppletLoginServiceImpl.java
index eed5a6c..710fa8f 100644
--- a/jeecg-boot-module-system/src/main/java/org/jeecg/modules/userCode/service/impl/AppletLoginServiceImpl.java
+++ b/jeecg-boot-module-system/src/main/java/org/jeecg/modules/userCode/service/impl/AppletLoginServiceImpl.java
@@ -44,6 +44,7 @@ import javax.crypto.spec.SecretKeySpec;
import java.security.AlgorithmParameters;
import java.security.Security;
import java.util.Arrays;
+import java.util.Date;
import java.util.HashMap;
import java.util.Map;
@@ -122,10 +123,6 @@ public class AppletLoginServiceImpl implements AppletLoginService {
result.setResult(map);
return result;
} else {
-// member.setHeadImage(loginReq.getHeadimgurl());
-// member.setSessionKey(sessionKey);
-// memberService.saveOrUpdate(member);
- // 生成token返回给小程序端
String token = JwtUtil.sign(member.getAppletOpenid(), wxOpenid);
redisUtil.set(CommonConstant.PREFIX_USER_TOKEN + token, token);
// 设置超时时间
@@ -137,17 +134,8 @@ public class AppletLoginServiceImpl implements AppletLoginService {
map.put("worker", roleInfo.get("worker"));
map.put("userInfo", member);
map.put("token", token);
- //用户id做im账号
result.setResult(map);
result.setCode(200);
-// result.setMessage(member.getNickName()+"已于"+member.getCreateTime()+"注册成功!请勿重复注册!");
-// // 未绑定手机号,跳转授权绑定手机号
-// if (StringUtils.isBlank(member.getPhone())) {
-// result.setMessage("该微信用户尚未绑定手机号,请授权手机进行绑定");
-// result.setCode(905);
-// result.setResult(map);
-// return result;
-// }
}
return result;