From 4b5490eec63382dfdb548de676464d9a2a15043f Mon Sep 17 00:00:00 2001
From: tangzy <tangzy123456>
Date: Sat, 08 Jan 2022 14:14:44 +0800
Subject: [PATCH] 1.积分,行业政策,组织申请

---
 src/main/java/org/springblade/modules/integral/vo/IntegralVO.java                    |   36 +
 src/main/java/org/springblade/modules/policy/vo/PolicyVO.java                        |   36 +
 src/main/java/org/springblade/modules/organ/vo/OrganVO.java                          |   36 +
 src/main/java/org/springblade/modules/policy/controller/PolicyController.java        |  127 ++++++
 src/main/java/org/springblade/modules/integral/mapper/IntegralMapper.java            |   43 ++
 src/main/java/org/springblade/modules/organ/entity/Organ.java                        |   70 +++
 src/main/java/org/springblade/modules/integral/service/IIntegralService.java         |   41 +
 src/main/java/org/springblade/modules/policy/entity/Policy.java                      |   66 +++
 src/main/java/org/springblade/modules/organ/dto/OrganDTO.java                        |   34 +
 src/main/java/org/springblade/modules/organ/mapper/OrganMapper.xml                   |   23 +
 src/main/java/org/springblade/modules/policy/mapper/PolicyMapper.java                |   43 ++
 src/main/java/org/springblade/modules/policy/service/IPolicyService.java             |   41 +
 src/main/java/org/springblade/modules/organ/controller/OrganController.java          |  127 ++++++
 src/main/java/org/springblade/modules/organ/mapper/OrganMapper.java                  |   43 ++
 src/main/java/org/springblade/modules/organ/service/IOrganService.java               |   41 +
 src/main/java/org/springblade/modules/organ/service/impl/OrganServiceImpl.java       |   41 +
 src/main/java/org/springblade/modules/integral/entity/Integral.java                  |   68 +++
 src/main/java/org/springblade/modules/policy/dto/PolicyDTO.java                      |   34 +
 src/main/java/org/springblade/modules/policy/service/impl/PolicyServiceImpl.java     |   41 +
 src/main/java/org/springblade/modules/integral/mapper/IntegralMapper.xml             |   26 +
 src/main/java/org/springblade/modules/policy/mapper/PolicyMapper.xml                 |   19 
 src/main/java/org/springblade/modules/integral/dto/IntegralDTO.java                  |   34 +
 src/main/java/org/springblade/common/config/BladeConfiguration.java                  |    3 
 src/main/java/org/springblade/modules/integral/controller/IntegralController.java    |  138 ++++++
 src/main/java/org/springblade/modules/integral/service/impl/IntegralServiceImpl.java |   46 ++
 25 files changed, 1,257 insertions(+), 0 deletions(-)

diff --git a/src/main/java/org/springblade/common/config/BladeConfiguration.java b/src/main/java/org/springblade/common/config/BladeConfiguration.java
index cc574dd..45a60ee 100644
--- a/src/main/java/org/springblade/common/config/BladeConfiguration.java
+++ b/src/main/java/org/springblade/common/config/BladeConfiguration.java
@@ -105,6 +105,9 @@
 		secureRegistry.excludePathPatterns("/taskfk/**");
 		secureRegistry.excludePathPatterns("/sensitiveword/**");
 		secureRegistry.excludePathPatterns("/trar/**");
+		secureRegistry.excludePathPatterns("/integral/**");
+		secureRegistry.excludePathPatterns("/organ/**");
+		secureRegistry.excludePathPatterns("/policy/**");
 		return secureRegistry;
 	}
 
