From 395c35c097238de09308093d2eec5ad4530ca266 Mon Sep 17 00:00:00 2001
From: tangzy <tangzy123456>
Date: Mon, 12 Jul 2021 15:56:46 +0800
Subject: [PATCH] 1.区域
---
src/main/java/org/springblade/modules/record/mapper/RecordMapper.java | 43
src/main/java/org/springblade/modules/recordk/mapper/RecordkMapper.xml | 33
src/main/java/org/springblade/modules/revoke/dto/RevokeDTO.java | 34
src/main/java/org/springblade/modules/record/entity/Record.java | 152 +++
src/main/java/org/springblade/modules/permit/entity/Permit.java | 139 ++
src/main/java/org/springblade/modules/recordk/mapper/RecordkMapper.java | 43
src/main/java/org/springblade/modules/jurisdiction/vo/JurisdictionVO.java | 80 +
src/main/java/org/springblade/modules/jurisdiction/entity/Jurisdiction.java | 96 ++
src/main/java/org/springblade/modules/jurisdiction/service/impl/JurisdictionServiceImpl.java | 112 ++
src/main/java/org/springblade/modules/recordk/entity/Recordk.java | 151 +++
src/main/java/org/springblade/modules/record/controller/RecordController.java | 126 ++
src/main/java/org/springblade/modules/jurisdiction/controller/JurisdictionController.java | 161 +++
src/main/java/org/springblade/modules/revoke/service/impl/RevokeServiceImpl.java | 41
src/main/java/org/springblade/modules/revoke/entity/Revoke.java | 141 ++
src/main/java/org/springblade/modules/revoke/mapper/RevokeMapper.xml | 32
src/main/java/org/springblade/modules/permit/service/IPermitService.java | 41
src/main/java/org/springblade/modules/jurisdiction/dto/JurisdictionDTO.java | 33
src/main/java/org/springblade/modules/record/service/impl/RecordServiceImpl.java | 41
src/main/java/org/springblade/modules/permit/mapper/PermitMapper.java | 43
src/main/java/org/springblade/modules/permit/mapper/PermitMapper.xml | 31
src/main/java/org/springblade/modules/permit/controller/PermitController.java | 129 ++
src/main/java/org/springblade/modules/recordk/controller/RecordkController.java | 126 ++
src/main/java/org/springblade/modules/permit/service/impl/PermitServiceImpl.java | 41
src/main/java/org/springblade/modules/revoke/vo/RevokeVO.java | 36
src/main/java/org/springblade/modules/jurisdiction/mapper/JurisdictionMapper.java | 75 +
src/main/java/org/springblade/modules/permit/vo/PermitVO.java | 36
src/main/java/org/springblade/modules/revoke/mapper/RevokeMapper.java | 43
src/main/java/org/springblade/modules/record/service/IRecordService.java | 41
src/main/java/org/springblade/modules/jurisdiction/wrapper/JurisdictionWrapper.java | 71 +
src/main/java/org/springblade/modules/jurisdiction/mapper/JurisdictionMapper.xml | 113 ++
src/main/java/org/springblade/modules/revoke/service/IRevokeService.java | 41
src/main/java/org/springblade/modules/recordk/vo/RecordkVO.java | 36
src/main/java/org/springblade/modules/record/vo/RecordVO.java | 36
src/main/java/org/springblade/modules/recordk/service/IRecordkService.java | 41
src/main/java/org/springblade/modules/recordk/service/impl/RecordkServiceImpl.java | 41
src/main/java/org/springblade/modules/jurisdiction/service/JurisdictionService.java | 82 +
src/main/java/org/springblade/modules/record/dto/RecordDTO.java | 34
src/main/java/org/springblade/modules/recordk/dto/RecordkDTO.java | 34
src/main/java/org/springblade/modules/revoke/controller/RevokeController.java | 126 ++
src/main/java/org/springblade/modules/permit/dto/PermitDTO.java | 34
src/main/java/org/springblade/modules/record/mapper/RecordMapper.xml | 33
41 files changed, 2,822 insertions(+), 0 deletions(-)
diff --git a/src/main/java/org/springblade/modules/jurisdiction/controller/JurisdictionController.java b/src/main/java/org/springblade/modules/jurisdiction/controller/JurisdictionController.java
new file mode 100644
index 0000000..0e3541a
--- /dev/null
+++ b/src/main/java/org/springblade/modules/jurisdiction/controller/JurisdictionController.java
@@ -0,0 +1,161 @@
+/*
+ * Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * Neither the name of the dreamlu.net developer nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ * Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.modules.jurisdiction.controller;
+
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
+import io.swagger.annotations.*;
+import lombok.AllArgsConstructor;
+import org.springblade.core.boot.ctrl.BladeController;
+import org.springblade.core.cache.utils.CacheUtil;
+import org.springblade.core.mp.support.Condition;
+import org.springblade.core.secure.BladeUser;
+import org.springblade.core.tenant.annotation.NonDS;
+import org.springblade.core.tool.api.R;
+import org.springblade.core.tool.constant.BladeConstant;
+import org.springblade.core.tool.support.Kv;
+import org.springblade.core.tool.utils.Func;
+import org.springblade.modules.jurisdiction.entity.Jurisdiction;
+import org.springblade.modules.jurisdiction.service.JurisdictionService;
+import org.springblade.modules.jurisdiction.vo.JurisdictionVO;
+import org.springblade.modules.jurisdiction.wrapper.JurisdictionWrapper;
+import org.springframework.web.bind.annotation.*;
+import springfox.documentation.annotations.ApiIgnore;
+
+import javax.validation.Valid;
+import java.util.List;
+import java.util.Map;
+
+import static org.springblade.core.cache.constant.CacheConstant.SYS_CACHE;
+
+/**
+ * 控制器
+ *
+ * @author Chill
+ */
+@NonDS
+@RestController
+@AllArgsConstructor
+@RequestMapping("/jurisdiction")
+@Api(value = "部门", tags = "部门")
+public class JurisdictionController extends BladeController {
+
+ private final JurisdictionService jurisdictionService;
+
+ /**
+ * 详情
+ */
+ @GetMapping("/detail")
+ @ApiOperationSupport(order = 1)
+ @ApiOperation(value = "详情", notes = "传入dept")
+ public R<JurisdictionVO> detail(Jurisdiction jurisdiction) {
+ Jurisdiction detail = jurisdictionService.getOne(Condition.getQueryWrapper(jurisdiction));
+ return R.data(JurisdictionWrapper.build().entityVO(detail));
+ }
+
+ /**
+ * 列表
+ */
+ @GetMapping("/list")
+ @ApiImplicitParams({
+ @ApiImplicitParam(name = "deptName", value = "部门名称", paramType = "query", dataType = "string"),
+ @ApiImplicitParam(name = "fullName", value = "部门全称", paramType = "query", dataType = "string")
+ })
+ @ApiOperationSupport(order = 2)
+ @ApiOperation(value = "列表", notes = "传入dept")
+ public R<List<JurisdictionVO>> list(@ApiIgnore @RequestParam Map<String, Object> dept, BladeUser bladeUser) {
+ QueryWrapper<Jurisdiction> queryWrapper = Condition.getQueryWrapper(dept, Jurisdiction.class);
+ List<Jurisdiction> list = jurisdictionService.list((!bladeUser.getTenantId().equals(BladeConstant.ADMIN_TENANT_ID)) ? queryWrapper.lambda().eq(Jurisdiction::getTenantId, bladeUser.getTenantId()) : queryWrapper);
+ return R.data(JurisdictionWrapper.build().listNodeVO(list));
+ }
+
+ /**
+ * 懒加载列表
+ */
+ @GetMapping("/lazy-list")
+ @ApiImplicitParams({
+ @ApiImplicitParam(name = "deptName", value = "部门名称", paramType = "query", dataType = "string"),
+ @ApiImplicitParam(name = "fullName", value = "部门全称", paramType = "query", dataType = "string")
+ })
+ @ApiOperationSupport(order = 3)
+ @ApiOperation(value = "懒加载列表", notes = "传入dept")
+ public R<List<JurisdictionVO>> lazyList(@ApiIgnore @RequestParam Map<String, Object> dept, Long parentId, BladeUser bladeUser) {
+ List<JurisdictionVO> list = jurisdictionService.lazyList(bladeUser.getTenantId(), parentId, dept);
+ return R.data(JurisdictionWrapper.build().listNodeLazyVO(list));
+ }
+
+ /**
+ * 获取部门树形结构
+ */
+ @GetMapping("/tree")
+ @ApiOperationSupport(order = 4)
+ @ApiOperation(value = "树形结构", notes = "树形结构")
+ public R<List<JurisdictionVO>> tree(String tenantId, BladeUser bladeUser) {
+ List<JurisdictionVO> tree = jurisdictionService.tree(Func.toStrWithEmpty(tenantId, bladeUser.getTenantId()));
+ return R.data(tree);
+ }
+
+ /**
+ * 懒加载获取部门树形结构
+ */
+ @GetMapping("/lazy-tree")
+ @ApiOperationSupport(order = 5)
+ @ApiOperation(value = "懒加载树形结构", notes = "树形结构")
+ public R<List<JurisdictionVO>> lazyTree(String tenantId, Long parentId, BladeUser bladeUser) {
+ List<JurisdictionVO> tree = jurisdictionService.lazyTree(Func.toStrWithEmpty(tenantId, bladeUser.getTenantId()), parentId);
+ return R.data(tree);
+ }
+
+ /**
+ * 懒加载获取部门树形结构
+ */
+ @GetMapping("/lazy-trees")
+ @ApiOperation(value = "懒加载树形结构", notes = "树形结构")
+ public R<List<JurisdictionVO>> lazyTrees() {
+ List<JurisdictionVO> tree = jurisdictionService.lazyTrees();
+ return R.data(tree);
+ }
+
+ /**
+ * 新增或修改
+ */
+ @PostMapping("/submit")
+ @ApiOperationSupport(order = 6)
+ @ApiOperation(value = "新增或修改", notes = "传入dept")
+ public R submit(@Valid @RequestBody Jurisdiction jurisdiction) {
+ if (jurisdictionService.submit(jurisdiction)) {
+ CacheUtil.clear(SYS_CACHE);
+ // 返回懒加载树更新节点所需字段
+ Kv kv = Kv.create().set("id", String.valueOf(jurisdiction.getId())).set("tenantId", jurisdiction.getTenantId());
+ return R.data(kv);
+ }
+ return R.fail("操作失败");
+ }
+
+ /**
+ * 删除
+ */
+ @PostMapping("/remove")
+ @ApiOperationSupport(order = 7)
+ @ApiOperation(value = "删除", notes = "传入ids")
+ public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
+ CacheUtil.clear(SYS_CACHE);
+ return R.status(jurisdictionService.removeDept(ids));
+ }
+
+
+}
diff --git a/src/main/java/org/springblade/modules/jurisdiction/dto/JurisdictionDTO.java b/src/main/java/org/springblade/modules/jurisdiction/dto/JurisdictionDTO.java
new file mode 100644
index 0000000..fd1931c
--- /dev/null
+++ b/src/main/java/org/springblade/modules/jurisdiction/dto/JurisdictionDTO.java
@@ -0,0 +1,33 @@
+/*
+ * Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * Neither the name of the dreamlu.net developer nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ * Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.modules.jurisdiction.dto;
+
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import org.springblade.modules.jurisdiction.entity.Jurisdiction;
+
+/**
+ * 数据传输对象实体类
+ *
+ * @author Chill
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+public class JurisdictionDTO extends Jurisdiction {
+ private static final long serialVersionUID = 1L;
+
+}
diff --git a/src/main/java/org/springblade/modules/jurisdiction/entity/Jurisdiction.java b/src/main/java/org/springblade/modules/jurisdiction/entity/Jurisdiction.java
new file mode 100644
index 0000000..9528d83
--- /dev/null
+++ b/src/main/java/org/springblade/modules/jurisdiction/entity/Jurisdiction.java
@@ -0,0 +1,96 @@
+/*
+ * Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * Neither the name of the dreamlu.net developer nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ * Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.modules.jurisdiction.entity;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableLogic;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.fasterxml.jackson.databind.annotation.JsonSerialize;
+import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.io.Serializable;
+
+/**
+ * 实体类
+ *
+ * @author Chill
+ */
+@Data
+@TableName("sys_jurisdiction")
+@ApiModel(value = "jurisdiction对象", description = "jurisdiction对象")
+public class Jurisdiction implements Serializable {
+
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * 主键
+ */
+ @JsonSerialize(using = ToStringSerializer.class)
+ @ApiModelProperty(value = "主键")
+ @TableId(value = "id", type = IdType.ASSIGN_ID)
+ private Long id;
+
+ /**
+ * 租户ID
+ */
+ @ApiModelProperty(value = "租户ID")
+ private String tenantId;
+
+ /**
+ * 父主键
+ */
+ @JsonSerialize(using = ToStringSerializer.class)
+ @ApiModelProperty(value = "父主键")
+ private Long parentId;
+
+ /**
+ * 机构全称
+ */
+ @ApiModelProperty(value = "机构全称")
+ private String fullName;
+
+ /**
+ * 机构名
+ */
+ @ApiModelProperty(value = "机构名")
+ private String deptName;
+
+ /**
+ * 祖级机构主键
+ */
+ @ApiModelProperty(value = "祖级机构主键")
+ private String ancestors;
+
+ /**
+ * 备注
+ */
+ @ApiModelProperty(value = "备注")
+ private String remark;
+
+ /**
+ * 是否已删除
+ */
+ @TableLogic
+ @ApiModelProperty(value = "是否已删除")
+ private Integer isDeleted;
+
+
+}
diff --git a/src/main/java/org/springblade/modules/jurisdiction/mapper/JurisdictionMapper.java b/src/main/java/org/springblade/modules/jurisdiction/mapper/JurisdictionMapper.java
new file mode 100644
index 0000000..94a6b1d
--- /dev/null
+++ b/src/main/java/org/springblade/modules/jurisdiction/mapper/JurisdictionMapper.java
@@ -0,0 +1,75 @@
+/*
+ * Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * Neither the name of the dreamlu.net developer nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ * Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.modules.jurisdiction.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import org.springblade.modules.jurisdiction.entity.Jurisdiction;
+import org.springblade.modules.jurisdiction.vo.JurisdictionVO;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * Mapper 接口
+ *
+ * @author Chill
+ */
+public interface JurisdictionMapper extends BaseMapper<Jurisdiction> {
+
+ /**
+ * 懒加载部门列表
+ *
+ * @param tenantId
+ * @param parentId
+ * @param param
+ * @return
+ */
+ List<JurisdictionVO> lazyList(String tenantId, Long parentId, Map<String, Object> param);
+
+ /**
+ * 获取树形节点
+ *
+ * @param tenantId
+ * @return
+ */
+ List<JurisdictionVO> tree(String tenantId);
+
+ /**
+ * 懒加载获取树形节点
+ *
+ * @param tenantId
+ * @param parentId
+ * @return
+ */
+ List<JurisdictionVO> lazyTree(String tenantId, Long parentId);
+
+ /**
+ * 懒加载获取树形节点
+ *
+ * @return
+ */
+ List<JurisdictionVO> lazyTrees();
+
+ /**
+ * 获取部门名
+ *
+ * @param ids
+ * @return
+ */
+ List<String> getDeptNames(Long[] ids);
+
+}
diff --git a/src/main/java/org/springblade/modules/jurisdiction/mapper/JurisdictionMapper.xml b/src/main/java/org/springblade/modules/jurisdiction/mapper/JurisdictionMapper.xml
new file mode 100644
index 0000000..781b25b
--- /dev/null
+++ b/src/main/java/org/springblade/modules/jurisdiction/mapper/JurisdictionMapper.xml
@@ -0,0 +1,113 @@
+<?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="org.springblade.modules.jurisdiction.mapper.JurisdictionMapper">
+
+ <!-- 通用查询映射结果 -->
+ <resultMap id="deptResultMap" type="org.springblade.modules.jurisdiction.entity.Jurisdiction">
+ <id column="id" property="id"/>
+ <result column="parent_id" property="parentId"/>
+ <result column="dept_name" property="deptName"/>
+ <result column="full_name" property="fullName"/>
+ <result column="ancestors" property="ancestors"/>
+ <result column="remark" property="remark"/>
+ <result column="is_deleted" property="isDeleted"/>
+ </resultMap>
+
+ <resultMap id="deptVOResultMap" type="org.springblade.modules.jurisdiction.vo.JurisdictionVO">
+ <id column="id" property="id"/>
+ <result column="parent_id" property="parentId"/>
+ <result column="dept_name" property="deptName"/>
+ <result column="full_name" property="fullName"/>
+ <result column="ancestors" property="ancestors"/>
+ <result column="remark" property="remark"/>
+ <result column="is_deleted" property="isDeleted"/>
+ <result column="has_children" property="hasChildren"/>
+ </resultMap>
+
+ <resultMap id="treeNodeResultMap" type="org.springblade.core.tool.node.TreeNode">
+ <id column="id" property="id"/>
+ <result column="parent_id" property="parentId"/>
+ <result column="title" property="title"/>
+ <result column="value" property="value"/>
+ <result column="key" property="key"/>
+ <result column="has_children" property="hasChildren"/>
+ </resultMap>
+
+ <select id="lazyList" resultMap="deptVOResultMap">
+ SELECT
+ dept.* ,
+ (
+ SELECT
+ CASE WHEN count(1) > 0 THEN 1 ELSE 0 END
+ FROM
+ blade_jurisdiction
+ WHERE
+ parent_id = dept.id and is_deleted = 0
+ ) AS "has_children"
+ FROM
+ blade_jurisdiction dept
+ WHERE dept.is_deleted = 0
+ <if test="param1!=null and param1!=''">
+ and dept.tenant_id = #{param1}
+ </if>
+ <if test="param2!=null">
+ and dept.parent_id = #{param2}
+ </if>
+ <if test="param3.deptName!=null and param3.deptName!=''">
+ and dept.dept_name like concat(concat('%', #{param3.deptName}),'%')
+ </if>
+ <if test="param3.fullName!=null and param3.fullName!=''">
+ and dept.full_name like concat(concat('%', #{param3.fullName}),'%')
+ </if>
+ </select>
+
+ <select id="tree" resultMap="treeNodeResultMap">
+ select id, parent_id, dept_name as title, id as "value", id as "key" from blade_jurisdiction where is_deleted = 0
+ <if test="_parameter!=null and _parameter!=''">
+ and tenant_id = #{_parameter}
+ </if>
+ </select>
+
+ <select id="lazyTree" resultMap="treeNodeResultMap" >
+ SELECT
+ dept.id,
+ dept.parent_id,
+ dept.dept_name AS title,
+ dept.id AS "value",
+ dept.id AS "key",
+ (
+ SELECT
+ CASE WHEN count(1) > 0 THEN 1 ELSE 0 END
+ FROM
+ blade_jurisdiction
+ WHERE
+ parent_id = dept.id and is_deleted = 0
+ ) AS "has_children"
+ FROM
+ blade_jurisdiction dept
+ WHERE dept.is_deleted = 0
+ <if test="param1!=null and param1!=''">
+ and dept.tenant_id = #{param1}
+ </if>
+ </select>
+
+ <select id="lazyTrees" resultMap="treeNodeResultMap" >
+ SELECT
+ dept.id,
+ dept.parent_id,
+ dept.dept_name AS title,
+ dept.id AS "value",
+ dept.id AS "key",
+ (
+ SELECT
+ CASE WHEN count(1) > 0 THEN 1 ELSE 0 END
+ FROM
+ blade_jurisdiction
+ WHERE
+ parent_id = dept.id and is_deleted = 0
+ ) AS "has_children"
+ FROM
+ blade_jurisdiction dept
+ WHERE dept.is_deleted = 0
+ </select>
+</mapper>
diff --git a/src/main/java/org/springblade/modules/jurisdiction/service/JurisdictionService.java b/src/main/java/org/springblade/modules/jurisdiction/service/JurisdictionService.java
new file mode 100644
index 0000000..e65f2a7
--- /dev/null
+++ b/src/main/java/org/springblade/modules/jurisdiction/service/JurisdictionService.java
@@ -0,0 +1,82 @@
+/*
+ * Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * Neither the name of the dreamlu.net developer nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ * Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.modules.jurisdiction.service;
+
+import com.baomidou.mybatisplus.extension.service.IService;
+import org.springblade.modules.jurisdiction.entity.Jurisdiction;
+import org.springblade.modules.jurisdiction.vo.JurisdictionVO;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * 服务类
+ *
+ * @author Chill
+ */
+public interface JurisdictionService extends IService<Jurisdiction> {
+
+ /**
+ * 懒加载部门列表
+ *
+ * @param tenantId
+ * @param parentId
+ * @param param
+ * @return
+ */
+ List<JurisdictionVO> lazyList(String tenantId, Long parentId, Map<String, Object> param);
+
+ /**
+ * 树形结构
+ *
+ * @param tenantId
+ * @return
+ */
+ List<JurisdictionVO> tree(String tenantId);
+
+ /**
+ * 懒加载树形结构
+ *
+ * @param tenantId
+ * @param parentId
+ * @return
+ */
+ List<JurisdictionVO> lazyTree(String tenantId, Long parentId);
+
+ /**
+ * 懒加载获取树形节点
+ *
+ * @return
+ */
+ List<JurisdictionVO> lazyTrees();
+
+ /**
+ * 删除部门
+ *
+ * @param ids
+ * @return
+ */
+ boolean removeDept(String ids);
+
+ /**
+ * 提交
+ *
+ * @param
+ * @return
+ */
+ boolean submit(Jurisdiction jurisdiction);
+}
diff --git a/src/main/java/org/springblade/modules/jurisdiction/service/impl/JurisdictionServiceImpl.java b/src/main/java/org/springblade/modules/jurisdiction/service/impl/JurisdictionServiceImpl.java
new file mode 100644
index 0000000..5ca30bc
--- /dev/null
+++ b/src/main/java/org/springblade/modules/jurisdiction/service/impl/JurisdictionServiceImpl.java
@@ -0,0 +1,112 @@
+/*
+ * Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * Neither the name of the dreamlu.net developer nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ * Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.modules.jurisdiction.service.impl;
+
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springblade.core.log.exception.ServiceException;
+import org.springblade.core.secure.utils.AuthUtil;
+import org.springblade.core.tool.constant.BladeConstant;
+import org.springblade.core.tool.node.ForestNodeMerger;
+import org.springblade.core.tool.utils.Func;
+import org.springblade.core.tool.utils.StringPool;
+import org.springblade.modules.jurisdiction.entity.Jurisdiction;
+import org.springblade.modules.jurisdiction.mapper.JurisdictionMapper;
+import org.springblade.modules.jurisdiction.service.JurisdictionService;
+import org.springblade.modules.jurisdiction.vo.JurisdictionVO;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * 服务实现类
+ *
+ * @author Chill
+ */
+@Service
+public class JurisdictionServiceImpl extends ServiceImpl<JurisdictionMapper, Jurisdiction> implements JurisdictionService {
+ private static final String TENANT_ID = "tenantId";
+ private static final String PARENT_ID = "parentId";
+
+ @Override
+ public List<JurisdictionVO> lazyList(String tenantId, Long parentId, Map<String, Object> param) {
+ // 设置租户ID
+ if (AuthUtil.isAdministrator()) {
+ tenantId = StringPool.EMPTY;
+ }
+ String paramTenantId = Func.toStr(param.get(TENANT_ID));
+ if (Func.isNotEmpty(paramTenantId) && AuthUtil.isAdministrator()) {
+ tenantId = paramTenantId;
+ }
+ // 判断点击搜索但是没有查询条件的情况
+ if (Func.isEmpty(param.get(PARENT_ID)) && param.size() == 1) {
+ parentId = 0L;
+ }
+ // 判断点击搜索带有查询条件的情况
+ if (Func.isEmpty(param.get(PARENT_ID)) && param.size() > 1 && Func.toLong(parentId) == 0L) {
+ parentId = null;
+ }
+ return baseMapper.lazyList(tenantId, parentId, param);
+ }
+
+ @Override
+ public List<JurisdictionVO> tree(String tenantId) {
+ return ForestNodeMerger.merge(baseMapper.tree(tenantId));
+ }
+
+ @Override
+ public List<JurisdictionVO> lazyTree(String tenantId, Long parentId) {
+ if (AuthUtil.isAdministrator()) {
+ tenantId = StringPool.EMPTY;
+ }
+ return ForestNodeMerger.merge(baseMapper.lazyTree(tenantId, parentId));
+ }
+
+ @Override
+ public List<JurisdictionVO> lazyTrees() {
+ return ForestNodeMerger.merge(baseMapper.lazyTrees());
+ }
+
+
+ @Override
+ public boolean removeDept(String ids) {
+ return removeByIds(Func.toLongList(ids));
+ }
+
+ @Override
+ public boolean submit(Jurisdiction dept) {
+ if (Func.isEmpty(dept.getParentId())) {
+ dept.setTenantId(AuthUtil.getTenantId());
+ dept.setParentId(BladeConstant.TOP_PARENT_ID);
+ dept.setAncestors(String.valueOf(BladeConstant.TOP_PARENT_ID));
+ }
+ if (dept.getParentId() > 0) {
+ Jurisdiction parent = getById(dept.getParentId());
+ if (Func.toLong(dept.getParentId()) == Func.toLong(dept.getId())) {
+ throw new ServiceException("父节点不可选择自身!");
+ }
+ dept.setTenantId(parent.getTenantId());
+ String ancestors = parent.getAncestors() + StringPool.COMMA + dept.getParentId();
+ dept.setAncestors(ancestors);
+ }
+ dept.setIsDeleted(BladeConstant.DB_NOT_DELETED);
+ return saveOrUpdate(dept);
+ }
+
+
+
+}
diff --git a/src/main/java/org/springblade/modules/jurisdiction/vo/JurisdictionVO.java b/src/main/java/org/springblade/modules/jurisdiction/vo/JurisdictionVO.java
new file mode 100644
index 0000000..d807238
--- /dev/null
+++ b/src/main/java/org/springblade/modules/jurisdiction/vo/JurisdictionVO.java
@@ -0,0 +1,80 @@
+/*
+ * Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * Neither the name of the dreamlu.net developer nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ * Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.modules.jurisdiction.vo;
+
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.databind.annotation.JsonSerialize;
+import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
+import io.swagger.annotations.ApiModel;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import org.springblade.core.tool.node.INode;
+import org.springblade.modules.system.entity.Dept;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * 视图实体类
+ *
+ * @author Chill
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+@ApiModel(value = "DeptVO对象", description = "DeptVO对象")
+public class JurisdictionVO extends Dept implements INode<JurisdictionVO> {
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * 主键ID
+ */
+ @JsonSerialize(using = ToStringSerializer.class)
+ private Long id;
+
+ /**
+ * 父节点ID
+ */
+ @JsonSerialize(using = ToStringSerializer.class)
+ private Long parentId;
+
+ /**
+ * 子孙节点
+ */
+ @JsonInclude(JsonInclude.Include.NON_EMPTY)
+ private List<JurisdictionVO> children;
+
+ /**
+ * 是否有子孙节点
+ */
+ @JsonInclude(JsonInclude.Include.NON_EMPTY)
+ private Boolean hasChildren;
+
+ @Override
+ public List<JurisdictionVO> getChildren() {
+ if (this.children == null) {
+ this.children = new ArrayList<>();
+ }
+ return this.children;
+ }
+
+ /**
+ * 上级机构
+ */
+ private String parentName;
+
+
+}
diff --git a/src/main/java/org/springblade/modules/jurisdiction/wrapper/JurisdictionWrapper.java b/src/main/java/org/springblade/modules/jurisdiction/wrapper/JurisdictionWrapper.java
new file mode 100644
index 0000000..4d983ab
--- /dev/null
+++ b/src/main/java/org/springblade/modules/jurisdiction/wrapper/JurisdictionWrapper.java
@@ -0,0 +1,71 @@
+/*
+ * Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * Neither the name of the dreamlu.net developer nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ * Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.modules.jurisdiction.wrapper;
+
+import org.springblade.common.cache.DictCache;
+import org.springblade.common.cache.SysCache;
+import org.springblade.common.enums.DictEnum;
+import org.springblade.core.mp.support.BaseEntityWrapper;
+import org.springblade.core.tool.constant.BladeConstant;
+import org.springblade.core.tool.node.ForestNodeMerger;
+import org.springblade.core.tool.utils.BeanUtil;
+import org.springblade.core.tool.utils.Func;
+import org.springblade.modules.jurisdiction.entity.Jurisdiction;
+import org.springblade.modules.jurisdiction.vo.JurisdictionVO;
+import org.springblade.modules.system.entity.Dept;
+
+import java.util.List;
+import java.util.Objects;
+import java.util.stream.Collectors;
+
+/**
+ * 包装类,返回视图层所需的字段
+ *
+ * @author Chill
+ */
+public class JurisdictionWrapper extends BaseEntityWrapper<Jurisdiction, JurisdictionVO> {
+
+ public static JurisdictionWrapper build() {
+ return new JurisdictionWrapper();
+ }
+
+
+ @Override
+ public JurisdictionVO entityVO(Jurisdiction jurisdiction) {
+ JurisdictionVO jurisdictionVO = Objects.requireNonNull(BeanUtil.copy(jurisdiction, JurisdictionVO.class));
+ if (Func.equals(jurisdiction.getParentId(), BladeConstant.TOP_PARENT_ID)) {
+ jurisdictionVO.setParentName(BladeConstant.TOP_PARENT_NAME);
+ } else {
+ Dept parent = SysCache.getDept(jurisdiction.getParentId());
+ jurisdictionVO.setParentName(parent.getDeptName());
+ }
+ return jurisdictionVO;
+ }
+ public List<JurisdictionVO> listNodeVO(List<Jurisdiction> list) {
+ List<JurisdictionVO> collect = list.stream().map(dept -> {
+ JurisdictionVO deptVO = BeanUtil.copy(dept, JurisdictionVO.class);
+ return deptVO;
+ }).collect(Collectors.toList());
+ return ForestNodeMerger.merge(collect);
+ }
+ public List<JurisdictionVO> listNodeLazyVO(List<JurisdictionVO> list) {
+ List<JurisdictionVO> collect = list.stream().peek(dept -> {
+ String category = DictCache.getValue(DictEnum.ORG_CATEGORY, dept.getDeptCategory());
+ }).collect(Collectors.toList());
+ return ForestNodeMerger.merge(collect);
+ }
+}
diff --git a/src/main/java/org/springblade/modules/permit/controller/PermitController.java b/src/main/java/org/springblade/modules/permit/controller/PermitController.java
new file mode 100644
index 0000000..92e82d6
--- /dev/null
+++ b/src/main/java/org/springblade/modules/permit/controller/PermitController.java
@@ -0,0 +1,129 @@
+/*
+ * Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * Neither the name of the dreamlu.net developer nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ * Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.modules.permit.controller;
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import io.swagger.annotations.ApiParam;
+import lombok.AllArgsConstructor;
+import org.springblade.core.boot.ctrl.BladeController;
+import org.springblade.core.mp.support.Condition;
+import org.springblade.core.mp.support.Query;
+import org.springblade.core.tool.api.R;
+import org.springblade.core.tool.utils.Func;
+import org.springblade.modules.permit.entity.Permit;
+import org.springblade.modules.permit.service.IPermitService;
+import org.springblade.modules.permit.vo.PermitVO;
+import org.springframework.web.bind.annotation.*;
+
+import javax.validation.Valid;
+import java.util.Date;
+
+/**
+ * 控制器
+ *
+ * @author BladeX
+ * @since 2021-07-12
+ */
+@RestController
+@AllArgsConstructor
+@RequestMapping("blade-permit/permit")
+@Api(value = "", tags = "接口")
+public class PermitController extends BladeController {
+
+ private final IPermitService permitService;
+
+ /**
+ * 详情
+ */
+ @GetMapping("/detail")
+ @ApiOperationSupport(order = 1)
+ @ApiOperation(value = "详情", notes = "传入permit")
+ public R<Permit> detail(Permit permit) {
+ Permit detail = permitService.getOne(Condition.getQueryWrapper(permit));
+ return R.data(detail);
+ }
+
+ /**
+ * 分页
+ */
+ @GetMapping("/list")
+ @ApiOperationSupport(order = 2)
+ @ApiOperation(value = "分页", notes = "传入permit")
+ public R<IPage<Permit>> list(Permit permit, Query query) {
+ IPage<Permit> pages = permitService.page(Condition.getPage(query), Condition.getQueryWrapper(permit));
+ return R.data(pages);
+ }
+
+ /**
+ * 自定义分页
+ */
+ @GetMapping("/page")
+ @ApiOperationSupport(order = 3)
+ @ApiOperation(value = "分页", notes = "传入permit")
+ public R<IPage<PermitVO>> page(PermitVO permit, Query query) {
+ IPage<PermitVO> pages = permitService.selectPermitPage(Condition.getPage(query), permit);
+ return R.data(pages);
+ }
+
+ /**
+ * 新增
+ */
+ @PostMapping("/save")
+ @ApiOperationSupport(order = 4)
+ @ApiOperation(value = "新增", notes = "传入permit")
+ public R save(@Valid @RequestBody Permit permit) {
+ permit.setType("2");
+ permit.setPermitime(new Date());
+ return R.status(permitService.save(permit));
+ }
+
+ /**
+ * 修改
+ */
+ @PostMapping("/update")
+ @ApiOperationSupport(order = 5)
+ @ApiOperation(value = "修改", notes = "传入permit")
+ public R update(@Valid @RequestBody Permit permit) {
+ return R.status(permitService.updateById(permit));
+ }
+
+ /**
+ * 新增或修改
+ */
+ @PostMapping("/submit")
+ @ApiOperationSupport(order = 6)
+ @ApiOperation(value = "新增或修改", notes = "传入permit")
+ public R submit(@Valid @RequestBody Permit permit) {
+ return R.status(permitService.saveOrUpdate(permit));
+ }
+
+
+ /**
+ * 删除
+ */
+ @PostMapping("/remove")
+ @ApiOperationSupport(order = 8)
+ @ApiOperation(value = "删除", notes = "传入ids")
+ public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
+ return R.status(permitService.removeByIds(Func.toLongList(ids)));
+ }
+
+
+}
diff --git a/src/main/java/org/springblade/modules/permit/dto/PermitDTO.java b/src/main/java/org/springblade/modules/permit/dto/PermitDTO.java
new file mode 100644
index 0000000..2471161
--- /dev/null
+++ b/src/main/java/org/springblade/modules/permit/dto/PermitDTO.java
@@ -0,0 +1,34 @@
+/*
+ * Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * Neither the name of the dreamlu.net developer nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ * Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.modules.permit.dto;
+
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import org.springblade.modules.permit.entity.Permit;
+
+/**
+ * 数据传输对象实体类
+ *
+ * @author BladeX
+ * @since 2021-07-12
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+public class PermitDTO extends Permit {
+ private static final long serialVersionUID = 1L;
+
+}
diff --git a/src/main/java/org/springblade/modules/permit/entity/Permit.java b/src/main/java/org/springblade/modules/permit/entity/Permit.java
new file mode 100644
index 0000000..f21f92a
--- /dev/null
+++ b/src/main/java/org/springblade/modules/permit/entity/Permit.java
@@ -0,0 +1,139 @@
+/*
+ * Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * Neither the name of the dreamlu.net developer nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ * Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.modules.permit.entity;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import org.springframework.format.annotation.DateTimeFormat;
+
+import java.io.Serializable;
+import java.time.LocalDateTime;
+import java.util.Date;
+
+/**
+ * 实体类
+ *
+ * @author BladeX
+ * @since 2021-07-12
+ */
+@Data
+@TableName("sys_permit")
+@ApiModel(value = "Permit对象", description = "Permit对象")
+public class Permit implements Serializable {
+
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * 统一社会信用代码
+ */
+ @ApiModelProperty(value = "统一社会信用代码")
+ @TableField("creditCode")
+ private String creditcode;
+ /**
+ * 企业名称
+ */
+ @ApiModelProperty(value = "企业名称")
+ @TableField("enterpriseName")
+ private String enterprisename;
+ /**
+ * 法定代表人
+ */
+ @ApiModelProperty(value = "法定代表人")
+ private String representative;
+ /**
+ * 成立日期
+ */
+ @ApiModelProperty(value = "成立日期")
+ @TableField("establishTime")
+ @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
+ @DateTimeFormat(pattern = "yyyy-MM-dd")
+ private Date establishtime;
+
+ @ApiModelProperty(value = "提交时间")
+ @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
+ @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+ private Date permitime;
+ /**
+ * 注册资本
+ */
+ @ApiModelProperty(value = "注册资本")
+ @TableField("registeredCapital")
+ private String registeredcapital;
+ /**
+ * 组织机构代码
+ */
+ @ApiModelProperty(value = "组织机构代码")
+ @TableField("organizationCode")
+ private String organizationcode;
+ /**
+ * 工商注册号
+ */
+ @ApiModelProperty(value = "工商注册号")
+ @TableField("registrationNumber")
+ private String registrationnumber;
+ /**
+ * 纳税人识别号
+ */
+ @ApiModelProperty(value = "纳税人识别号")
+ @TableField("identificationNumber")
+ private String identificationnumber;
+ /**
+ * 企业类型
+ */
+ @ApiModelProperty(value = "企业类型")
+ private String enterprises;
+ /**
+ * 注册地址
+ */
+ @ApiModelProperty(value = "注册地址")
+ private String address;
+ /**
+ * 经营范围
+ */
+ @ApiModelProperty(value = "经营范围")
+ private String business;
+ /**
+ * 所属地区
+ */
+ @ApiModelProperty(value = "所属地区")
+ private String region;
+ /**
+ * 登记机关
+ */
+ @ApiModelProperty(value = "登记机关")
+ private String registration;
+ /**
+ * 所属行业
+ */
+ @ApiModelProperty(value = "所属行业")
+ private String industry;
+ /**
+ * 审核状态 0:审核通过 1:审核不通过 2: 审核中
+ */
+ @ApiModelProperty(value = "审核状态 0:审核通过 1:审核不通过 2: 审核中")
+ private String type;
+ @TableId(value = "id", type = IdType.AUTO)
+ private Integer id;
+
+
+}
diff --git a/src/main/java/org/springblade/modules/permit/mapper/PermitMapper.java b/src/main/java/org/springblade/modules/permit/mapper/PermitMapper.java
new file mode 100644
index 0000000..98e17e3
--- /dev/null
+++ b/src/main/java/org/springblade/modules/permit/mapper/PermitMapper.java
@@ -0,0 +1,43 @@
+/*
+ * Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * Neither the name of the dreamlu.net developer nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ * Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.modules.permit.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import org.springblade.modules.permit.entity.Permit;
+import org.springblade.modules.permit.vo.PermitVO;
+
+import java.util.List;
+
+/**
+ * Mapper 接口
+ *
+ * @author BladeX
+ * @since 2021-07-12
+ */
+public interface PermitMapper extends BaseMapper<Permit> {
+
+ /**
+ * 自定义分页
+ *
+ * @param page
+ * @param permit
+ * @return
+ */
+ List<PermitVO> selectPermitPage(IPage page, PermitVO permit);
+
+}
diff --git a/src/main/java/org/springblade/modules/permit/mapper/PermitMapper.xml b/src/main/java/org/springblade/modules/permit/mapper/PermitMapper.xml
new file mode 100644
index 0000000..b5290c8
--- /dev/null
+++ b/src/main/java/org/springblade/modules/permit/mapper/PermitMapper.xml
@@ -0,0 +1,31 @@
+<?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="org.springblade.modules.permit.mapper.PermitMapper">
+
+ <!-- 通用查询映射结果 -->
+ <resultMap id="permitResultMap" type="org.springblade.modules.permit.entity.Permit">
+ <id column="id" property="id"/>
+ <result column="creditCode" property="creditcode"/>
+ <result column="enterpriseName" property="enterprisename"/>
+ <result column="representative" property="representative"/>
+ <result column="establishTime" property="establishtime"/>
+ <result column="registeredCapital" property="registeredcapital"/>
+ <result column="organizationCode" property="organizationcode"/>
+ <result column="registrationNumber" property="registrationnumber"/>
+ <result column="identificationNumber" property="identificationnumber"/>
+ <result column="enterprises" property="enterprises"/>
+ <result column="address" property="address"/>
+ <result column="business" property="business"/>
+ <result column="region" property="region"/>
+ <result column="registration" property="registration"/>
+ <result column="industry" property="industry"/>
+ <result column="type" property="type"/>
+ <result column="permitime" property="permitime"/>
+ </resultMap>
+
+
+ <select id="selectPermitPage" resultMap="permitResultMap">
+ select * from sys_permit
+ </select>
+
+</mapper>
diff --git a/src/main/java/org/springblade/modules/permit/service/IPermitService.java b/src/main/java/org/springblade/modules/permit/service/IPermitService.java
new file mode 100644
index 0000000..060858a
--- /dev/null
+++ b/src/main/java/org/springblade/modules/permit/service/IPermitService.java
@@ -0,0 +1,41 @@
+/*
+ * Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * Neither the name of the dreamlu.net developer nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ * Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.modules.permit.service;
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.service.IService;
+import org.springblade.modules.permit.entity.Permit;
+import org.springblade.modules.permit.vo.PermitVO;
+
+/**
+ * 服务类
+ *
+ * @author BladeX
+ * @since 2021-07-12
+ */
+public interface IPermitService extends IService<Permit> {
+
+ /**
+ * 自定义分页
+ *
+ * @param page
+ * @param permit
+ * @return
+ */
+ IPage<PermitVO> selectPermitPage(IPage<PermitVO> page, PermitVO permit);
+
+}
diff --git a/src/main/java/org/springblade/modules/permit/service/impl/PermitServiceImpl.java b/src/main/java/org/springblade/modules/permit/service/impl/PermitServiceImpl.java
new file mode 100644
index 0000000..87c2eec
--- /dev/null
+++ b/src/main/java/org/springblade/modules/permit/service/impl/PermitServiceImpl.java
@@ -0,0 +1,41 @@
+/*
+ * Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * Neither the name of the dreamlu.net developer nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ * Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.modules.permit.service.impl;
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springblade.modules.permit.entity.Permit;
+import org.springblade.modules.permit.mapper.PermitMapper;
+import org.springblade.modules.permit.service.IPermitService;
+import org.springblade.modules.permit.vo.PermitVO;
+import org.springframework.stereotype.Service;
+
+/**
+ * 服务实现类
+ *
+ * @author BladeX
+ * @since 2021-07-12
+ */
+@Service
+public class PermitServiceImpl extends ServiceImpl<PermitMapper, Permit> implements IPermitService {
+
+ @Override
+ public IPage<PermitVO> selectPermitPage(IPage<PermitVO> page, PermitVO permit) {
+ return page.setRecords(baseMapper.selectPermitPage(page, permit));
+ }
+
+}
diff --git a/src/main/java/org/springblade/modules/permit/vo/PermitVO.java b/src/main/java/org/springblade/modules/permit/vo/PermitVO.java
new file mode 100644
index 0000000..6122a8d
--- /dev/null
+++ b/src/main/java/org/springblade/modules/permit/vo/PermitVO.java
@@ -0,0 +1,36 @@
+/*
+ * Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * Neither the name of the dreamlu.net developer nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ * Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.modules.permit.vo;
+
+import io.swagger.annotations.ApiModel;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import org.springblade.modules.permit.entity.Permit;
+
+/**
+ * 视图实体类
+ *
+ * @author BladeX
+ * @since 2021-07-12
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+@ApiModel(value = "PermitVO对象", description = "PermitVO对象")
+public class PermitVO extends Permit {
+ private static final long serialVersionUID = 1L;
+
+}
diff --git a/src/main/java/org/springblade/modules/record/controller/RecordController.java b/src/main/java/org/springblade/modules/record/controller/RecordController.java
new file mode 100644
index 0000000..6d8f717
--- /dev/null
+++ b/src/main/java/org/springblade/modules/record/controller/RecordController.java
@@ -0,0 +1,126 @@
+/*
+ * Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * Neither the name of the dreamlu.net developer nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ * Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.modules.record.controller;
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import io.swagger.annotations.ApiParam;
+import lombok.AllArgsConstructor;
+import org.springblade.core.boot.ctrl.BladeController;
+import org.springblade.core.mp.support.Condition;
+import org.springblade.core.mp.support.Query;
+import org.springblade.core.tool.api.R;
+import org.springblade.core.tool.utils.Func;
+import org.springblade.modules.record.entity.Record;
+import org.springblade.modules.record.service.IRecordService;
+import org.springblade.modules.record.vo.RecordVO;
+import org.springframework.web.bind.annotation.*;
+
+import javax.validation.Valid;
+
+/**
+ * 控制器
+ *
+ * @author BladeX
+ * @since 2021-07-12
+ */
+@RestController
+@AllArgsConstructor
+@RequestMapping("/record")
+@Api(value = "", tags = "接口")
+public class RecordController extends BladeController {
+
+ private final IRecordService recordService;
+
+ /**
+ * 详情
+ */
+ @GetMapping("/detail")
+ @ApiOperationSupport(order = 1)
+ @ApiOperation(value = "详情", notes = "传入record")
+ public R<Record> detail(Record record) {
+ Record detail = recordService.getOne(Condition.getQueryWrapper(record));
+ return R.data(detail);
+ }
+
+ /**
+ * 分页
+ */
+ @GetMapping("/list")
+ @ApiOperationSupport(order = 2)
+ @ApiOperation(value = "分页", notes = "传入record")
+ public R<IPage<Record>> list(Record record, Query query) {
+ IPage<Record> pages = recordService.page(Condition.getPage(query), Condition.getQueryWrapper(record));
+ return R.data(pages);
+ }
+
+ /**
+ * 自定义分页
+ */
+ @GetMapping("/page")
+ @ApiOperationSupport(order = 3)
+ @ApiOperation(value = "分页", notes = "传入record")
+ public R<IPage<RecordVO>> page(RecordVO record, Query query) {
+ IPage<RecordVO> pages = recordService.selectRecordPage(Condition.getPage(query), record);
+ return R.data(pages);
+ }
+
+ /**
+ * 新增
+ */
+ @PostMapping("/save")
+ @ApiOperationSupport(order = 4)
+ @ApiOperation(value = "新增", notes = "传入record")
+ public R save(@Valid @RequestBody Record record) {
+ return R.status(recordService.save(record));
+ }
+
+ /**
+ * 修改
+ */
+ @PostMapping("/update")
+ @ApiOperationSupport(order = 5)
+ @ApiOperation(value = "修改", notes = "传入record")
+ public R update(@Valid @RequestBody Record record) {
+ return R.status(recordService.updateById(record));
+ }
+
+ /**
+ * 新增或修改
+ */
+ @PostMapping("/submit")
+ @ApiOperationSupport(order = 6)
+ @ApiOperation(value = "新增或修改", notes = "传入record")
+ public R submit(@Valid @RequestBody Record record) {
+ return R.status(recordService.saveOrUpdate(record));
+ }
+
+
+ /**
+ * 删除
+ */
+ @PostMapping("/remove")
+ @ApiOperationSupport(order = 8)
+ @ApiOperation(value = "删除", notes = "传入ids")
+ public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
+ return R.status(recordService.removeByIds(Func.toLongList(ids)));
+ }
+
+
+}
diff --git a/src/main/java/org/springblade/modules/record/dto/RecordDTO.java b/src/main/java/org/springblade/modules/record/dto/RecordDTO.java
new file mode 100644
index 0000000..18f320e
--- /dev/null
+++ b/src/main/java/org/springblade/modules/record/dto/RecordDTO.java
@@ -0,0 +1,34 @@
+/*
+ * Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * Neither the name of the dreamlu.net developer nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ * Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.modules.record.dto;
+
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import org.springblade.modules.record.entity.Record;
+
+/**
+ * 数据传输对象实体类
+ *
+ * @author BladeX
+ * @since 2021-07-12
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+public class RecordDTO extends Record {
+ private static final long serialVersionUID = 1L;
+
+}
diff --git a/src/main/java/org/springblade/modules/record/entity/Record.java b/src/main/java/org/springblade/modules/record/entity/Record.java
new file mode 100644
index 0000000..8b55cec
--- /dev/null
+++ b/src/main/java/org/springblade/modules/record/entity/Record.java
@@ -0,0 +1,152 @@
+/*
+ * Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * Neither the name of the dreamlu.net developer nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ * Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.modules.record.entity;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import org.springframework.format.annotation.DateTimeFormat;
+
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * 实体类
+ *
+ * @author BladeX
+ * @since 2021-07-12
+ */
+@Data
+@TableName("sys_record")
+@ApiModel(value = "Record对象", description = "Record对象")
+public class Record implements Serializable {
+
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * 统一社会信用代码
+ */
+ @ApiModelProperty(value = "统一社会信用代码")
+ @TableField("creditCode")
+ private String creditcode;
+ /**
+ * 企业名称
+ */
+ @ApiModelProperty(value = "企业名称")
+ @TableField("enterpriseName")
+ private String enterprisename;
+ /**
+ * 法定代表人
+ */
+ @ApiModelProperty(value = "法定代表人")
+ private String representative;
+ /**
+ * 成立日期
+ */
+ @ApiModelProperty(value = "成立日期")
+ @TableField("establishTime")
+ @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
+ @DateTimeFormat(pattern = "yyyy-MM-dd")
+ private Date establishtime;
+ /**
+ * 注册资本
+ */
+ @ApiModelProperty(value = "注册资本")
+ @TableField("registeredCapital")
+ private String registeredcapital;
+
+ /**
+ * 组织机构代码
+ */
+ @ApiModelProperty(value = "组织机构代码")
+ @TableField("organizationCode")
+ private String organizationcode;
+ /**
+ * 工商注册号
+ */
+ @ApiModelProperty(value = "工商注册号")
+ @TableField("registrationNumber")
+ private String registrationnumber;
+ /**
+ * 纳税人识别号
+ */
+ @ApiModelProperty(value = "纳税人识别号")
+ @TableField("identificationNumber")
+ private String identificationnumber;
+ /**
+ * 企业类型
+ */
+ @ApiModelProperty(value = "企业类型")
+ private String enterprises;
+ /**
+ * 注册地址
+ */
+ @ApiModelProperty(value = "注册地址")
+ private String address;
+ /**
+ * 经营范围
+ */
+ @ApiModelProperty(value = "经营范围")
+ private String business;
+ /**
+ * 所属地区
+ */
+ @ApiModelProperty(value = "所属地区")
+ private String region;
+ /**
+ * 登记机关
+ */
+ @ApiModelProperty(value = "登记机关")
+ private String registration;
+ /**
+ * 所属行业
+ */
+ @ApiModelProperty(value = "所属行业")
+ private String industry;
+ /**
+ * 状态 0:审核通过 1:审核不通过 2: 审核中
+ */
+ @ApiModelProperty(value = "状态 0:审核通过 1:审核不通过 2: 审核中")
+ private String type;
+ /**
+ * 保安服务单位许可编号
+ */
+ @ApiModelProperty(value = "保安服务单位许可编号")
+ private String perid;
+ /**
+ * 许可发证机关
+ */
+ @ApiModelProperty(value = "许可发证机关")
+ private String offices;
+ /**
+ * 发证时间
+ */
+ @ApiModelProperty(value = "发证时间")
+ @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
+ @DateTimeFormat(pattern = "yyyy-MM-dd")
+ private Date officetime;
+
+ @TableId(value = "id", type = IdType.AUTO)
+ private Integer id;
+
+
+}
diff --git a/src/main/java/org/springblade/modules/record/mapper/RecordMapper.java b/src/main/java/org/springblade/modules/record/mapper/RecordMapper.java
new file mode 100644
index 0000000..4435750
--- /dev/null
+++ b/src/main/java/org/springblade/modules/record/mapper/RecordMapper.java
@@ -0,0 +1,43 @@
+/*
+ * Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * Neither the name of the dreamlu.net developer nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ * Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.modules.record.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import org.springblade.modules.record.entity.Record;
+import org.springblade.modules.record.vo.RecordVO;
+
+import java.util.List;
+
+/**
+ * Mapper 接口
+ *
+ * @author BladeX
+ * @since 2021-07-12
+ */
+public interface RecordMapper extends BaseMapper<Record> {
+
+ /**
+ * 自定义分页
+ *
+ * @param page
+ * @param record
+ * @return
+ */
+ List<RecordVO> selectRecordPage(IPage page, RecordVO record);
+
+}
diff --git a/src/main/java/org/springblade/modules/record/mapper/RecordMapper.xml b/src/main/java/org/springblade/modules/record/mapper/RecordMapper.xml
new file mode 100644
index 0000000..2da8a12
--- /dev/null
+++ b/src/main/java/org/springblade/modules/record/mapper/RecordMapper.xml
@@ -0,0 +1,33 @@
+<?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="org.springblade.modules.record.mapper.RecordMapper">
+
+ <!-- 通用查询映射结果 -->
+ <resultMap id="recordResultMap" type="org.springblade.modules.record.entity.Record">
+ <id column="id" property="id"/>
+ <result column="creditCode" property="creditcode"/>
+ <result column="enterpriseName" property="enterprisename"/>
+ <result column="representative" property="representative"/>
+ <result column="establishTime" property="establishtime"/>
+ <result column="registeredCapital" property="registeredcapital"/>
+ <result column="organizationCode" property="organizationcode"/>
+ <result column="registrationNumber" property="registrationnumber"/>
+ <result column="identificationNumber" property="identificationnumber"/>
+ <result column="enterprises" property="enterprises"/>
+ <result column="address" property="address"/>
+ <result column="business" property="business"/>
+ <result column="region" property="region"/>
+ <result column="registration" property="registration"/>
+ <result column="industry" property="industry"/>
+ <result column="type" property="type"/>
+ <result column="perid" property="perid"/>
+ <result column="offices" property="offices"/>
+ <result column="officetime" property="officetime"/>
+ </resultMap>
+
+
+ <select id="selectRecordPage" resultMap="recordResultMap">
+ select * from sys_record
+ </select>
+
+</mapper>
diff --git a/src/main/java/org/springblade/modules/record/service/IRecordService.java b/src/main/java/org/springblade/modules/record/service/IRecordService.java
new file mode 100644
index 0000000..044e155
--- /dev/null
+++ b/src/main/java/org/springblade/modules/record/service/IRecordService.java
@@ -0,0 +1,41 @@
+/*
+ * Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * Neither the name of the dreamlu.net developer nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ * Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.modules.record.service;
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.service.IService;
+import org.springblade.modules.record.entity.Record;
+import org.springblade.modules.record.vo.RecordVO;
+
+/**
+ * 服务类
+ *
+ * @author BladeX
+ * @since 2021-07-12
+ */
+public interface IRecordService extends IService<Record> {
+
+ /**
+ * 自定义分页
+ *
+ * @param page
+ * @param record
+ * @return
+ */
+ IPage<RecordVO> selectRecordPage(IPage<RecordVO> page, RecordVO record);
+
+}
diff --git a/src/main/java/org/springblade/modules/record/service/impl/RecordServiceImpl.java b/src/main/java/org/springblade/modules/record/service/impl/RecordServiceImpl.java
new file mode 100644
index 0000000..e916b9a
--- /dev/null
+++ b/src/main/java/org/springblade/modules/record/service/impl/RecordServiceImpl.java
@@ -0,0 +1,41 @@
+/*
+ * Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * Neither the name of the dreamlu.net developer nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ * Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.modules.record.service.impl;
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springblade.modules.record.entity.Record;
+import org.springblade.modules.record.mapper.RecordMapper;
+import org.springblade.modules.record.service.IRecordService;
+import org.springblade.modules.record.vo.RecordVO;
+import org.springframework.stereotype.Service;
+
+/**
+ * 服务实现类
+ *
+ * @author BladeX
+ * @since 2021-07-12
+ */
+@Service
+public class RecordServiceImpl extends ServiceImpl<RecordMapper, Record> implements IRecordService {
+
+ @Override
+ public IPage<RecordVO> selectRecordPage(IPage<RecordVO> page, RecordVO record) {
+ return page.setRecords(baseMapper.selectRecordPage(page, record));
+ }
+
+}
diff --git a/src/main/java/org/springblade/modules/record/vo/RecordVO.java b/src/main/java/org/springblade/modules/record/vo/RecordVO.java
new file mode 100644
index 0000000..1182d8b
--- /dev/null
+++ b/src/main/java/org/springblade/modules/record/vo/RecordVO.java
@@ -0,0 +1,36 @@
+/*
+ * Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * Neither the name of the dreamlu.net developer nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ * Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.modules.record.vo;
+
+import io.swagger.annotations.ApiModel;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import org.springblade.modules.record.entity.Record;
+
+/**
+ * 视图实体类
+ *
+ * @author BladeX
+ * @since 2021-07-12
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+@ApiModel(value = "RecordVO对象", description = "RecordVO对象")
+public class RecordVO extends Record {
+ private static final long serialVersionUID = 1L;
+
+}
diff --git a/src/main/java/org/springblade/modules/recordk/controller/RecordkController.java b/src/main/java/org/springblade/modules/recordk/controller/RecordkController.java
new file mode 100644
index 0000000..00c023c
--- /dev/null
+++ b/src/main/java/org/springblade/modules/recordk/controller/RecordkController.java
@@ -0,0 +1,126 @@
+/*
+ * Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * Neither the name of the dreamlu.net developer nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ * Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.modules.recordk.controller;
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import io.swagger.annotations.ApiParam;
+import lombok.AllArgsConstructor;
+import org.springblade.core.boot.ctrl.BladeController;
+import org.springblade.core.mp.support.Condition;
+import org.springblade.core.mp.support.Query;
+import org.springblade.core.tool.api.R;
+import org.springblade.core.tool.utils.Func;
+import org.springblade.modules.recordk.entity.Recordk;
+import org.springblade.modules.recordk.service.IRecordkService;
+import org.springblade.modules.recordk.vo.RecordkVO;
+import org.springframework.web.bind.annotation.*;
+
+import javax.validation.Valid;
+
+/**
+ * 控制器
+ *
+ * @author BladeX
+ * @since 2021-07-12
+ */
+@RestController
+@AllArgsConstructor
+@RequestMapping("/recordk")
+@Api(value = "", tags = "接口")
+public class RecordkController extends BladeController {
+
+ private final IRecordkService recordkService;
+
+ /**
+ * 详情
+ */
+ @GetMapping("/detail")
+ @ApiOperationSupport(order = 1)
+ @ApiOperation(value = "详情", notes = "传入recordk")
+ public R<Recordk> detail(Recordk recordk) {
+ Recordk detail = recordkService.getOne(Condition.getQueryWrapper(recordk));
+ return R.data(detail);
+ }
+
+ /**
+ * 分页
+ */
+ @GetMapping("/list")
+ @ApiOperationSupport(order = 2)
+ @ApiOperation(value = "分页", notes = "传入recordk")
+ public R<IPage<Recordk>> list(Recordk recordk, Query query) {
+ IPage<Recordk> pages = recordkService.page(Condition.getPage(query), Condition.getQueryWrapper(recordk));
+ return R.data(pages);
+ }
+
+ /**
+ * 自定义分页
+ */
+ @GetMapping("/page")
+ @ApiOperationSupport(order = 3)
+ @ApiOperation(value = "分页", notes = "传入recordk")
+ public R<IPage<RecordkVO>> page(RecordkVO recordk, Query query) {
+ IPage<RecordkVO> pages = recordkService.selectRecordkPage(Condition.getPage(query), recordk);
+ return R.data(pages);
+ }
+
+ /**
+ * 新增
+ */
+ @PostMapping("/save")
+ @ApiOperationSupport(order = 4)
+ @ApiOperation(value = "新增", notes = "传入recordk")
+ public R save(@Valid @RequestBody Recordk recordk) {
+ return R.status(recordkService.save(recordk));
+ }
+
+ /**
+ * 修改
+ */
+ @PostMapping("/update")
+ @ApiOperationSupport(order = 5)
+ @ApiOperation(value = "修改", notes = "传入recordk")
+ public R update(@Valid @RequestBody Recordk recordk) {
+ return R.status(recordkService.updateById(recordk));
+ }
+
+ /**
+ * 新增或修改
+ */
+ @PostMapping("/submit")
+ @ApiOperationSupport(order = 6)
+ @ApiOperation(value = "新增或修改", notes = "传入recordk")
+ public R submit(@Valid @RequestBody Recordk recordk) {
+ return R.status(recordkService.saveOrUpdate(recordk));
+ }
+
+
+ /**
+ * 删除
+ */
+ @PostMapping("/remove")
+ @ApiOperationSupport(order = 8)
+ @ApiOperation(value = "删除", notes = "传入ids")
+ public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
+ return R.status(recordkService.removeByIds(Func.toLongList(ids)));
+ }
+
+
+}
diff --git a/src/main/java/org/springblade/modules/recordk/dto/RecordkDTO.java b/src/main/java/org/springblade/modules/recordk/dto/RecordkDTO.java
new file mode 100644
index 0000000..6917870
--- /dev/null
+++ b/src/main/java/org/springblade/modules/recordk/dto/RecordkDTO.java
@@ -0,0 +1,34 @@
+/*
+ * Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * Neither the name of the dreamlu.net developer nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ * Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.modules.recordk.dto;
+
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import org.springblade.modules.recordk.entity.Recordk;
+
+/**
+ * 数据传输对象实体类
+ *
+ * @author BladeX
+ * @since 2021-07-12
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+public class RecordkDTO extends Recordk {
+ private static final long serialVersionUID = 1L;
+
+}
diff --git a/src/main/java/org/springblade/modules/recordk/entity/Recordk.java b/src/main/java/org/springblade/modules/recordk/entity/Recordk.java
new file mode 100644
index 0000000..b910692
--- /dev/null
+++ b/src/main/java/org/springblade/modules/recordk/entity/Recordk.java
@@ -0,0 +1,151 @@
+/*
+ * Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * Neither the name of the dreamlu.net developer nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ * Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.modules.recordk.entity;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import org.springframework.format.annotation.DateTimeFormat;
+
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * 实体类
+ *
+ * @author BladeX
+ * @since 2021-07-12
+ */
+@Data
+@TableName("sys_recordk")
+@ApiModel(value = "Recordk对象", description = "Recordk对象")
+public class Recordk implements Serializable {
+
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * 统一社会信用代码
+ */
+ @ApiModelProperty(value = "统一社会信用代码")
+ @TableField("creditCode")
+ private String creditcode;
+ /**
+ * 企业名称
+ */
+ @ApiModelProperty(value = "企业名称")
+ @TableField("enterpriseName")
+ private String enterprisename;
+ /**
+ * 法定代表人
+ */
+ @ApiModelProperty(value = "法定代表人")
+ private String representative;
+ /**
+ * 成立日期
+ */
+ @ApiModelProperty(value = "成立日期")
+ @TableField("establishTime")
+ @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
+ @DateTimeFormat(pattern = "yyyy-MM-dd")
+ private Date establishtime;
+ /**
+ * 注册资本
+ */
+ @ApiModelProperty(value = "注册资本")
+ @TableField("registeredCapital")
+ private String registeredcapital;
+
+ /**
+ * 组织机构代码
+ */
+ @ApiModelProperty(value = "组织机构代码")
+ @TableField("organizationCode")
+ private String organizationcode;
+ /**
+ * 工商注册号
+ */
+ @ApiModelProperty(value = "工商注册号")
+ @TableField("registrationNumber")
+ private String registrationnumber;
+ /**
+ * 纳税人识别号
+ */
+ @ApiModelProperty(value = "纳税人识别号")
+ @TableField("identificationNumber")
+ private String identificationnumber;
+ /**
+ * 企业类型
+ */
+ @ApiModelProperty(value = "企业类型")
+ private String enterprises;
+ /**
+ * 注册地址
+ */
+ @ApiModelProperty(value = "注册地址")
+ private String address;
+ /**
+ * 经营范围
+ */
+ @ApiModelProperty(value = "经营范围")
+ private String business;
+ /**
+ * 所属地区
+ */
+ @ApiModelProperty(value = "所属地区")
+ private String region;
+ /**
+ * 登记机关
+ */
+ @ApiModelProperty(value = "登记机关")
+ private String registration;
+ /**
+ * 所属行业
+ */
+ @ApiModelProperty(value = "所属行业")
+ private String industry;
+ /**
+ * 状态 0:审核通过 1:审核不通过 2: 审核中
+ */
+ @ApiModelProperty(value = "状态 0:审核通过 1:审核不通过 2: 审核中")
+ private String type;
+ /**
+ * 保安服务单位许可编号
+ */
+ @ApiModelProperty(value = "保安服务单位许可编号")
+ private String perid;
+ /**
+ * 许可发证机关
+ */
+ @ApiModelProperty(value = "许可发证机关")
+ private String offices;
+ /**
+ * 发证时间
+ */
+ @ApiModelProperty(value = "发证时间")
+ @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
+ @DateTimeFormat(pattern = "yyyy-MM-dd")
+ private Date officetime;
+ @TableId(value = "id", type = IdType.AUTO)
+ private Integer id;
+
+
+}
diff --git a/src/main/java/org/springblade/modules/recordk/mapper/RecordkMapper.java b/src/main/java/org/springblade/modules/recordk/mapper/RecordkMapper.java
new file mode 100644
index 0000000..242a45f
--- /dev/null
+++ b/src/main/java/org/springblade/modules/recordk/mapper/RecordkMapper.java
@@ -0,0 +1,43 @@
+/*
+ * Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * Neither the name of the dreamlu.net developer nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ * Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.modules.recordk.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import org.springblade.modules.recordk.entity.Recordk;
+import org.springblade.modules.recordk.vo.RecordkVO;
+
+import java.util.List;
+
+/**
+ * Mapper 接口
+ *
+ * @author BladeX
+ * @since 2021-07-12
+ */
+public interface RecordkMapper extends BaseMapper<Recordk> {
+
+ /**
+ * 自定义分页
+ *
+ * @param page
+ * @param recordk
+ * @return
+ */
+ List<RecordkVO> selectRecordkPage(IPage page, RecordkVO recordk);
+
+}
diff --git a/src/main/java/org/springblade/modules/recordk/mapper/RecordkMapper.xml b/src/main/java/org/springblade/modules/recordk/mapper/RecordkMapper.xml
new file mode 100644
index 0000000..107e9a2
--- /dev/null
+++ b/src/main/java/org/springblade/modules/recordk/mapper/RecordkMapper.xml
@@ -0,0 +1,33 @@
+<?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="org.springblade.modules.recordk.mapper.RecordkMapper">
+
+ <!-- 通用查询映射结果 -->
+ <resultMap id="recordkResultMap" type="org.springblade.modules.recordk.entity.Recordk">
+ <id column="id" property="id"/>
+ <result column="creditCode" property="creditcode"/>
+ <result column="enterpriseName" property="enterprisename"/>
+ <result column="representative" property="representative"/>
+ <result column="establishTime" property="establishtime"/>
+ <result column="registeredCapital" property="registeredcapital"/>
+ <result column="organizationCode" property="organizationcode"/>
+ <result column="registrationNumber" property="registrationnumber"/>
+ <result column="identificationNumber" property="identificationnumber"/>
+ <result column="enterprises" property="enterprises"/>
+ <result column="address" property="address"/>
+ <result column="business" property="business"/>
+ <result column="region" property="region"/>
+ <result column="registration" property="registration"/>
+ <result column="industry" property="industry"/>
+ <result column="type" property="type"/>
+ <result column="perid" property="perid"/>
+ <result column="offices" property="offices"/>
+ <result column="officetime" property="officetime"/>
+ </resultMap>
+
+
+ <select id="selectRecordkPage" resultMap="recordkResultMap">
+ select * from sys_recordk
+ </select>
+
+</mapper>
diff --git a/src/main/java/org/springblade/modules/recordk/service/IRecordkService.java b/src/main/java/org/springblade/modules/recordk/service/IRecordkService.java
new file mode 100644
index 0000000..93d7917
--- /dev/null
+++ b/src/main/java/org/springblade/modules/recordk/service/IRecordkService.java
@@ -0,0 +1,41 @@
+/*
+ * Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * Neither the name of the dreamlu.net developer nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ * Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.modules.recordk.service;
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.service.IService;
+import org.springblade.modules.recordk.entity.Recordk;
+import org.springblade.modules.recordk.vo.RecordkVO;
+
+/**
+ * 服务类
+ *
+ * @author BladeX
+ * @since 2021-07-12
+ */
+public interface IRecordkService extends IService<Recordk> {
+
+ /**
+ * 自定义分页
+ *
+ * @param page
+ * @param recordk
+ * @return
+ */
+ IPage<RecordkVO> selectRecordkPage(IPage<RecordkVO> page, RecordkVO recordk);
+
+}
diff --git a/src/main/java/org/springblade/modules/recordk/service/impl/RecordkServiceImpl.java b/src/main/java/org/springblade/modules/recordk/service/impl/RecordkServiceImpl.java
new file mode 100644
index 0000000..7bd33ca
--- /dev/null
+++ b/src/main/java/org/springblade/modules/recordk/service/impl/RecordkServiceImpl.java
@@ -0,0 +1,41 @@
+/*
+ * Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * Neither the name of the dreamlu.net developer nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ * Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.modules.recordk.service.impl;
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springblade.modules.recordk.entity.Recordk;
+import org.springblade.modules.recordk.mapper.RecordkMapper;
+import org.springblade.modules.recordk.service.IRecordkService;
+import org.springblade.modules.recordk.vo.RecordkVO;
+import org.springframework.stereotype.Service;
+
+/**
+ * 服务实现类
+ *
+ * @author BladeX
+ * @since 2021-07-12
+ */
+@Service
+public class RecordkServiceImpl extends ServiceImpl<RecordkMapper, Recordk> implements IRecordkService {
+
+ @Override
+ public IPage<RecordkVO> selectRecordkPage(IPage<RecordkVO> page, RecordkVO recordk) {
+ return page.setRecords(baseMapper.selectRecordkPage(page, recordk));
+ }
+
+}
diff --git a/src/main/java/org/springblade/modules/recordk/vo/RecordkVO.java b/src/main/java/org/springblade/modules/recordk/vo/RecordkVO.java
new file mode 100644
index 0000000..747dfa8
--- /dev/null
+++ b/src/main/java/org/springblade/modules/recordk/vo/RecordkVO.java
@@ -0,0 +1,36 @@
+/*
+ * Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * Neither the name of the dreamlu.net developer nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ * Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.modules.recordk.vo;
+
+import io.swagger.annotations.ApiModel;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import org.springblade.modules.recordk.entity.Recordk;
+
+/**
+ * 视图实体类
+ *
+ * @author BladeX
+ * @since 2021-07-12
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+@ApiModel(value = "RecordkVO对象", description = "RecordkVO对象")
+public class RecordkVO extends Recordk {
+ private static final long serialVersionUID = 1L;
+
+}
diff --git a/src/main/java/org/springblade/modules/revoke/controller/RevokeController.java b/src/main/java/org/springblade/modules/revoke/controller/RevokeController.java
new file mode 100644
index 0000000..93efee9
--- /dev/null
+++ b/src/main/java/org/springblade/modules/revoke/controller/RevokeController.java
@@ -0,0 +1,126 @@
+/*
+ * Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * Neither the name of the dreamlu.net developer nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ * Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.modules.revoke.controller;
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import io.swagger.annotations.ApiParam;
+import lombok.AllArgsConstructor;
+import org.springblade.core.boot.ctrl.BladeController;
+import org.springblade.core.mp.support.Condition;
+import org.springblade.core.mp.support.Query;
+import org.springblade.core.tool.api.R;
+import org.springblade.core.tool.utils.Func;
+import org.springblade.modules.revoke.entity.Revoke;
+import org.springblade.modules.revoke.service.IRevokeService;
+import org.springblade.modules.revoke.vo.RevokeVO;
+import org.springframework.web.bind.annotation.*;
+
+import javax.validation.Valid;
+
+/**
+ * 控制器
+ *
+ * @author BladeX
+ * @since 2021-07-12
+ */
+@RestController
+@AllArgsConstructor
+@RequestMapping("/revoke")
+@Api(value = "", tags = "接口")
+public class RevokeController extends BladeController {
+
+ private final IRevokeService revokeService;
+
+ /**
+ * 详情
+ */
+ @GetMapping("/detail")
+ @ApiOperationSupport(order = 1)
+ @ApiOperation(value = "详情", notes = "传入revoke")
+ public R<Revoke> detail(Revoke revoke) {
+ Revoke detail = revokeService.getOne(Condition.getQueryWrapper(revoke));
+ return R.data(detail);
+ }
+
+ /**
+ * 分页
+ */
+ @GetMapping("/list")
+ @ApiOperationSupport(order = 2)
+ @ApiOperation(value = "分页", notes = "传入revoke")
+ public R<IPage<Revoke>> list(Revoke revoke, Query query) {
+ IPage<Revoke> pages = revokeService.page(Condition.getPage(query), Condition.getQueryWrapper(revoke));
+ return R.data(pages);
+ }
+
+ /**
+ * 自定义分页
+ */
+ @GetMapping("/page")
+ @ApiOperationSupport(order = 3)
+ @ApiOperation(value = "分页", notes = "传入revoke")
+ public R<IPage<RevokeVO>> page(RevokeVO revoke, Query query) {
+ IPage<RevokeVO> pages = revokeService.selectRevokePage(Condition.getPage(query), revoke);
+ return R.data(pages);
+ }
+
+ /**
+ * 新增
+ */
+ @PostMapping("/save")
+ @ApiOperationSupport(order = 4)
+ @ApiOperation(value = "新增", notes = "传入revoke")
+ public R save(@Valid @RequestBody Revoke revoke) {
+ return R.status(revokeService.save(revoke));
+ }
+
+ /**
+ * 修改
+ */
+ @PostMapping("/update")
+ @ApiOperationSupport(order = 5)
+ @ApiOperation(value = "修改", notes = "传入revoke")
+ public R update(@Valid @RequestBody Revoke revoke) {
+ return R.status(revokeService.updateById(revoke));
+ }
+
+ /**
+ * 新增或修改
+ */
+ @PostMapping("/submit")
+ @ApiOperationSupport(order = 6)
+ @ApiOperation(value = "新增或修改", notes = "传入revoke")
+ public R submit(@Valid @RequestBody Revoke revoke) {
+ return R.status(revokeService.saveOrUpdate(revoke));
+ }
+
+
+ /**
+ * 删除
+ */
+ @PostMapping("/remove")
+ @ApiOperationSupport(order = 8)
+ @ApiOperation(value = "删除", notes = "传入ids")
+ public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
+ return R.status(revokeService.removeByIds(Func.toLongList(ids)));
+ }
+
+
+}
diff --git a/src/main/java/org/springblade/modules/revoke/dto/RevokeDTO.java b/src/main/java/org/springblade/modules/revoke/dto/RevokeDTO.java
new file mode 100644
index 0000000..35fbffd
--- /dev/null
+++ b/src/main/java/org/springblade/modules/revoke/dto/RevokeDTO.java
@@ -0,0 +1,34 @@
+/*
+ * Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * Neither the name of the dreamlu.net developer nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ * Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.modules.revoke.dto;
+
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import org.springblade.modules.revoke.entity.Revoke;
+
+/**
+ * 数据传输对象实体类
+ *
+ * @author BladeX
+ * @since 2021-07-12
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+public class RevokeDTO extends Revoke {
+ private static final long serialVersionUID = 1L;
+
+}
diff --git a/src/main/java/org/springblade/modules/revoke/entity/Revoke.java b/src/main/java/org/springblade/modules/revoke/entity/Revoke.java
new file mode 100644
index 0000000..a2e58a4
--- /dev/null
+++ b/src/main/java/org/springblade/modules/revoke/entity/Revoke.java
@@ -0,0 +1,141 @@
+/*
+ * Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * Neither the name of the dreamlu.net developer nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ * Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.modules.revoke.entity;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import org.springframework.format.annotation.DateTimeFormat;
+
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * 实体类
+ *
+ * @author BladeX
+ * @since 2021-07-12
+ */
+@Data
+@TableName("sys_revoke")
+@ApiModel(value = "Revoke对象", description = "Revoke对象")
+public class Revoke implements Serializable {
+
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * 统一社会信用代码
+ */
+ @ApiModelProperty(value = "统一社会信用代码")
+ @TableField("creditCode")
+ private String creditcode;
+ /**
+ * 企业名称
+ */
+ @ApiModelProperty(value = "企业名称")
+ @TableField("enterpriseName")
+ private String enterprisename;
+ /**
+ * 法定代表人
+ */
+ @ApiModelProperty(value = "法定代表人")
+ private String representative;
+ /**
+ * 成立日期
+ */
+ @ApiModelProperty(value = "成立日期")
+ @TableField("establishTime")
+ @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
+ @DateTimeFormat(pattern = "yyyy-MM-dd")
+ private Date establishtime;
+ /**
+ * 注册资本
+ */
+ @ApiModelProperty(value = "注册资本")
+ @TableField("registeredCapital")
+ private String registeredcapital;
+ /**
+ * 组织机构代码
+ */
+ @ApiModelProperty(value = "组织机构代码")
+ @TableField("organizationCode")
+ private String organizationcode;
+ /**
+ * 工商注册号
+ */
+ @ApiModelProperty(value = "工商注册号")
+ @TableField("registrationNumber")
+ private String registrationnumber;
+ /**
+ * 纳税人识别号
+ */
+ @ApiModelProperty(value = "纳税人识别号")
+ @TableField("identificationNumber")
+ private String identificationnumber;
+ /**
+ * 企业类型
+ */
+ @ApiModelProperty(value = "企业类型")
+ private String enterprises;
+ /**
+ * 注册地址
+ */
+ @ApiModelProperty(value = "注册地址")
+ private String address;
+ /**
+ * 经营范围
+ */
+ @ApiModelProperty(value = "经营范围")
+ private String business;
+ /**
+ * 所属地区
+ */
+ @ApiModelProperty(value = "所属地区")
+ private String region;
+ /**
+ * 登记机关
+ */
+ @ApiModelProperty(value = "登记机关")
+ private String registration;
+ /**
+ * 所属行业
+ */
+ @ApiModelProperty(value = "所属行业")
+ private String industry;
+ /**
+ * 状态 0:撤销通过 1:撤销不通过 2: 撤销中
+ */
+ @ApiModelProperty(value = "状态 0:撤销通过 1:撤销不通过 2: 撤销中")
+ private String type;
+ /**
+ * 撤销原因
+ */
+ @ApiModelProperty(value = "撤销原因")
+ private String reason;
+ @TableId(value = "id", type = IdType.AUTO)
+ private Integer id;
+
+ @ApiModelProperty(value = "撤销日期")
+ @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
+ @DateTimeFormat(pattern = "yyyy-MM-dd")
+ private Date ctime;
+}
diff --git a/src/main/java/org/springblade/modules/revoke/mapper/RevokeMapper.java b/src/main/java/org/springblade/modules/revoke/mapper/RevokeMapper.java
new file mode 100644
index 0000000..97bfa9b
--- /dev/null
+++ b/src/main/java/org/springblade/modules/revoke/mapper/RevokeMapper.java
@@ -0,0 +1,43 @@
+/*
+ * Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * Neither the name of the dreamlu.net developer nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ * Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.modules.revoke.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import org.springblade.modules.revoke.entity.Revoke;
+import org.springblade.modules.revoke.vo.RevokeVO;
+
+import java.util.List;
+
+/**
+ * Mapper 接口
+ *
+ * @author BladeX
+ * @since 2021-07-12
+ */
+public interface RevokeMapper extends BaseMapper<Revoke> {
+
+ /**
+ * 自定义分页
+ *
+ * @param page
+ * @param revoke
+ * @return
+ */
+ List<RevokeVO> selectRevokePage(IPage page, RevokeVO revoke);
+
+}
diff --git a/src/main/java/org/springblade/modules/revoke/mapper/RevokeMapper.xml b/src/main/java/org/springblade/modules/revoke/mapper/RevokeMapper.xml
new file mode 100644
index 0000000..888bf58
--- /dev/null
+++ b/src/main/java/org/springblade/modules/revoke/mapper/RevokeMapper.xml
@@ -0,0 +1,32 @@
+<?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="org.springblade.modules.revoke.mapper.RevokeMapper">
+
+ <!-- 通用查询映射结果 -->
+ <resultMap id="revokeResultMap" type="org.springblade.modules.revoke.entity.Revoke">
+ <id column="id" property="id"/>
+ <result column="creditCode" property="creditcode"/>
+ <result column="enterpriseName" property="enterprisename"/>
+ <result column="representative" property="representative"/>
+ <result column="establishTime" property="establishtime"/>
+ <result column="registeredCapital" property="registeredcapital"/>
+ <result column="organizationCode" property="organizationcode"/>
+ <result column="registrationNumber" property="registrationnumber"/>
+ <result column="identificationNumber" property="identificationnumber"/>
+ <result column="enterprises" property="enterprises"/>
+ <result column="address" property="address"/>
+ <result column="business" property="business"/>
+ <result column="region" property="region"/>
+ <result column="registration" property="registration"/>
+ <result column="industry" property="industry"/>
+ <result column="type" property="type"/>
+ <result column="reason" property="reason"/>
+ <result column="ctime" property="ctime"/>
+ </resultMap>
+
+
+ <select id="selectRevokePage" resultMap="revokeResultMap">
+ select * from sys_revoke
+ </select>
+
+</mapper>
diff --git a/src/main/java/org/springblade/modules/revoke/service/IRevokeService.java b/src/main/java/org/springblade/modules/revoke/service/IRevokeService.java
new file mode 100644
index 0000000..b606162
--- /dev/null
+++ b/src/main/java/org/springblade/modules/revoke/service/IRevokeService.java
@@ -0,0 +1,41 @@
+/*
+ * Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * Neither the name of the dreamlu.net developer nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ * Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.modules.revoke.service;
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.service.IService;
+import org.springblade.modules.revoke.entity.Revoke;
+import org.springblade.modules.revoke.vo.RevokeVO;
+
+/**
+ * 服务类
+ *
+ * @author BladeX
+ * @since 2021-07-12
+ */
+public interface IRevokeService extends IService<Revoke> {
+
+ /**
+ * 自定义分页
+ *
+ * @param page
+ * @param revoke
+ * @return
+ */
+ IPage<RevokeVO> selectRevokePage(IPage<RevokeVO> page, RevokeVO revoke);
+
+}
diff --git a/src/main/java/org/springblade/modules/revoke/service/impl/RevokeServiceImpl.java b/src/main/java/org/springblade/modules/revoke/service/impl/RevokeServiceImpl.java
new file mode 100644
index 0000000..db83ad2
--- /dev/null
+++ b/src/main/java/org/springblade/modules/revoke/service/impl/RevokeServiceImpl.java
@@ -0,0 +1,41 @@
+/*
+ * Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * Neither the name of the dreamlu.net developer nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ * Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.modules.revoke.service.impl;
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springblade.modules.revoke.entity.Revoke;
+import org.springblade.modules.revoke.mapper.RevokeMapper;
+import org.springblade.modules.revoke.service.IRevokeService;
+import org.springblade.modules.revoke.vo.RevokeVO;
+import org.springframework.stereotype.Service;
+
+/**
+ * 服务实现类
+ *
+ * @author BladeX
+ * @since 2021-07-12
+ */
+@Service
+public class RevokeServiceImpl extends ServiceImpl<RevokeMapper, Revoke> implements IRevokeService {
+
+ @Override
+ public IPage<RevokeVO> selectRevokePage(IPage<RevokeVO> page, RevokeVO revoke) {
+ return page.setRecords(baseMapper.selectRevokePage(page, revoke));
+ }
+
+}
diff --git a/src/main/java/org/springblade/modules/revoke/vo/RevokeVO.java b/src/main/java/org/springblade/modules/revoke/vo/RevokeVO.java
new file mode 100644
index 0000000..2d1dcbc
--- /dev/null
+++ b/src/main/java/org/springblade/modules/revoke/vo/RevokeVO.java
@@ -0,0 +1,36 @@
+/*
+ * Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * Neither the name of the dreamlu.net developer nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ * Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.modules.revoke.vo;
+
+import io.swagger.annotations.ApiModel;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import org.springblade.modules.revoke.entity.Revoke;
+
+/**
+ * 视图实体类
+ *
+ * @author BladeX
+ * @since 2021-07-12
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+@ApiModel(value = "RevokeVO对象", description = "RevokeVO对象")
+public class RevokeVO extends Revoke {
+ private static final long serialVersionUID = 1L;
+
+}
--
Gitblit v1.9.3