Compare commits
No commits in common. "b96003d454c15357616ea640c47f0ca0ba9d31d9" and "b12c4b579283d0ce89fe43793ffa49d08f30e0ac" have entirely different histories.
b96003d454
...
b12c4b5792
|
|
@ -1,84 +0,0 @@
|
||||||
package com.njzscloud.supervisory.sys.operationManual.controller;
|
|
||||||
|
|
||||||
import com.njzscloud.common.core.utils.R;
|
|
||||||
import com.njzscloud.common.mp.support.PageParam;
|
|
||||||
import com.njzscloud.common.mp.support.PageResult;
|
|
||||||
import com.njzscloud.supervisory.sys.operationManual.pojo.OperationManualEntity;
|
|
||||||
import com.njzscloud.supervisory.sys.operationManual.service.OperationManualService;
|
|
||||||
import lombok.RequiredArgsConstructor;
|
|
||||||
import lombok.extern.slf4j.Slf4j;
|
|
||||||
import org.springframework.web.bind.annotation.*;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 操作手册表
|
|
||||||
*/
|
|
||||||
@Slf4j
|
|
||||||
@RestController
|
|
||||||
@RequestMapping("/operationManual")
|
|
||||||
@RequiredArgsConstructor
|
|
||||||
public class OperationManualController {
|
|
||||||
|
|
||||||
private final OperationManualService operationManualService;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 新增
|
|
||||||
*/
|
|
||||||
@PostMapping("/add")
|
|
||||||
public R<?> add(@RequestBody OperationManualEntity OperationManualEntity) {
|
|
||||||
operationManualService.add(OperationManualEntity);
|
|
||||||
return R.success();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 修改
|
|
||||||
*/
|
|
||||||
@PostMapping("/modify")
|
|
||||||
public R<?> modify(@RequestBody OperationManualEntity OperationManualEntity) {
|
|
||||||
operationManualService.modify(OperationManualEntity);
|
|
||||||
return R.success();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 删除
|
|
||||||
*/
|
|
||||||
@PostMapping("/del")
|
|
||||||
public R<?> del(@RequestBody List<Long> ids) {
|
|
||||||
operationManualService.del(ids);
|
|
||||||
return R.success();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 详情
|
|
||||||
*/
|
|
||||||
@GetMapping("/detail")
|
|
||||||
public R<OperationManualEntity> detail(@RequestParam Long id) {
|
|
||||||
return R.success(operationManualService.detail(id));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 分页查询
|
|
||||||
*/
|
|
||||||
@GetMapping("/paging")
|
|
||||||
public R<PageResult<OperationManualEntity>> paging(PageParam pageParam, OperationManualEntity OperationManualEntity) {
|
|
||||||
return R.success(operationManualService.paging(pageParam, OperationManualEntity));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 启用/禁用
|
|
||||||
*/
|
|
||||||
@GetMapping("/enable")
|
|
||||||
public R<?> enable(@RequestParam Long id, @RequestParam Boolean enable) {
|
|
||||||
operationManualService.enabled(id, enable);
|
|
||||||
return R.success();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 操作手册查询
|
|
||||||
*/
|
|
||||||
@GetMapping("/appShow")
|
|
||||||
public R<OperationManualEntity> appShow() {
|
|
||||||
return R.success(operationManualService.appShow());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,13 +0,0 @@
|
||||||
package com.njzscloud.supervisory.sys.operationManual.mapper;
|
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
|
||||||
import com.njzscloud.supervisory.sys.operationManual.pojo.OperationManualEntity;
|
|
||||||
import org.apache.ibatis.annotations.Mapper;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 操作记录表
|
|
||||||
*/
|
|
||||||
@Mapper
|
|
||||||
public interface OperationManualMapper extends BaseMapper<OperationManualEntity> {
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
@ -1,75 +0,0 @@
|
||||||
package com.njzscloud.supervisory.sys.operationManual.pojo;
|
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.annotation.*;
|
|
||||||
import lombok.Getter;
|
|
||||||
import lombok.Setter;
|
|
||||||
import lombok.experimental.Accessors;
|
|
||||||
|
|
||||||
import java.time.LocalDateTime;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 操作手册表
|
|
||||||
*/
|
|
||||||
@Getter
|
|
||||||
@Setter
|
|
||||||
@Accessors(chain = true)
|
|
||||||
@TableName("operation_manual")
|
|
||||||
public class OperationManualEntity {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Id
|
|
||||||
*/
|
|
||||||
@TableId(type = IdType.ASSIGN_ID)
|
|
||||||
private Long id;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 标题
|
|
||||||
*/
|
|
||||||
private String title;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* pdf地址
|
|
||||||
*/
|
|
||||||
private String pdfUrl;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 视频地址
|
|
||||||
*/
|
|
||||||
private String videoUrl;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 是否启用; 0-->未启用、1-->已启用
|
|
||||||
*/
|
|
||||||
private Boolean enabled;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 创建人 Id; sys_user.id
|
|
||||||
*/
|
|
||||||
@TableField(fill = FieldFill.INSERT)
|
|
||||||
private Long creatorId;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 修改人 Id; sys_user.id
|
|
||||||
*/
|
|
||||||
@TableField(fill = FieldFill.INSERT_UPDATE)
|
|
||||||
private Long modifierId;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 创建时间
|
|
||||||
*/
|
|
||||||
@TableField(fill = FieldFill.INSERT)
|
|
||||||
private LocalDateTime createTime;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 修改时间
|
|
||||||
*/
|
|
||||||
@TableField(fill = FieldFill.INSERT_UPDATE)
|
|
||||||
private LocalDateTime modifyTime;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 是否删除; 0-->未删除、1-->已删除
|
|
||||||
*/
|
|
||||||
@TableLogic
|
|
||||||
private Boolean deleted;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
@ -1,44 +0,0 @@
|
||||||
package com.njzscloud.supervisory.sys.operationManual.service;
|
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.extension.service.IService;
|
|
||||||
import com.njzscloud.common.mp.support.PageParam;
|
|
||||||
import com.njzscloud.common.mp.support.PageResult;
|
|
||||||
import com.njzscloud.supervisory.sys.operationManual.pojo.OperationManualEntity;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 操作记录表
|
|
||||||
*/
|
|
||||||
public interface OperationManualService extends IService<OperationManualEntity> {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 新增
|
|
||||||
*/
|
|
||||||
void add(OperationManualEntity OperationManualEntity);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 修改
|
|
||||||
*/
|
|
||||||
void modify(OperationManualEntity OperationManualEntity);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 删除
|
|
||||||
*/
|
|
||||||
void del(List<Long> ids);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 详情
|
|
||||||
*/
|
|
||||||
OperationManualEntity detail(Long id);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 分页查询
|
|
||||||
*/
|
|
||||||
PageResult<OperationManualEntity> paging(PageParam pageParam, OperationManualEntity OperationManualEntity);
|
|
||||||
|
|
||||||
void enabled(Long id, Boolean enable);
|
|
||||||
|
|
||||||
OperationManualEntity appShow();
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
@ -1,91 +0,0 @@
|
||||||
package com.njzscloud.supervisory.sys.operationManual.service.impl;
|
|
||||||
|
|
||||||
import cn.hutool.core.util.StrUtil;
|
|
||||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
||||||
import com.njzscloud.common.mp.support.PageParam;
|
|
||||||
import com.njzscloud.common.mp.support.PageResult;
|
|
||||||
import com.njzscloud.supervisory.sys.operationManual.mapper.OperationManualMapper;
|
|
||||||
import com.njzscloud.supervisory.sys.operationManual.pojo.OperationManualEntity;
|
|
||||||
import com.njzscloud.supervisory.sys.operationManual.service.OperationManualService;
|
|
||||||
import lombok.extern.slf4j.Slf4j;
|
|
||||||
import org.springframework.stereotype.Service;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 操作记录表
|
|
||||||
*/
|
|
||||||
@Slf4j
|
|
||||||
@Service
|
|
||||||
public class OperationManualServiceImpl extends ServiceImpl<OperationManualMapper, OperationManualEntity> implements OperationManualService {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 新增
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public void add(OperationManualEntity OperationManualEntity) {
|
|
||||||
this.save(OperationManualEntity);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 修改
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public void modify(OperationManualEntity OperationManualEntity) {
|
|
||||||
this.updateById(OperationManualEntity);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 删除
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public void del(List<Long> ids) {
|
|
||||||
this.removeBatchByIds(ids);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 详情
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public OperationManualEntity detail(Long id) {
|
|
||||||
return this.getById(id);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 分页查询
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public PageResult<OperationManualEntity> paging(PageParam pageParam, OperationManualEntity operationManualEntity) {
|
|
||||||
return PageResult.of(this.page(pageParam.toPage(), Wrappers.<OperationManualEntity>lambdaQuery()
|
|
||||||
.like(StrUtil.isNotBlank(operationManualEntity.getTitle()), OperationManualEntity::getTitle, operationManualEntity.getTitle())
|
|
||||||
.eq(OperationManualEntity::getDeleted, Boolean.FALSE)
|
|
||||||
.eq(operationManualEntity.getEnabled() != null, OperationManualEntity::getEnabled, operationManualEntity.getEnabled())
|
|
||||||
.orderByDesc(OperationManualEntity::getCreateTime)));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 启用/禁用
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public void enabled(Long id, Boolean enabled) {
|
|
||||||
OperationManualEntity entity = new OperationManualEntity();
|
|
||||||
entity.setId(id);
|
|
||||||
entity.setEnabled(enabled);
|
|
||||||
this.updateById(entity);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public OperationManualEntity appShow() {
|
|
||||||
List<OperationManualEntity> list = this.list(Wrappers.lambdaQuery(OperationManualEntity.class)
|
|
||||||
.eq(OperationManualEntity::getEnabled, Boolean.TRUE)
|
|
||||||
.eq(OperationManualEntity::getDeleted, Boolean.FALSE));
|
|
||||||
if (null != list && list.size() > 0) {
|
|
||||||
return list.get(0);
|
|
||||||
} else {
|
|
||||||
return new OperationManualEntity();
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
@ -1,22 +0,0 @@
|
||||||
<?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.njzscloud.supervisory.sys.operationManual.mapper.OperationManualMapper">
|
|
||||||
<!-- 通用查询映射结果 -->
|
|
||||||
<resultMap id="BaseResultMap" type="com.njzscloud.supervisory.sys.operationManual.pojo.OperationManualEntity">
|
|
||||||
<id column="id" property="id"/>
|
|
||||||
<result column="title" property="title"/>
|
|
||||||
<result column="pdf_url" property="pdfUrl"/>
|
|
||||||
<result column="video_url" property="videoUrl"/>
|
|
||||||
<result column="enabled" property="enabled"/>
|
|
||||||
<result column="creator_id" property="creatorId"/>
|
|
||||||
<result column="modifier_id" property="modifierId"/>
|
|
||||||
<result column="create_time" property="createTime"/>
|
|
||||||
<result column="modify_time" property="modifyTime"/>
|
|
||||||
<result column="deleted" property="deleted"/>
|
|
||||||
</resultMap>
|
|
||||||
|
|
||||||
<!-- 通用查询结果列 -->
|
|
||||||
<sql id="Base_Column_List">
|
|
||||||
id, title, pdf_url, video_url, enabled, creator_id, modifier_id, create_time, modify_time, deleted
|
|
||||||
</sql>
|
|
||||||
</mapper>
|
|
||||||
|
|
@ -1,17 +0,0 @@
|
||||||
CREATE TABLE `operation_manual`
|
|
||||||
(
|
|
||||||
`id` bigint(20) NOT NULL COMMENT 'Id',
|
|
||||||
`title` varchar(255) DEFAULT NULL COMMENT '标题',
|
|
||||||
`pdf_url` text COMMENT 'pdf地址',
|
|
||||||
`video_url` text COMMENT '视频地址',
|
|
||||||
`enable` tinyint(1) DEFAULT NULL COMMENT '是否启用 0-->否 1-->是',
|
|
||||||
`creator_id` bigint(20) NOT NULL COMMENT '创建人 Id; sys_user.id',
|
|
||||||
`modifier_id` bigint(20) NOT NULL COMMENT '修改人 Id; sys_user.id',
|
|
||||||
`create_time` datetime NOT NULL COMMENT '创建时间',
|
|
||||||
`modify_time` datetime NOT NULL COMMENT '修改时间',
|
|
||||||
`deleted` tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否删除; 0-->未删除、1-->已删除',
|
|
||||||
PRIMARY KEY (`id`) USING BTREE
|
|
||||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='操作手册表';
|
|
||||||
|
|
||||||
INSERT INTO `njzscloud`.`sys_menu` (`id`, `sn`, `pid`, `title`, `icon`, `tier`, `breadcrumb`, `menu_category`, `freeze`, `sort`, `route_name`, `creator_id`, `modifier_id`, `create_time`, `modify_time`, `deleted`) VALUES (1976557472349179905, 'operationManual', 0, '操作手册', 'audit', 1, '[\"操作手册\"]', 'Page', 0, 14, 'operationManual', 1, 1, '2025-10-10 15:56:39', '2025-10-10 15:56:39', 0);
|
|
||||||
INSERT INTO `njzscloud`.`sys_resource` (`id`, `sn`, `table_name`, `data_id`, `memo`) VALUES (1976557472932188162, 'operationManual', 'sys_menu', 1976557472349179905, '菜单资源-页面-操作手册');
|
|
||||||
Loading…
Reference in New Issue