diff --git a/src/main/java/org/springblade/modules/integral/controller/IntegralController.java b/src/main/java/org/springblade/modules/integral/controller/IntegralController.java
new file mode 100644
index 0000000..67474a2
--- /dev/null
+++ b/src/main/java/org/springblade/modules/integral/controller/IntegralController.java
@@ -0,0 +1,138 @@
+/*
+ *      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.integral.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.integral.entity.Integral;
+import org.springblade.modules.integral.service.IIntegralService;
+import org.springblade.modules.integral.vo.IntegralVO;
+import org.springframework.web.bind.annotation.*;
+
+import javax.validation.Valid;
+
+/**
+ * 控制器
+ * 积分
+ *
+ * @author BladeX
+ * @since 2022-01-08
+ */
+@RestController
+@AllArgsConstructor
+@RequestMapping("/integral")
+@Api(value = "", tags = "接口")
+public class IntegralController extends BladeController {
+
+	private final IIntegralService integralService;
+
+	/**
+	 * 详情
+	 */
+	@GetMapping("/detail")
+	@ApiOperationSupport(order = 1)
+	@ApiOperation(value = "详情", notes = "传入integral")
+	public R<Integral> detail(Integral integral) {
+		Integral detail = integralService.getOne(Condition.getQueryWrapper(integral));
+		return R.data(detail);
+	}
+
+	/**
+	 * 分页
+	 */
+	@GetMapping("/list")
+	@ApiOperationSupport(order = 2)
+	@ApiOperation(value = "分页", notes = "传入integral")
+	public R<IPage<Integral>> list(Integral integral, Query query) {
+		IPage<Integral> pages = integralService.page(Condition.getPage(query), Condition.getQueryWrapper(integral));
+		return R.data(pages);
+	}
+
+	/**
+	 * 自定义分页
+	 */
+	@GetMapping("/page")
+	@ApiOperationSupport(order = 3)
+	@ApiOperation(value = "分页", notes = "传入integral")
+	public R<IPage<IntegralVO>> page(IntegralVO integral, Query query) {
+		IPage<IntegralVO> pages = integralService.selectIntegralPage(Condition.getPage(query), integral);
+		return R.data(pages);
+	}
+
+	/**
+	 * 新增
+	 */
+	@PostMapping("/save")
+	@ApiOperationSupport(order = 4)
+	@ApiOperation(value = "新增", notes = "传入integral")
+	public R save(@Valid @RequestBody Integral integral) {
+		return R.status(integralService.save(integral));
+	}
+
+	/**
+	 * 修改
+	 */
+	@PostMapping("/update")
+	@ApiOperationSupport(order = 5)
+	@ApiOperation(value = "修改", notes = "传入integral")
+	public R update(@Valid @RequestBody Integral integral) {
+		return R.status(integralService.updateById(integral));
+	}
+
+	/**
+	 * 新增或修改
+	 */
+	@PostMapping("/submit")
+	@ApiOperationSupport(order = 6)
+	@ApiOperation(value = "新增或修改", notes = "传入integral")
+	public R submit(@Valid @RequestBody Integral integral) {
+		return R.status(integralService.saveOrUpdate(integral));
+	}
+
+
+	/**
+	 * 删除
+	 */
+	@PostMapping("/remove")
+	@ApiOperationSupport(order = 8)
+	@ApiOperation(value = "删除", notes = "传入ids")
+	public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
+		return R.status(integralService.removeByIds(Func.toLongList(ids)));
+	}
+
+	/**
+	 * 通过用户id查询总积分
+	 *
+	 * @param uid
+	 * @return
+	 */
+	@PostMapping("/selectCount")
+	public R selectCount(String uid) {
+		return R.data(integralService.selectCount(uid));
+	}
+
+
+}
diff --git a/src/main/java/org/springblade/modules/integral/dto/IntegralDTO.java b/src/main/java/org/springblade/modules/integral/dto/IntegralDTO.java
new file mode 100644
index 0000000..c3d6c87
--- /dev/null
+++ b/src/main/java/org/springblade/modules/integral/dto/IntegralDTO.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.integral.dto;
+
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import org.springblade.modules.integral.entity.Integral;
+
+/**
+ * 数据传输对象实体类
+ *
+ * @author BladeX
+ * @since 2022-01-08
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+public class IntegralDTO extends Integral {
+	private static final long serialVersionUID = 1L;
+
+}
diff --git a/src/main/java/org/springblade/modules/integral/entity/Integral.java b/src/main/java/org/springblade/modules/integral/entity/Integral.java
new file mode 100644
index 0000000..6488fca
--- /dev/null
+++ b/src/main/java/org/springblade/modules/integral/entity/Integral.java
@@ -0,0 +1,68 @@
+/*
+ *      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.integral.entity;
+
+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 2022-01-08
+ */
+@Data
+@TableName("sys_integral")
+@ApiModel(value = "Integral对象", description = "Integral对象")
+public class Integral implements Serializable {
+
+	private static final long serialVersionUID = 1L;
+
+	private Integer id;
+	/**
+	 * 用户id
+	 */
+	@ApiModelProperty(value = "用户id")
+	private Integer uid;
+	/**
+	 * 获取途径
+	 */
+	@ApiModelProperty(value = "获取途径")
+	private String access;
+	/**
+	 * 获取时间
+	 */
+	@ApiModelProperty(value = "获取时间")
+	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+	@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+	private Date time;
+	/**
+	 * 积分
+	 */
+	@ApiModelProperty(value = "积分")
+	private Integer integral;
+
+
+}
diff --git a/src/main/java/org/springblade/modules/integral/mapper/IntegralMapper.java b/src/main/java/org/springblade/modules/integral/mapper/IntegralMapper.java
new file mode 100644
index 0000000..01efffa
--- /dev/null
+++ b/src/main/java/org/springblade/modules/integral/mapper/IntegralMapper.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.integral.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import org.springblade.modules.integral.entity.Integral;
+import org.springblade.modules.integral.vo.IntegralVO;
+
+import java.util.List;
+
+/**
+ *  Mapper 接口
+ *
+ * @author BladeX
+ * @since 2022-01-08
+ */
+public interface IntegralMapper extends BaseMapper<Integral> {
+
+	/**
+	 * 自定义分页
+	 *
+	 * @param page
+	 * @param integral
+	 * @return
+	 */
+	List<IntegralVO> selectIntegralPage(IPage page, IntegralVO integral);
+	String selectCount(String uid);
+}
diff --git a/src/main/java/org/springblade/modules/integral/mapper/IntegralMapper.xml b/src/main/java/org/springblade/modules/integral/mapper/IntegralMapper.xml
new file mode 100644
index 0000000..495b51a
--- /dev/null
+++ b/src/main/java/org/springblade/modules/integral/mapper/IntegralMapper.xml
@@ -0,0 +1,26 @@
+<?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.integral.mapper.IntegralMapper">
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="integralResultMap" type="org.springblade.modules.integral.entity.Integral">
+        <id column="id" property="id"/>
+        <result column="uid" property="uid"/>
+        <result column="access" property="access"/>
+        <result column="time" property="time"/>
+        <result column="integral" property="integral"/>
+    </resultMap>
+
+
+    <select id="selectIntegralPage" resultMap="integralResultMap">
+        select *
+        from sys_integral
+        where is_deleted = 0
+    </select>
+
+    <select id="selectCount" resultType="java.lang.String">
+        SELECT COALESCE(sum(integral), 0) as integral
+        FROM sys_integral where  uid=#{uid}
+    </select>
+
+</mapper>
diff --git a/src/main/java/org/springblade/modules/integral/service/IIntegralService.java b/src/main/java/org/springblade/modules/integral/service/IIntegralService.java
new file mode 100644
index 0000000..54842a1
--- /dev/null
+++ b/src/main/java/org/springblade/modules/integral/service/IIntegralService.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.integral.service;
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.service.IService;
+import org.springblade.modules.integral.entity.Integral;
+import org.springblade.modules.integral.vo.IntegralVO;
+
+/**
+ *  服务类
+ *
+ * @author BladeX
+ * @since 2022-01-08
+ */
+public interface IIntegralService extends IService<Integral> {
+
+	/**
+	 * 自定义分页
+	 *
+	 * @param page
+	 * @param integral
+	 * @return
+	 */
+	IPage<IntegralVO> selectIntegralPage(IPage<IntegralVO> page, IntegralVO integral);
+	String selectCount(String uid);
+}
diff --git a/src/main/java/org/springblade/modules/integral/service/impl/IntegralServiceImpl.java b/src/main/java/org/springblade/modules/integral/service/impl/IntegralServiceImpl.java
new file mode 100644
index 0000000..73b0a9c
--- /dev/null
+++ b/src/main/java/org/springblade/modules/integral/service/impl/IntegralServiceImpl.java
@@ -0,0 +1,46 @@
+/*
+ *      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.integral.service.impl;
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springblade.modules.integral.entity.Integral;
+import org.springblade.modules.integral.mapper.IntegralMapper;
+import org.springblade.modules.integral.service.IIntegralService;
+import org.springblade.modules.integral.vo.IntegralVO;
+import org.springframework.stereotype.Service;
+
+/**
+ *  服务实现类
+ *
+ * @author BladeX
+ * @since 2022-01-08
+ */
+@Service
+public class IntegralServiceImpl extends ServiceImpl<IntegralMapper, Integral> implements IIntegralService {
+
+	@Override
+	public IPage<IntegralVO> selectIntegralPage(IPage<IntegralVO> page, IntegralVO integral) {
+		return page.setRecords(baseMapper.selectIntegralPage(page, integral));
+	}
+
+	@Override
+	public String selectCount(String uid) {
+		return baseMapper.selectCount(uid);
+	}
+
+}
diff --git a/src/main/java/org/springblade/modules/integral/vo/IntegralVO.java b/src/main/java/org/springblade/modules/integral/vo/IntegralVO.java
new file mode 100644
index 0000000..2fc6dff
--- /dev/null
+++ b/src/main/java/org/springblade/modules/integral/vo/IntegralVO.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.integral.vo;
+
+import io.swagger.annotations.ApiModel;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import org.springblade.modules.integral.entity.Integral;
+
+/**
+ * 视图实体类
+ *
+ * @author BladeX
+ * @since 2022-01-08
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+@ApiModel(value = "IntegralVO对象", description = "IntegralVO对象")
+public class IntegralVO extends Integral {
+	private static final long serialVersionUID = 1L;
+
+}
diff --git a/src/main/java/org/springblade/modules/organ/controller/OrganController.java b/src/main/java/org/springblade/modules/organ/controller/OrganController.java
new file mode 100644
index 0000000..0dd4cf4
--- /dev/null
+++ b/src/main/java/org/springblade/modules/organ/controller/OrganController.java
@@ -0,0 +1,127 @@
+/*
+ *      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.organ.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.organ.entity.Organ;
+import org.springblade.modules.organ.service.IOrganService;
+import org.springblade.modules.organ.vo.OrganVO;
+import org.springframework.web.bind.annotation.*;
+
+import javax.validation.Valid;
+
+/**
+ *  控制器
+ *组织
+ * @author BladeX
+ * @since 2022-01-08
+ */
+@RestController
+@AllArgsConstructor
+@RequestMapping("/organ")
+@Api(value = "", tags = "接口")
+public class OrganController extends BladeController {
+
+	private final IOrganService organService;
+
+	/**
+	 * 详情
+	 */
+	@GetMapping("/detail")
+	@ApiOperationSupport(order = 1)
+	@ApiOperation(value = "详情", notes = "传入organ")
+	public R<Organ> detail(Organ organ) {
+		Organ detail = organService.getOne(Condition.getQueryWrapper(organ));
+		return R.data(detail);
+	}
+
+	/**
+	 * 分页
+	 */
+	@GetMapping("/list")
+	@ApiOperationSupport(order = 2)
+	@ApiOperation(value = "分页", notes = "传入organ")
+	public R<IPage<Organ>> list(Organ organ, Query query) {
+		IPage<Organ> pages = organService.page(Condition.getPage(query), Condition.getQueryWrapper(organ));
+		return R.data(pages);
+	}
+
+	/**
+	 * 自定义分页
+	 */
+	@GetMapping("/page")
+	@ApiOperationSupport(order = 3)
+	@ApiOperation(value = "分页", notes = "传入organ")
+	public R<IPage<OrganVO>> page(OrganVO organ, Query query) {
+		IPage<OrganVO> pages = organService.selectOrganPage(Condition.getPage(query), organ);
+		return R.data(pages);
+	}
+
+	/**
+	 * 新增
+	 */
+	@PostMapping("/save")
+	@ApiOperationSupport(order = 4)
+	@ApiOperation(value = "新增", notes = "传入organ")
+	public R save(@Valid @RequestBody Organ organ) {
+		return R.status(organService.save(organ));
+	}
+
+	/**
+	 * 修改
+	 */
+	@PostMapping("/update")
+	@ApiOperationSupport(order = 5)
+	@ApiOperation(value = "修改", notes = "传入organ")
+	public R update(@Valid @RequestBody Organ organ) {
+		return R.status(organService.updateById(organ));
+	}
+
+	/**
+	 * 新增或修改
+	 */
+	@PostMapping("/submit")
+	@ApiOperationSupport(order = 6)
+	@ApiOperation(value = "新增或修改", notes = "传入organ")
+	public R submit(@Valid @RequestBody Organ organ) {
+		return R.status(organService.saveOrUpdate(organ));
+	}
+
+
+	/**
+	 * 删除
+	 */
+	@PostMapping("/remove")
+	@ApiOperationSupport(order = 8)
+	@ApiOperation(value = "删除", notes = "传入ids")
+	public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
+		return R.status(organService.removeByIds(Func.toLongList(ids)));
+	}
+
+
+
+}
diff --git a/src/main/java/org/springblade/modules/organ/dto/OrganDTO.java b/src/main/java/org/springblade/modules/organ/dto/OrganDTO.java
new file mode 100644
index 0000000..648327d
--- /dev/null
+++ b/src/main/java/org/springblade/modules/organ/dto/OrganDTO.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.organ.dto;
+
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import org.springblade.modules.organ.entity.Organ;
+
+/**
+ * 数据传输对象实体类
+ *
+ * @author BladeX
+ * @since 2022-01-08
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+public class OrganDTO extends Organ {
+	private static final long serialVersionUID = 1L;
+
+}
diff --git a/src/main/java/org/springblade/modules/organ/entity/Organ.java b/src/main/java/org/springblade/modules/organ/entity/Organ.java
new file mode 100644
index 0000000..1320950
--- /dev/null
+++ b/src/main/java/org/springblade/modules/organ/entity/Organ.java
@@ -0,0 +1,70 @@
+/*
+ *      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.organ.entity;
+
+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 2022-01-08
+ */
+@Data
+@TableName("sys_organ")
+@ApiModel(value = "Organ对象", description = "Organ对象")
+public class Organ implements Serializable {
+
+	private static final long serialVersionUID = 1L;
+
+	private Integer id;
+	/**
+	 * 用户id
+	 */
+	@ApiModelProperty(value = "用户id")
+	private Integer uid;
+	/**
+	 * 组织
+	 */
+	@ApiModelProperty(value = "组织")
+	private String organization;
+	/**
+	 * 时间
+	 */
+	@ApiModelProperty(value = "时间")
+	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+	@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+	private Date time;
+	/**
+	 * 进度
+	 */
+	@ApiModelProperty(value = "进度")
+	private Double
+
+		speed;
+
+
+}
diff --git a/src/main/java/org/springblade/modules/organ/mapper/OrganMapper.java b/src/main/java/org/springblade/modules/organ/mapper/OrganMapper.java
new file mode 100644
index 0000000..8998be0
--- /dev/null
+++ b/src/main/java/org/springblade/modules/organ/mapper/OrganMapper.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.organ.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import org.springblade.modules.organ.entity.Organ;
+import org.springblade.modules.organ.vo.OrganVO;
+
+import java.util.List;
+
+/**
+ *  Mapper 接口
+ *
+ * @author BladeX
+ * @since 2022-01-08
+ */
+public interface OrganMapper extends BaseMapper<Organ> {
+
+	/**
+	 * 自定义分页
+	 *
+	 * @param page
+	 * @param organ
+	 * @return
+	 */
+	List<OrganVO> selectOrganPage(IPage page, OrganVO organ);
+
+}
diff --git a/src/main/java/org/springblade/modules/organ/mapper/OrganMapper.xml b/src/main/java/org/springblade/modules/organ/mapper/OrganMapper.xml
new file mode 100644
index 0000000..6cd5a0e
--- /dev/null
+++ b/src/main/java/org/springblade/modules/organ/mapper/OrganMapper.xml
@@ -0,0 +1,23 @@
+<?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.organ.mapper.OrganMapper">
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="organResultMap" type="org.springblade.modules.organ.entity.Organ">
+        <id column="id" property="id"/>
+        <result column="uid" property="uid"/>
+        <result column="organization" property="organization"/>
+        <result column="time" property="time"/>
+        <result column="
+
+speed" property="
+
+speed"/>
+    </resultMap>
+
+
+    <select id="selectOrganPage" resultMap="organResultMap">
+        select * from sys_organ where is_deleted = 0
+    </select>
+
+</mapper>
diff --git a/src/main/java/org/springblade/modules/organ/service/IOrganService.java b/src/main/java/org/springblade/modules/organ/service/IOrganService.java
new file mode 100644
index 0000000..bb1499b
--- /dev/null
+++ b/src/main/java/org/springblade/modules/organ/service/IOrganService.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.organ.service;
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.service.IService;
+import org.springblade.modules.organ.entity.Organ;
+import org.springblade.modules.organ.vo.OrganVO;
+
+/**
+ *  服务类
+ *
+ * @author BladeX
+ * @since 2022-01-08
+ */
+public interface IOrganService extends IService<Organ> {
+
+	/**
+	 * 自定义分页
+	 *
+	 * @param page
+	 * @param organ
+	 * @return
+	 */
+	IPage<OrganVO> selectOrganPage(IPage<OrganVO> page, OrganVO organ);
+
+}
diff --git a/src/main/java/org/springblade/modules/organ/service/impl/OrganServiceImpl.java b/src/main/java/org/springblade/modules/organ/service/impl/OrganServiceImpl.java
new file mode 100644
index 0000000..f41f4a0
--- /dev/null
+++ b/src/main/java/org/springblade/modules/organ/service/impl/OrganServiceImpl.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.organ.service.impl;
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springblade.modules.organ.entity.Organ;
+import org.springblade.modules.organ.mapper.OrganMapper;
+import org.springblade.modules.organ.service.IOrganService;
+import org.springblade.modules.organ.vo.OrganVO;
+import org.springframework.stereotype.Service;
+
+/**
+ *  服务实现类
+ *
+ * @author BladeX
+ * @since 2022-01-08
+ */
+@Service
+public class OrganServiceImpl extends ServiceImpl<OrganMapper, Organ> implements IOrganService {
+
+	@Override
+	public IPage<OrganVO> selectOrganPage(IPage<OrganVO> page, OrganVO organ) {
+		return page.setRecords(baseMapper.selectOrganPage(page, organ));
+	}
+
+}
diff --git a/src/main/java/org/springblade/modules/organ/vo/OrganVO.java b/src/main/java/org/springblade/modules/organ/vo/OrganVO.java
new file mode 100644
index 0000000..7007dbd
--- /dev/null
+++ b/src/main/java/org/springblade/modules/organ/vo/OrganVO.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.organ.vo;
+
+import io.swagger.annotations.ApiModel;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import org.springblade.modules.organ.entity.Organ;
+
+/**
+ * 视图实体类
+ *
+ * @author BladeX
+ * @since 2022-01-08
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+@ApiModel(value = "OrganVO对象", description = "OrganVO对象")
+public class OrganVO extends Organ {
+	private static final long serialVersionUID = 1L;
+
+}
diff --git a/src/main/java/org/springblade/modules/policy/controller/PolicyController.java b/src/main/java/org/springblade/modules/policy/controller/PolicyController.java
new file mode 100644
index 0000000..ab3bd8f
--- /dev/null
+++ b/src/main/java/org/springblade/modules/policy/controller/PolicyController.java
@@ -0,0 +1,127 @@
+/*
+ *      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.policy.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.policy.entity.Policy;
+import org.springblade.modules.policy.service.IPolicyService;
+import org.springblade.modules.policy.vo.PolicyVO;
+import org.springframework.web.bind.annotation.*;
+
+import javax.validation.Valid;
+
+/**
+ * 控制器
+ * 行业政策
+ *
+ * @author BladeX
+ * @since 2022-01-08
+ */
+@RestController
+@AllArgsConstructor
+@RequestMapping("/policy")
+@Api(value = "", tags = "接口")
+public class PolicyController extends BladeController {
+
+	private final IPolicyService policyService;
+
+	/**
+	 * 详情
+	 */
+	@GetMapping("/detail")
+	@ApiOperationSupport(order = 1)
+	@ApiOperation(value = "详情", notes = "传入policy")
+	public R<Policy> detail(Policy policy) {
+		Policy detail = policyService.getOne(Condition.getQueryWrapper(policy));
+		return R.data(detail);
+	}
+
+	/**
+	 * 分页
+	 */
+	@GetMapping("/list")
+	@ApiOperationSupport(order = 2)
+	@ApiOperation(value = "分页", notes = "传入policy")
+	public R<IPage<Policy>> list(Policy policy, Query query) {
+		IPage<Policy> pages = policyService.page(Condition.getPage(query), Condition.getQueryWrapper(policy));
+		return R.data(pages);
+	}
+
+	/**
+	 * 自定义分页
+	 */
+	@GetMapping("/page")
+	@ApiOperationSupport(order = 3)
+	@ApiOperation(value = "分页", notes = "传入policy")
+	public R<IPage<PolicyVO>> page(PolicyVO policy, Query query) {
+		IPage<PolicyVO> pages = policyService.selectPolicyPage(Condition.getPage(query), policy);
+		return R.data(pages);
+	}
+
+	/**
+	 * 新增
+	 */
+	@PostMapping("/save")
+	@ApiOperationSupport(order = 4)
+	@ApiOperation(value = "新增", notes = "传入policy")
+	public R save(@Valid @RequestBody Policy policy) {
+		return R.status(policyService.save(policy));
+	}
+
+	/**
+	 * 修改
+	 */
+	@PostMapping("/update")
+	@ApiOperationSupport(order = 5)
+	@ApiOperation(value = "修改", notes = "传入policy")
+	public R update(@Valid @RequestBody Policy policy) {
+		return R.status(policyService.updateById(policy));
+	}
+
+	/**
+	 * 新增或修改
+	 */
+	@PostMapping("/submit")
+	@ApiOperationSupport(order = 6)
+	@ApiOperation(value = "新增或修改", notes = "传入policy")
+	public R submit(@Valid @RequestBody Policy policy) {
+		return R.status(policyService.saveOrUpdate(policy));
+	}
+
+
+	/**
+	 * 删除
+	 */
+	@PostMapping("/remove")
+	@ApiOperationSupport(order = 8)
+	@ApiOperation(value = "删除", notes = "传入ids")
+	public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
+		return R.status(policyService.removeByIds(Func.toLongList(ids)));
+	}
+
+
+}
diff --git a/src/main/java/org/springblade/modules/policy/dto/PolicyDTO.java b/src/main/java/org/springblade/modules/policy/dto/PolicyDTO.java
new file mode 100644
index 0000000..c5ca3ca
--- /dev/null
+++ b/src/main/java/org/springblade/modules/policy/dto/PolicyDTO.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.policy.dto;
+
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import org.springblade.modules.policy.entity.Policy;
+
+/**
+ * 数据传输对象实体类
+ *
+ * @author BladeX
+ * @since 2022-01-08
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+public class PolicyDTO extends Policy {
+	private static final long serialVersionUID = 1L;
+
+}
diff --git a/src/main/java/org/springblade/modules/policy/entity/Policy.java b/src/main/java/org/springblade/modules/policy/entity/Policy.java
new file mode 100644
index 0000000..9538928
--- /dev/null
+++ b/src/main/java/org/springblade/modules/policy/entity/Policy.java
@@ -0,0 +1,66 @@
+/*
+ *      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.policy.entity;
+
+import com.baomidou.mybatisplus.annotation.TableField;
+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 2022-01-08
+ */
+@Data
+@TableName("sys_policy")
+@ApiModel(value = "Policy对象", description = "Policy对象")
+public class Policy implements Serializable {
+
+	private static final long serialVersionUID = 1L;
+
+	private Integer id;
+	private String policy;
+	/**
+	 * 政策内容
+	 */
+	@ApiModelProperty(value = "政策内容")
+	@TableField("policyCount")
+	private String policycount;
+	/**
+	 * 法规
+	 */
+	@ApiModelProperty(value = "法规")
+	private String statute;
+	/**
+	 * 发布时间
+	 */
+	@ApiModelProperty(value = "发布时间")
+	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+	@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+	private Date time;
+
+
+}
diff --git a/src/main/java/org/springblade/modules/policy/mapper/PolicyMapper.java b/src/main/java/org/springblade/modules/policy/mapper/PolicyMapper.java
new file mode 100644
index 0000000..c400404
--- /dev/null
+++ b/src/main/java/org/springblade/modules/policy/mapper/PolicyMapper.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.policy.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import org.springblade.modules.policy.entity.Policy;
+import org.springblade.modules.policy.vo.PolicyVO;
+
+import java.util.List;
+
+/**
+ *  Mapper 接口
+ *
+ * @author BladeX
+ * @since 2022-01-08
+ */
+public interface PolicyMapper extends BaseMapper<Policy> {
+
+	/**
+	 * 自定义分页
+	 *
+	 * @param page
+	 * @param policy
+	 * @return
+	 */
+	List<PolicyVO> selectPolicyPage(IPage page, PolicyVO policy);
+
+}
diff --git a/src/main/java/org/springblade/modules/policy/mapper/PolicyMapper.xml b/src/main/java/org/springblade/modules/policy/mapper/PolicyMapper.xml
new file mode 100644
index 0000000..d7d148e
--- /dev/null
+++ b/src/main/java/org/springblade/modules/policy/mapper/PolicyMapper.xml
@@ -0,0 +1,19 @@
+<?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.policy.mapper.PolicyMapper">
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="policyResultMap" type="org.springblade.modules.policy.entity.Policy">
+        <id column="id" property="id"/>
+        <result column="policy" property="policy"/>
+        <result column="policyCount" property="policycount"/>
+        <result column="statute" property="statute"/>
+        <result column="time" property="time"/>
+    </resultMap>
+
+
+    <select id="selectPolicyPage" resultMap="policyResultMap">
+        select * from sys_policy where is_deleted = 0
+    </select>
+
+</mapper>
diff --git a/src/main/java/org/springblade/modules/policy/service/IPolicyService.java b/src/main/java/org/springblade/modules/policy/service/IPolicyService.java
new file mode 100644
index 0000000..506a8a6
--- /dev/null
+++ b/src/main/java/org/springblade/modules/policy/service/IPolicyService.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.policy.service;
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.service.IService;
+import org.springblade.modules.policy.entity.Policy;
+import org.springblade.modules.policy.vo.PolicyVO;
+
+/**
+ *  服务类
+ *
+ * @author BladeX
+ * @since 2022-01-08
+ */
+public interface IPolicyService extends IService<Policy> {
+
+	/**
+	 * 自定义分页
+	 *
+	 * @param page
+	 * @param policy
+	 * @return
+	 */
+	IPage<PolicyVO> selectPolicyPage(IPage<PolicyVO> page, PolicyVO policy);
+
+}
diff --git a/src/main/java/org/springblade/modules/policy/service/impl/PolicyServiceImpl.java b/src/main/java/org/springblade/modules/policy/service/impl/PolicyServiceImpl.java
new file mode 100644
index 0000000..502cc10
--- /dev/null
+++ b/src/main/java/org/springblade/modules/policy/service/impl/PolicyServiceImpl.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.policy.service.impl;
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springblade.modules.policy.entity.Policy;
+import org.springblade.modules.policy.mapper.PolicyMapper;
+import org.springblade.modules.policy.service.IPolicyService;
+import org.springblade.modules.policy.vo.PolicyVO;
+import org.springframework.stereotype.Service;
+
+/**
+ *  服务实现类
+ *
+ * @author BladeX
+ * @since 2022-01-08
+ */
+@Service
+public class PolicyServiceImpl extends ServiceImpl<PolicyMapper, Policy> implements IPolicyService {
+
+	@Override
+	public IPage<PolicyVO> selectPolicyPage(IPage<PolicyVO> page, PolicyVO policy) {
+		return page.setRecords(baseMapper.selectPolicyPage(page, policy));
+	}
+
+}
diff --git a/src/main/java/org/springblade/modules/policy/vo/PolicyVO.java b/src/main/java/org/springblade/modules/policy/vo/PolicyVO.java
new file mode 100644
index 0000000..b2fd760
--- /dev/null
+++ b/src/main/java/org/springblade/modules/policy/vo/PolicyVO.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.policy.vo;
+
+import io.swagger.annotations.ApiModel;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import org.springblade.modules.policy.entity.Policy;
+
+/**
+ * 视图实体类
+ *
+ * @author BladeX
+ * @since 2022-01-08
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+@ApiModel(value = "PolicyVO对象", description = "PolicyVO对象")
+public class PolicyVO extends Policy {
+	private static final long serialVersionUID = 1L;
+
+}

--
Gitblit v1.9.3