Merge branch 'master' of https://codeup.aliyun.com/bsdtec/biz-api-cloud
This commit is contained in:
commit
7eba9d9fe7
16 files changed
+536
-5
No files matched your search
+9
@@ -61,6 +61,15 @@ public interface RemoteFlowApiFlowService {
|
||||
@PostMapping("/process-instance/queryMineTask")
|
||||
R<Page<TaskDto>> queryMineTask(@RequestBody TaskQueryParamDto queryParamDto);
|
||||
|
||||
/**
|
||||
* 查询当前用户的已任务
|
||||
*
|
||||
* @param queryParamDto
|
||||
* @return {@link R } 流程实例ID {@link String}
|
||||
*/
|
||||
@PostMapping("/process-instance/queryMineEndTask")
|
||||
R<Page<TaskDto>> queryMineEndTask(@RequestBody TaskQueryParamDto queryParamDto);
|
||||
|
||||
/**
|
||||
* 获取流程数据
|
||||
* @param businessKey 业务key
|
||||
|
||||
+4
-3
@@ -11,7 +11,8 @@ public final class IntegratedFlowConstant {
|
||||
public static final String INTEGRATED_VISITOR= "INTEGRATED_VISITOR";
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 会议预约
|
||||
*/
|
||||
public static final String INTEGRATED_MEETING_BOOKING = "MEETING_CHECK";
|
||||
}
|
||||
+3
-1
@@ -8,6 +8,7 @@ import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.bsd.pjcloud.common.core.util.R;
|
||||
import com.bsd.pjcloud.common.log.annotation.SysLog;
|
||||
import com.bsd.pjcloud.common.security.util.SecurityUtils;
|
||||
import com.bsd.pjcloud.integrated.entity.MeetingBookingEntity;
|
||||
import com.bsd.pjcloud.integrated.service.MeetingBookingService;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
@@ -50,7 +51,7 @@ public class MeetingBookingController {
|
||||
public R getMeetingBookingPage(@ParameterObject Page page, @ParameterObject MeetingBookingEntity meetingBooking) {
|
||||
LambdaQueryWrapper<MeetingBookingEntity> wrapper = Wrappers.lambdaQuery();
|
||||
wrapper.eq(StrUtil.isNotBlank(meetingBooking.getTitle()),MeetingBookingEntity::getTitle,meetingBooking.getTitle());
|
||||
return R.ok(meetingBookingService.page(page, wrapper));
|
||||
return R.ok(meetingBookingService.pageScope(page, wrapper));
|
||||
}
|
||||
|
||||
|
||||
@@ -76,6 +77,7 @@ public class MeetingBookingController {
|
||||
@PostMapping
|
||||
@PreAuthorize("@pms.hasPermission('integrated_meetingBooking_add')" )
|
||||
public R save(@RequestBody MeetingBookingEntity meetingBooking) {
|
||||
meetingBooking.setDeptId(SecurityUtils.getUser().getDeptId());
|
||||
return R.ok(meetingBookingService.save(meetingBooking));
|
||||
}
|
||||
|
||||
|
||||
+61
-1
@@ -3,13 +3,24 @@ package com.bsd.pjcloud.integrated.controller;
|
||||
import cn.hutool.core.util.ArrayUtil;
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.bsd.pjcloud.common.core.constant.enums.YesNoEnum;
|
||||
import com.bsd.pjcloud.common.core.exception.ServiceException;
|
||||
import com.bsd.pjcloud.common.core.util.R;
|
||||
import com.bsd.pjcloud.common.log.annotation.SysLog;
|
||||
import com.bsd.pjcloud.common.security.annotation.Inner;
|
||||
import com.bsd.pjcloud.common.security.util.SecurityUtils;
|
||||
import com.bsd.pjcloud.flow.task.api.feign.RemoteFlowApiFlowService;
|
||||
import com.bsd.pjcloud.flow.task.constant.TaskCheckStatusEnum;
|
||||
import com.bsd.pjcloud.flow.task.dto.ProcessInstanceParamDto;
|
||||
import com.bsd.pjcloud.flow.task.dto.ProcessNodeRecordParamDto;
|
||||
import com.bsd.pjcloud.flow.task.entity.Process;
|
||||
import com.bsd.pjcloud.flow.task.utils.GetCheckReasonUtils;
|
||||
import com.bsd.pjcloud.flow.task.vo.CheckStatusAndReasonVo;
|
||||
import com.bsd.pjcloud.integrated.constant.IntegratedFlowConstant;
|
||||
import com.bsd.pjcloud.integrated.dto.flow.MeetingFlowDto;
|
||||
import com.bsd.pjcloud.integrated.dto.meeting.app.MeetingPageDto;
|
||||
import com.bsd.pjcloud.integrated.entity.MeetingBookingEntity;
|
||||
import com.bsd.pjcloud.integrated.entity.MeetingRoomEntity;
|
||||
@@ -32,6 +43,7 @@ import org.springframework.transaction.annotation.Transactional;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
import java.time.LocalTime;
|
||||
import java.time.LocalDate;
|
||||
@@ -58,6 +70,8 @@ public class MeetingRoomController {
|
||||
|
||||
private final MeetingBookingService meetingBookingService;
|
||||
|
||||
private final RemoteFlowApiFlowService remoteFlowApiFlowService;
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
* @param page 分页对象
|
||||
@@ -235,6 +249,7 @@ public class MeetingRoomController {
|
||||
|
||||
@PostMapping("/{roomId}/book")
|
||||
@Operation(summary = "预约会议室", description = "预约会议室")
|
||||
@Transactional
|
||||
public R<Boolean> bookMeetingRoom(@PathVariable("roomId") Long roomId, @RequestBody MeetingBookingReqVo reqVo) {
|
||||
// 1. 验证会议室是否存在
|
||||
MeetingRoomEntity room = meetingRoomService.getById(roomId);
|
||||
@@ -297,8 +312,29 @@ public class MeetingRoomController {
|
||||
booking.setBookingDate(bookingDate);
|
||||
booking.setStartTime(startTime);
|
||||
booking.setEndTime(endTime);
|
||||
booking.setCheckStatus(TaskCheckStatusEnum.RESULT.getCode());
|
||||
|
||||
|
||||
//发起流程
|
||||
R<Process> processByBusinessKey = remoteFlowApiFlowService.getProcessByBusinessKey(IntegratedFlowConstant.INTEGRATED_MEETING_BOOKING);
|
||||
if (!processByBusinessKey.isOk() || processByBusinessKey.getData() == null) {
|
||||
throw new ServiceException("流程配置获取失败: " + processByBusinessKey.getMsg());
|
||||
}
|
||||
Process process = processByBusinessKey.getData();
|
||||
|
||||
MeetingFlowDto meetingFlowDto = new MeetingFlowDto();
|
||||
meetingFlowDto.setRoomName(room.getRoomName());
|
||||
meetingFlowDto.setApplicantName(SecurityUtils.getUser().getUsername());
|
||||
meetingFlowDto.setMeetingTime(booking.getBookingDate() + " " +booking.getStartTime() + "-" + booking.getEndTime());
|
||||
Map<String, Object> stringObjectMap = BeanUtil.beanToMap(meetingFlowDto);
|
||||
ProcessInstanceParamDto processInstanceParamDto = new ProcessInstanceParamDto();
|
||||
processInstanceParamDto.setFlowId(process.getFlowId());
|
||||
processInstanceParamDto.setParamMap(stringObjectMap);
|
||||
|
||||
R<String> stringR = remoteFlowApiFlowService.startProcessInstance(processInstanceParamDto);
|
||||
|
||||
|
||||
booking.setCheckStatus(TaskCheckStatusEnum.PADDING.getCode());
|
||||
booking.setProcessInstanceId(stringR.getData());
|
||||
boolean success = meetingBookingService.save(booking);
|
||||
return R.ok(success);
|
||||
}
|
||||
@@ -357,4 +393,28 @@ public class MeetingRoomController {
|
||||
return R.ok(booking);
|
||||
}
|
||||
|
||||
|
||||
@PostMapping("/flow-callback")
|
||||
@Operation(summary = "流程节点回调通知")
|
||||
@Inner(value = false)
|
||||
@Transactional
|
||||
public R flowCallback(@RequestBody ProcessNodeRecordParamDto processNodeRecordParamDto) {
|
||||
String processInstanceId = processNodeRecordParamDto.getProcessInstanceId();
|
||||
MeetingBookingEntity meetingBookingEntity = new MeetingBookingEntity();
|
||||
// meetingBookingEntity.setProcessInstanceId(processInstanceId);
|
||||
System.out.println(processNodeRecordParamDto.getData());
|
||||
LambdaQueryWrapper<MeetingBookingEntity> boxesBookingEntityLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
boxesBookingEntityLambdaQueryWrapper.eq(MeetingBookingEntity::getProcessInstanceId, processInstanceId);
|
||||
CheckStatusAndReasonVo checkReason = GetCheckReasonUtils.getCheckReason(processNodeRecordParamDto);
|
||||
meetingBookingEntity.setCheckStatus(checkReason.getCheckStatus());
|
||||
meetingBookingEntity.setCheckReason(checkReason.getCheckReason());
|
||||
meetingBookingService.update(meetingBookingEntity,boxesBookingEntityLambdaQueryWrapper);
|
||||
return R.ok();
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
+171
@@ -0,0 +1,171 @@
|
||||
package com.bsd.pjcloud.integrated.controller;
|
||||
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import cn.hutool.core.util.ArrayUtil;
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.bsd.pjcloud.common.core.util.R;
|
||||
import com.bsd.pjcloud.common.log.annotation.SysLog;
|
||||
import com.bsd.pjcloud.common.security.util.SecurityUtils;
|
||||
import com.bsd.pjcloud.integrated.entity.NoticeEntity;
|
||||
import com.bsd.pjcloud.integrated.service.NoticeService;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import com.bsd.pjcloud.common.excel.annotation.ResponseExcel;
|
||||
import io.swagger.v3.oas.annotations.security.SecurityRequirement;
|
||||
import org.springdoc.core.annotations.ParameterObject;
|
||||
import org.springframework.http.HttpHeaders;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* 通知公告
|
||||
*
|
||||
* @author zjf
|
||||
* @date 2025-07-01 13:49:09
|
||||
*/
|
||||
@RestController
|
||||
@RequiredArgsConstructor
|
||||
@RequestMapping("/notice" )
|
||||
@Tag(description = "notice" , name = "通知公告管理" )
|
||||
@SecurityRequirement(name = HttpHeaders.AUTHORIZATION)
|
||||
public class NoticeController {
|
||||
|
||||
private final NoticeService noticeService;
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
* @param page 分页对象
|
||||
* @param notice 通知公告
|
||||
* @return
|
||||
*/
|
||||
@Operation(summary = "分页查询" , description = "分页查询" )
|
||||
@GetMapping("/page" )
|
||||
@PreAuthorize("@pms.hasPermission('integrated_notice_view')" )
|
||||
public R getNoticePage(@ParameterObject Page page, @ParameterObject NoticeEntity notice) {
|
||||
LambdaQueryWrapper<NoticeEntity> wrapper = Wrappers.lambdaQuery();
|
||||
wrapper.like(StrUtil.isNotBlank(notice.getTitle()),NoticeEntity::getTitle,notice.getTitle());
|
||||
return R.ok(noticeService.page(page, wrapper));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 通过id查询通知公告
|
||||
* @param id id
|
||||
* @return R
|
||||
*/
|
||||
@Operation(summary = "通过id查询" , description = "通过id查询" )
|
||||
@GetMapping("/{id}" )
|
||||
@PreAuthorize("@pms.hasPermission('integrated_notice_view')" )
|
||||
public R getById(@PathVariable("id" ) Long id) {
|
||||
return R.ok(noticeService.getById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增通知公告
|
||||
* @param notice 通知公告
|
||||
* @return R
|
||||
*/
|
||||
@Operation(summary = "新增通知公告" , description = "新增通知公告" )
|
||||
@SysLog("新增通知公告" )
|
||||
@PostMapping
|
||||
@PreAuthorize("@pms.hasPermission('integrated_notice_add')" )
|
||||
public R save(@RequestBody NoticeEntity notice) {
|
||||
notice.setDeptId(SecurityUtils.getUser().getDeptId());
|
||||
return R.ok(noticeService.save(notice));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改通知公告
|
||||
* @param notice 通知公告
|
||||
* @return R
|
||||
*/
|
||||
@Operation(summary = "修改通知公告" , description = "修改通知公告" )
|
||||
@SysLog("修改通知公告" )
|
||||
@PutMapping
|
||||
@PreAuthorize("@pms.hasPermission('integrated_notice_edit')" )
|
||||
public R updateById(@RequestBody NoticeEntity notice) {
|
||||
return R.ok(noticeService.updateById(notice));
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除通知公告
|
||||
* @param ids id列表
|
||||
* @return R
|
||||
*/
|
||||
@Operation(summary = "通过id删除通知公告" , description = "通过id删除通知公告" )
|
||||
@SysLog("通过id删除通知公告" )
|
||||
@DeleteMapping
|
||||
@PreAuthorize("@pms.hasPermission('integrated_notice_del')" )
|
||||
public R removeById(@RequestBody Long[] ids) {
|
||||
return R.ok(noticeService.removeBatchByIds(CollUtil.toList(ids)));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 导出excel 表格
|
||||
* @param notice 查询条件
|
||||
* @param ids 导出指定ID
|
||||
* @return excel 文件流
|
||||
*/
|
||||
@ResponseExcel
|
||||
@GetMapping("/export")
|
||||
@PreAuthorize("@pms.hasPermission('integrated_notice_export')" )
|
||||
public List<NoticeEntity> export(NoticeEntity notice,Long[] ids) {
|
||||
return noticeService.list(Wrappers.lambdaQuery(notice).in(ArrayUtil.isNotEmpty(ids), NoticeEntity::getId, ids));
|
||||
}
|
||||
|
||||
/**
|
||||
* App分页公告列表
|
||||
* @param page 分页对象
|
||||
* @param title 公告标题(可选)
|
||||
* @return R
|
||||
*/
|
||||
@Operation(summary = "App分页公告列表", description = "App分页公告列表")
|
||||
@GetMapping("/app/page")
|
||||
public R getAppNoticePage(@ParameterObject Page page, @RequestParam(required = false) String title) {
|
||||
LambdaQueryWrapper<NoticeEntity> wrapper = Wrappers.lambdaQuery();
|
||||
wrapper.eq(NoticeEntity::getStatus, "0"); // 只查已发布
|
||||
wrapper.like(StrUtil.isNotBlank(title), NoticeEntity::getTitle, title);
|
||||
wrapper.orderByDesc(NoticeEntity::getIsTop, NoticeEntity::getCreateTime); // 置顶优先,时间倒序
|
||||
return R.ok(noticeService.page(page, wrapper));
|
||||
}
|
||||
|
||||
/**
|
||||
* App公告详情
|
||||
* @param id 公告ID
|
||||
* @return R
|
||||
*/
|
||||
@Operation(summary = "App公告详情", description = "App公告详情")
|
||||
@GetMapping("/app/{id}")
|
||||
public R getAppNoticeDetail(@PathVariable("id") Long id) {
|
||||
NoticeEntity notice = noticeService.getById(id);
|
||||
if (notice == null || !"0".equals(notice.getStatus())) {
|
||||
return R.failed("公告不存在或已下架");
|
||||
}
|
||||
return R.ok(notice);
|
||||
}
|
||||
|
||||
/**
|
||||
* App公告浏览量+1
|
||||
* @param id 公告ID
|
||||
* @return R
|
||||
*/
|
||||
@Operation(summary = "App公告浏览量+1", description = "App公告浏览量+1")
|
||||
@PostMapping("/app/view/{id}")
|
||||
public R addViewCount(@PathVariable("id") Long id) {
|
||||
NoticeEntity notice = noticeService.getById(id);
|
||||
if (notice == null || !"0".equals(notice.getStatus())) {
|
||||
return R.failed("公告不存在或已下架");
|
||||
}
|
||||
notice.setViewCount((notice.getViewCount() == null ? 0 : notice.getViewCount()) + 1);
|
||||
noticeService.updateById(notice);
|
||||
return R.ok();
|
||||
}
|
||||
}
|
||||
+77
@@ -0,0 +1,77 @@
|
||||
package com.bsd.pjcloud.integrated.controller;
|
||||
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import cn.hutool.core.util.ArrayUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.bsd.pjcloud.common.core.util.R;
|
||||
import com.bsd.pjcloud.common.excel.annotation.ResponseExcel;
|
||||
import com.bsd.pjcloud.common.log.annotation.SysLog;
|
||||
import com.bsd.pjcloud.common.security.util.SecurityUtils;
|
||||
import com.bsd.pjcloud.flow.task.api.feign.RemoteFlowApiFlowService;
|
||||
import com.bsd.pjcloud.flow.task.dto.TaskDto;
|
||||
import com.bsd.pjcloud.flow.task.dto.TaskQueryParamDto;
|
||||
import com.bsd.pjcloud.integrated.entity.NoticeEntity;
|
||||
import com.bsd.pjcloud.integrated.service.NoticeService;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.security.SecurityRequirement;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springdoc.core.annotations.ParameterObject;
|
||||
import org.springframework.http.HttpHeaders;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 审批提醒,代办事项
|
||||
*
|
||||
* @author zjf
|
||||
* @date 2025-07-01 13:49:09
|
||||
*/
|
||||
@RestController
|
||||
@RequiredArgsConstructor
|
||||
@RequestMapping("/task" )
|
||||
@Tag(description = "task" , name = "审批提醒,代办事项" )
|
||||
@SecurityRequirement(name = HttpHeaders.AUTHORIZATION)
|
||||
public class TaskController {
|
||||
|
||||
private final NoticeService noticeService;
|
||||
|
||||
private final RemoteFlowApiFlowService remoteFlowApiFlowService;
|
||||
|
||||
/**
|
||||
* 我的待办
|
||||
* @param page 分页对象
|
||||
* @return
|
||||
*/
|
||||
@Operation(summary = "我的待办" , description = "我的待办" )
|
||||
@GetMapping("/process-instance/queryMineTask" )
|
||||
public R getMineTask(@ParameterObject Page page) {
|
||||
TaskQueryParamDto taskQueryParamDto = new TaskQueryParamDto();
|
||||
taskQueryParamDto.setCurrent((int) page.getCurrent());
|
||||
taskQueryParamDto.setSize((int) page.getSize());
|
||||
R<Page<TaskDto>> pageR = remoteFlowApiFlowService.queryMineTask(taskQueryParamDto);
|
||||
return pageR;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 我的已办
|
||||
* @param page 分页对象
|
||||
* @return
|
||||
*/
|
||||
@Operation(summary = "我的已办" , description = "我的已办" )
|
||||
@GetMapping("/process-instance/queryMineEndTask" )
|
||||
public R getMineEndTask(@ParameterObject Page page) {
|
||||
TaskQueryParamDto taskQueryParamDto = new TaskQueryParamDto();
|
||||
taskQueryParamDto.setCurrent((int) page.getCurrent());
|
||||
taskQueryParamDto.setSize((int) page.getSize());
|
||||
R<Page<TaskDto>> pageR = remoteFlowApiFlowService.queryMineEndTask(taskQueryParamDto);
|
||||
return pageR;
|
||||
}
|
||||
|
||||
}
|
||||
+14
@@ -0,0 +1,14 @@
|
||||
package com.bsd.pjcloud.integrated.dto.flow;
|
||||
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class MeetingFlowDto {
|
||||
|
||||
private String roomName;
|
||||
|
||||
private String applicantName;
|
||||
|
||||
private String meetingTime;
|
||||
}
|
||||
+6
@@ -132,4 +132,10 @@ public class MeetingBookingEntity extends Model<MeetingBookingEntity> {
|
||||
@Schema(description = "预约日期")
|
||||
private LocalDate bookingDate;
|
||||
|
||||
@Schema(description = "流程实例id")
|
||||
private String processInstanceId;
|
||||
|
||||
@Schema(description = "审批原因")
|
||||
private String checkReason;
|
||||
|
||||
}
|
||||
+115
@@ -0,0 +1,115 @@
|
||||
package com.bsd.pjcloud.integrated.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import com.baomidou.mybatisplus.extension.activerecord.Model;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import com.bsd.pjcloud.common.core.util.TenantTable;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* 通知公告
|
||||
*
|
||||
* @author zjf
|
||||
* @date 2025-07-01 13:49:09
|
||||
*/
|
||||
@Data
|
||||
@TenantTable
|
||||
@TableName("notice")
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Schema(description = "通知公告")
|
||||
public class NoticeEntity extends Model<NoticeEntity> {
|
||||
|
||||
|
||||
/**
|
||||
* id
|
||||
*/
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
@Schema(description="id")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 公告详情
|
||||
*/
|
||||
@Schema(description="公告详情")
|
||||
private String description;
|
||||
|
||||
/**
|
||||
* 状态 0已发布,1已下架
|
||||
*/
|
||||
@Schema(description="状态 0已发布,1已下架")
|
||||
private String status;
|
||||
|
||||
/**
|
||||
* 部门id
|
||||
*/
|
||||
@Schema(description="部门id")
|
||||
private Long deptId;
|
||||
|
||||
/**
|
||||
* 公告标题
|
||||
*/
|
||||
@Schema(description="公告标题")
|
||||
private String title;
|
||||
|
||||
/**
|
||||
* 公告图片
|
||||
*/
|
||||
@Schema(description="公告图片")
|
||||
private String picUrl;
|
||||
|
||||
/**
|
||||
* 是否置顶
|
||||
*/
|
||||
@Schema(description="是否置顶")
|
||||
private String isTop;
|
||||
|
||||
/**
|
||||
* 浏览次数
|
||||
*/
|
||||
@Schema(description="浏览次数")
|
||||
private Integer viewCount;
|
||||
|
||||
/**
|
||||
* 创建者
|
||||
*/
|
||||
@TableField(fill = FieldFill.INSERT)
|
||||
@Schema(description="创建者")
|
||||
private String createBy;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@TableField(fill = FieldFill.INSERT)
|
||||
@Schema(description="创建时间")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
/**
|
||||
* 更新者
|
||||
*/
|
||||
@TableField(fill = FieldFill.INSERT_UPDATE)
|
||||
@Schema(description="更新者")
|
||||
private String updateBy;
|
||||
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
@TableField(fill = FieldFill.INSERT_UPDATE)
|
||||
@Schema(description="更新时间")
|
||||
private LocalDateTime updateTime;
|
||||
|
||||
/**
|
||||
* 是否删除
|
||||
*/
|
||||
@TableLogic
|
||||
@TableField(fill = FieldFill.INSERT)
|
||||
@Schema(description="是否删除")
|
||||
private String delFlag;
|
||||
|
||||
/**
|
||||
* 租户编号
|
||||
*/
|
||||
@Schema(description="租户编号")
|
||||
private Long tenantId;
|
||||
}
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
package com.bsd.pjcloud.integrated.mapper;
|
||||
|
||||
import com.bsd.pjcloud.common.data.datascope.PjcloudBaseMapper;
|
||||
import com.bsd.pjcloud.integrated.entity.NoticeEntity;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
@Mapper
|
||||
public interface NoticeMapper extends PjcloudBaseMapper<NoticeEntity> {
|
||||
|
||||
|
||||
}
|
||||
+10
@@ -1,8 +1,18 @@
|
||||
package com.bsd.pjcloud.integrated.service;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.bsd.pjcloud.integrated.entity.MeetingBookingEntity;
|
||||
|
||||
public interface MeetingBookingService extends IService<MeetingBookingEntity> {
|
||||
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
* @param page
|
||||
* @param wrapper
|
||||
* @return
|
||||
*/
|
||||
Object pageScope(Page page, LambdaQueryWrapper<MeetingBookingEntity> wrapper);
|
||||
}
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
package com.bsd.pjcloud.integrated.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.bsd.pjcloud.integrated.entity.NoticeEntity;
|
||||
|
||||
public interface NoticeService extends IService<NoticeEntity> {
|
||||
|
||||
}
|
||||
+7
@@ -1,6 +1,9 @@
|
||||
package com.bsd.pjcloud.integrated.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.bsd.pjcloud.common.data.datascope.DataScope;
|
||||
import com.bsd.pjcloud.integrated.entity.MeetingBookingEntity;
|
||||
import com.bsd.pjcloud.integrated.mapper.MeetingBookingMapper;
|
||||
import com.bsd.pjcloud.integrated.service.MeetingBookingService;
|
||||
@@ -13,4 +16,8 @@ import org.springframework.stereotype.Service;
|
||||
*/
|
||||
@Service
|
||||
public class MeetingBookingServiceImpl extends ServiceImpl<MeetingBookingMapper, MeetingBookingEntity> implements MeetingBookingService {
|
||||
@Override
|
||||
public Object pageScope(Page page, LambdaQueryWrapper<MeetingBookingEntity> wrapper) {
|
||||
return baseMapper.selectPageByScope(page, wrapper, DataScope.of());
|
||||
}
|
||||
}
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
package com.bsd.pjcloud.integrated.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.bsd.pjcloud.integrated.entity.NoticeEntity;
|
||||
import com.bsd.pjcloud.integrated.mapper.NoticeMapper;
|
||||
import com.bsd.pjcloud.integrated.service.NoticeService;
|
||||
import org.springframework.stereotype.Service;
|
||||
/**
|
||||
* 通知公告
|
||||
*
|
||||
* @author zjf
|
||||
* @date 2025-07-01 13:49:09
|
||||
*/
|
||||
@Service
|
||||
public class NoticeServiceImpl extends ServiceImpl<NoticeMapper, NoticeEntity> implements NoticeService {
|
||||
}
|
||||
+2
@@ -21,6 +21,8 @@
|
||||
<result property="delFlag" column="del_flag"/>
|
||||
<result property="tenantId" column="tenant_id"/>
|
||||
<result property="bookingDate" column="booking_date"/>
|
||||
<result property="processInstanceId" column="process_instance_id"/>
|
||||
<result property="checkReason" column="check_reason"/>
|
||||
</resultMap>
|
||||
<select id="findByRoomIdAndDate" resultType="com.bsd.pjcloud.integrated.entity.MeetingBookingEntity">
|
||||
SELECT * FROM meeting_booking WHERE room_id = #{roomId} AND start_time >= #{date} AND start_time <= #{date}
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
<?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.bsd.pjcloud.integrated.mapper.NoticeMapper">
|
||||
|
||||
<resultMap id="noticeMap" type="com.bsd.pjcloud.integrated.entity.NoticeEntity">
|
||||
<id property="id" column="id"/>
|
||||
<result property="description" column="description"/>
|
||||
<result property="status" column="status"/>
|
||||
<result property="deptId" column="dept_id"/>
|
||||
<result property="title" column="title"/>
|
||||
<result property="picUrl" column="pic_url"/>
|
||||
<result property="isTop" column="is_top"/>
|
||||
<result property="viewCount" column="view_count"/>
|
||||
<result property="createBy" column="create_by"/>
|
||||
<result property="createTime" column="create_time"/>
|
||||
<result property="updateBy" column="update_by"/>
|
||||
<result property="updateTime" column="update_time"/>
|
||||
<result property="delFlag" column="del_flag"/>
|
||||
<result property="tenantId" column="tenant_id"/>
|
||||
</resultMap>
|
||||
</mapper>
|
||||
Reference in new issue
Block a user