From 224e0bbfc8d24785fea2e0160c36d7a8f6cd7269 Mon Sep 17 00:00:00 2001
From: linwe <872216996@qq.com>
Date: Thu, 21 Dec 2023 14:17:17 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'

---
 src/main/java/org/springblade/modules/system/mapper/UserMapper.xml                                   |    9 
 src/main/java/org/springblade/modules/community/service/ICommunityService.java                       |   42 +++
 src/main/java/org/springblade/modules/doorplateAddress/service/IDoorplateAddressService.java         |    6 
 src/main/java/org/springblade/modules/community/entity/CommunityEntity.java                          |  140 +++++++++++
 src/main/java/org/springblade/modules/community/mapper/CommunityMapper.xml                           |   40 +++
 src/main/java/org/springblade/modules/doorplateAddress/mapper/DoorplateAddressMapper.xml             |   16 +
 src/main/java/org/springblade/modules/community/controller/CommunityController.java                  |  126 ++++++++++
 src/main/java/org/springblade/modules/doorplateAddress/mapper/DoorplateAddressMapper.java            |    6 
 src/main/java/org/springblade/modules/system/service/impl/UserServiceImpl.java                       |   15 +
 src/main/java/org/springblade/modules/community/wrapper/CommunityWrapper.java                        |   50 ++++
 src/main/java/org/springblade/modules/community/mapper/CommunityMapper.java                          |   44 +++
 src/main/java/org/springblade/modules/community/dto/CommunityDTO.java                                |   34 ++
 src/main/java/org/springblade/modules/doorplateAddress/service/impl/DoorplateAddressServiceImpl.java |   33 ++
 src/main/java/org/springblade/modules/doorplateAddress/controller/DoorplateAddressController.java    |    9 
 src/main/java/org/springblade/modules/system/controller/UserController.java                          |   11 
 src/main/java/org/springblade/modules/community/service/impl/CommunityServiceImpl.java               |   42 +++
 src/main/java/org/springblade/modules/system/mapper/UserMapper.java                                  |    7 
 src/main/java/org/springblade/modules/system/service/IUserService.java                               |    7 
 src/main/java/org/springblade/modules/community/vo/CommunityVO.java                                  |   35 ++
 19 files changed, 672 insertions(+), 0 deletions(-)

diff --git a/src/main/java/org/springblade/modules/community/controller/CommunityController.java b/src/main/java/org/springblade/modules/community/controller/CommunityController.java
new file mode 100644
index 0000000..9f248d2
--- /dev/null
+++ b/src/main/java/org/springblade/modules/community/controller/CommunityController.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.community.controller;
+
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import io.swagger.annotations.ApiParam;
+import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
+import lombok.AllArgsConstructor;
+import javax.validation.Valid;
+
+import org.springblade.core.secure.BladeUser;
+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.springframework.web.bind.annotation.*;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import org.springblade.modules.community.entity.CommunityEntity;
+import org.springblade.modules.community.vo.CommunityVO;
+import org.springblade.modules.community.wrapper.CommunityWrapper;
+import org.springblade.modules.community.service.ICommunityService;
+import org.springblade.core.boot.ctrl.BladeController;
+
+/**
+ * 社区表 控制器
+ *
+ * @author BladeX
+ * @since 2023-12-21
+ */
+@RestController
+@AllArgsConstructor
+@RequestMapping("blade-community/community")
+@Api(value = "社区表", tags = "社区表接口")
+public class CommunityController {
+
+	private final ICommunityService communityService;
+
+	/**
+	 * 社区表 详情
+	 */
+	@GetMapping("/detail")
+	@ApiOperationSupport(order = 1)
+	@ApiOperation(value = "详情", notes = "传入community")
+	public R<CommunityVO> detail(CommunityEntity community) {
+		CommunityEntity detail = communityService.getOne(Condition.getQueryWrapper(community));
+		return R.data(CommunityWrapper.build().entityVO(detail));
+	}
+	/**
+	 * 社区表 分页
+	 */
+	@GetMapping("/list")
+	@ApiOperationSupport(order = 2)
+	@ApiOperation(value = "分页", notes = "传入community")
+	public R<IPage<CommunityVO>> list(CommunityEntity community, Query query) {
+		IPage<CommunityEntity> pages = communityService.page(Condition.getPage(query), Condition.getQueryWrapper(community));
+		return R.data(CommunityWrapper.build().pageVO(pages));
+	}
+
+	/**
+	 * 社区表 自定义分页
+	 */
+	@GetMapping("/page")
+	@ApiOperationSupport(order = 3)
+	@ApiOperation(value = "分页", notes = "传入community")
+	public R<IPage<CommunityVO>> page(CommunityVO community, Query query) {
+		IPage<CommunityVO> pages = communityService.selectCommunityPage(Condition.getPage(query), community);
+		return R.data(pages);
+	}
+
+	/**
+	 * 社区表 新增
+	 */
+	@PostMapping("/save")
+	@ApiOperationSupport(order = 4)
+	@ApiOperation(value = "新增", notes = "传入community")
+	public R save(@Valid @RequestBody CommunityEntity community) {
+		return R.status(communityService.save(community));
+	}
+
+	/**
+	 * 社区表 修改
+	 */
+	@PostMapping("/update")
+	@ApiOperationSupport(order = 5)
+	@ApiOperation(value = "修改", notes = "传入community")
+	public R update(@Valid @RequestBody CommunityEntity community) {
+		return R.status(communityService.updateById(community));
+	}
+
+	/**
+	 * 社区表 新增或修改
+	 */
+	@PostMapping("/submit")
+	@ApiOperationSupport(order = 6)
+	@ApiOperation(value = "新增或修改", notes = "传入community")
+	public R submit(@Valid @RequestBody CommunityEntity community) {
+		return R.status(communityService.saveOrUpdate(community));
+	}
+
+	/**
+	 * 社区表 删除
+	 */
+	@PostMapping("/remove")
+	@ApiOperationSupport(order = 7)
+	@ApiOperation(value = "逻辑删除", notes = "传入ids")
+	public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
+		return R.status(communityService.removeByIds(Func.toLongList(ids)));
+	}
+
+
+}
diff --git a/src/main/java/org/springblade/modules/community/dto/CommunityDTO.java b/src/main/java/org/springblade/modules/community/dto/CommunityDTO.java
new file mode 100644
index 0000000..83b8f49
--- /dev/null
+++ b/src/main/java/org/springblade/modules/community/dto/CommunityDTO.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.community.dto;
+
+import org.springblade.modules.community.entity.CommunityEntity;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+/**
+ * 社区表 数据传输对象实体类
+ *
+ * @author BladeX
+ * @since 2023-12-21
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+public class CommunityDTO extends CommunityEntity {
+	private static final long serialVersionUID = 1L;
+
+}
diff --git a/src/main/java/org/springblade/modules/community/entity/CommunityEntity.java b/src/main/java/org/springblade/modules/community/entity/CommunityEntity.java
new file mode 100644
index 0000000..fe2cd05
--- /dev/null
+++ b/src/main/java/org/springblade/modules/community/entity/CommunityEntity.java
@@ -0,0 +1,140 @@
+/*
+ *      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.community.entity;
+
+import com.baomidou.mybatisplus.annotation.*;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.fasterxml.jackson.databind.annotation.JsonSerialize;
+import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
+import lombok.Data;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
+import java.io.Serializable;
+import java.util.Date;
+import lombok.EqualsAndHashCode;
+import org.springblade.core.tenant.mp.TenantEntity;
+import org.springframework.format.annotation.DateTimeFormat;
+
+/**
+ * 社区表 实体类
+ *
+ * @author BladeX
+ * @since 2023-12-21
+ */
+@Data
+@TableName("jczz_community")
+@ApiModel(value = "Community对象", description = "社区表")
+public class CommunityEntity implements Serializable {
+
+	private static final long serialVersionUID = 1L;
+	/**
+	 * 主键
+	 */
+	@JsonSerialize(using = ToStringSerializer.class)
+	@ApiModelProperty("主键id")
+	@TableId(value = "id", type = IdType.ASSIGN_ID)
+	private Long id;
+
+	/**
+	 * 街道编号
+	 */
+	@ApiModelProperty(value = "街道编号")
+	private String streetCode;
+	/**
+	 * 社区编号
+	 */
+	@ApiModelProperty(value = "社区编号")
+	private String code;
+	/**
+	 * 社区名称
+	 */
+	@ApiModelProperty(value = "社区名称")
+	private String name;
+	/**
+	 * 图片url
+	 */
+	@ApiModelProperty(value = "图片url")
+	private String picUrl;
+	/**
+	 * 地址
+	 */
+	@ApiModelProperty(value = "地址")
+	private String address;
+	/**
+	 * 社区负责民警user_id
+	 */
+	@ApiModelProperty(value = "社区负责民警user_id")
+	private Long resPoliceUserId;
+	/**
+	 * 中心坐标-经度
+	 */
+	@ApiModelProperty(value = "中心坐标-经度")
+	private String lng;
+	/**
+	 * 中心坐标-纬度
+	 */
+	@ApiModelProperty(value = "中心坐标-纬度")
+	private String lat;
+	/**
+	 * 简介
+	 */
+	@ApiModelProperty(value = "简介")
+	private String remark;
+
+	/**
+	 * 创建人
+	 */
+	@JsonSerialize(using = ToStringSerializer.class)
+	@ApiModelProperty("创建人")
+	@TableField(fill = FieldFill.INSERT)
+	private String createUser;
+
+	/**
+	 * 创建时间
+	 */
+	@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+	@ApiModelProperty("创建时间")
+	@TableField(fill = FieldFill.INSERT)
+	private Date createTime;
+
+	/**
+	 * 更新人
+	 */
+	@JsonSerialize(using = ToStringSerializer.class)
+	@ApiModelProperty("更新人")
+	@TableField(fill = FieldFill.INSERT_UPDATE)
+	private String updateUser;
+
+	/**
+	 * 更新时间
+	 */
+	@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+	@ApiModelProperty("更新时间")
+	@TableField(fill = FieldFill.INSERT_UPDATE)
+	private Date updateTime;
+
+	/**
+	 * 是否删除
+	 */
+	@TableLogic
+	@ApiModelProperty("是否已删除 0:否  1:是")
+	private Integer isDeleted;
+
+}
diff --git a/src/main/java/org/springblade/modules/community/mapper/CommunityMapper.java b/src/main/java/org/springblade/modules/community/mapper/CommunityMapper.java
new file mode 100644
index 0000000..1861f71
--- /dev/null
+++ b/src/main/java/org/springblade/modules/community/mapper/CommunityMapper.java
@@ -0,0 +1,44 @@
+/*
+ *      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.community.mapper;
+
+import org.apache.ibatis.annotations.Param;
+import org.springblade.modules.community.entity.CommunityEntity;
+import org.springblade.modules.community.vo.CommunityVO;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import java.util.List;
+
+/**
+ * 社区表 Mapper 接口
+ *
+ * @author BladeX
+ * @since 2023-12-21
+ */
+public interface CommunityMapper extends BaseMapper<CommunityEntity> {
+
+	/**
+	 * 自定义分页
+	 *
+	 * @param page
+	 * @param community
+	 * @return
+	 */
+	List<CommunityVO> selectCommunityPage(IPage page,@Param("community") CommunityVO community);
+
+
+}
diff --git a/src/main/java/org/springblade/modules/community/mapper/CommunityMapper.xml b/src/main/java/org/springblade/modules/community/mapper/CommunityMapper.xml
new file mode 100644
index 0000000..12a9083
--- /dev/null
+++ b/src/main/java/org/springblade/modules/community/mapper/CommunityMapper.xml
@@ -0,0 +1,40 @@
+<?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.community.mapper.CommunityMapper">
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="communityResultMap" type="org.springblade.modules.community.entity.CommunityEntity">
+        <result column="id" property="id"/>
+        <result column="street_code" property="streetCode"/>
+        <result column="code" property="code"/>
+        <result column="name" property="name"/>
+        <result column="pic_url" property="picUrl"/>
+        <result column="address" property="address"/>
+        <result column="res_police_user_id" property="resPoliceUserId"/>
+        <result column="lng" property="lng"/>
+        <result column="lat" property="lat"/>
+        <result column="remark" property="remark"/>
+        <result column="create_user" property="createUser"/>
+        <result column="create_time" property="createTime"/>
+        <result column="update_user" property="updateUser"/>
+        <result column="update_time" property="updateTime"/>
+        <result column="is_deleted" property="isDeleted"/>
+    </resultMap>
+
+    <!--自定义分页列表查询-->
+    <select id="selectCommunityPage" resultType="org.springblade.modules.community.vo.CommunityVO">
+        select * from jczz_community
+        where is_deleted = 0
+        <if test="community.name !=null and community.name!=''">
+            and name like concat('%',#{community.name},'%')
+        </if>
+        <if test="community.code !=null and community.code!=''">
+            and code like concat('%',#{community.code},'%')
+        </if>
+        <if test="community.streetCode !=null and community.streetCode!=''">
+            and street_code like concat('%',#{community.streetCode},'%')
+        </if>
+    </select>
+
+
+</mapper>
diff --git a/src/main/java/org/springblade/modules/community/service/ICommunityService.java b/src/main/java/org/springblade/modules/community/service/ICommunityService.java
new file mode 100644
index 0000000..df2d6cd
--- /dev/null
+++ b/src/main/java/org/springblade/modules/community/service/ICommunityService.java
@@ -0,0 +1,42 @@
+/*
+ *      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.community.service;
+
+import com.baomidou.mybatisplus.extension.service.IService;
+import org.springblade.modules.community.entity.CommunityEntity;
+import org.springblade.modules.community.vo.CommunityVO;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+
+/**
+ * 社区表 服务类
+ *
+ * @author BladeX
+ * @since 2023-12-21
+ */
+public interface ICommunityService extends IService<CommunityEntity> {
+
+	/**
+	 * 自定义分页
+	 *
+	 * @param page
+	 * @param community
+	 * @return
+	 */
+	IPage<CommunityVO> selectCommunityPage(IPage<CommunityVO> page, CommunityVO community);
+
+
+}
diff --git a/src/main/java/org/springblade/modules/community/service/impl/CommunityServiceImpl.java b/src/main/java/org/springblade/modules/community/service/impl/CommunityServiceImpl.java
new file mode 100644
index 0000000..97148ef
--- /dev/null
+++ b/src/main/java/org/springblade/modules/community/service/impl/CommunityServiceImpl.java
@@ -0,0 +1,42 @@
+/*
+ *      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.community.service.impl;
+
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springblade.modules.community.entity.CommunityEntity;
+import org.springblade.modules.community.vo.CommunityVO;
+import org.springblade.modules.community.mapper.CommunityMapper;
+import org.springblade.modules.community.service.ICommunityService;
+import org.springframework.stereotype.Service;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+
+/**
+ * 社区表 服务实现类
+ *
+ * @author BladeX
+ * @since 2023-12-21
+ */
+@Service
+public class CommunityServiceImpl extends ServiceImpl<CommunityMapper, CommunityEntity> implements ICommunityService {
+
+	@Override
+	public IPage<CommunityVO> selectCommunityPage(IPage<CommunityVO> page, CommunityVO community) {
+		return page.setRecords(baseMapper.selectCommunityPage(page, community));
+	}
+
+
+}
diff --git a/src/main/java/org/springblade/modules/community/vo/CommunityVO.java b/src/main/java/org/springblade/modules/community/vo/CommunityVO.java
new file mode 100644
index 0000000..ad865f3
--- /dev/null
+++ b/src/main/java/org/springblade/modules/community/vo/CommunityVO.java
@@ -0,0 +1,35 @@
+/*
+ *      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.community.vo;
+
+import org.springblade.modules.community.entity.CommunityEntity;
+import org.springblade.core.tool.node.INode;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+/**
+ * 社区表 视图实体类
+ *
+ * @author BladeX
+ * @since 2023-12-21
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+public class CommunityVO extends CommunityEntity {
+	private static final long serialVersionUID = 1L;
+
+}
diff --git a/src/main/java/org/springblade/modules/community/wrapper/CommunityWrapper.java b/src/main/java/org/springblade/modules/community/wrapper/CommunityWrapper.java
new file mode 100644
index 0000000..c8f419f
--- /dev/null
+++ b/src/main/java/org/springblade/modules/community/wrapper/CommunityWrapper.java
@@ -0,0 +1,50 @@
+/*
+ *      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.community.wrapper;
+
+import org.springblade.core.mp.support.BaseEntityWrapper;
+import org.springblade.core.tool.utils.BeanUtil;
+import org.springblade.modules.community.entity.CommunityEntity;
+import org.springblade.modules.community.vo.CommunityVO;
+import java.util.Objects;
+
+/**
+ * 社区表 包装类,返回视图层所需的字段
+ *
+ * @author BladeX
+ * @since 2023-12-21
+ */
+public class CommunityWrapper extends BaseEntityWrapper<CommunityEntity, CommunityVO>  {
+
+	public static CommunityWrapper build() {
+		return new CommunityWrapper();
+ 	}
+
+	@Override
+	public CommunityVO entityVO(CommunityEntity community) {
+		CommunityVO communityVO = Objects.requireNonNull(BeanUtil.copy(community, CommunityVO.class));
+
+		//User createUser = UserCache.getUser(community.getCreateUser());
+		//User updateUser = UserCache.getUser(community.getUpdateUser());
+		//communityVO.setCreateUserName(createUser.getName());
+		//communityVO.setUpdateUserName(updateUser.getName());
+
+		return communityVO;
+	}
+
+
+}
diff --git a/src/main/java/org/springblade/modules/doorplateAddress/controller/DoorplateAddressController.java b/src/main/java/org/springblade/modules/doorplateAddress/controller/DoorplateAddressController.java
index aef1f56..e523a1e 100644
--- a/src/main/java/org/springblade/modules/doorplateAddress/controller/DoorplateAddressController.java
+++ b/src/main/java/org/springblade/modules/doorplateAddress/controller/DoorplateAddressController.java
@@ -234,4 +234,13 @@
 		return R.data(doorplateAddressService.placeDataHandle());
 	}
 
+	/**
+	 * 社区数据处理
+	 * @return
+	 */
+	@GetMapping("/communityDataHandle")
+	public R communityDataHandle(){
+		return R.data(doorplateAddressService.communityDataHandle());
+	}
+
 }
diff --git a/src/main/java/org/springblade/modules/doorplateAddress/mapper/DoorplateAddressMapper.java b/src/main/java/org/springblade/modules/doorplateAddress/mapper/DoorplateAddressMapper.java
index 017bc4b..68474a8 100644
--- a/src/main/java/org/springblade/modules/doorplateAddress/mapper/DoorplateAddressMapper.java
+++ b/src/main/java/org/springblade/modules/doorplateAddress/mapper/DoorplateAddressMapper.java
@@ -203,4 +203,10 @@
 	 * @return
 	 */
 	DoorplateAddressVO getDoorplateAddressVODetail(@Param("doorplateAddress") DoorplateAddressVO doorplateAddress);
+
+	/**
+	 * 查询所有的社区集合信息
+	 * @return
+	 */
+    List<DoorplateAddressEntity> getAllCommunityList();
 }
diff --git a/src/main/java/org/springblade/modules/doorplateAddress/mapper/DoorplateAddressMapper.xml b/src/main/java/org/springblade/modules/doorplateAddress/mapper/DoorplateAddressMapper.xml
index 235dcfa..19886da 100644
--- a/src/main/java/org/springblade/modules/doorplateAddress/mapper/DoorplateAddressMapper.xml
+++ b/src/main/java/org/springblade/modules/doorplateAddress/mapper/DoorplateAddressMapper.xml
@@ -459,4 +459,20 @@
     <select id="getDoorplateAddressVODetail" resultType="org.springblade.modules.doorplateAddress.vo.DoorplateAddressVO">
         select jda.* from jczz_doorplate_address jda where address_code = #{doorplateAddress.addressCode}
     </select>
+
+    <!--查询所有的社区集合信息-->
+    <select id="getAllCommunityList" resultType="org.springblade.modules.doorplateAddress.entity.DoorplateAddressEntity">
+        SELECT
+            jda.nei_code,
+            jda.nei_name,
+            jda.town_street_code
+        FROM
+            jczz_doorplate_address jda
+        WHERE
+            1 = 1
+        GROUP BY
+            jda.nei_code,
+            jda.nei_name,
+            jda.town_street_code
+    </select>
 </mapper>
diff --git a/src/main/java/org/springblade/modules/doorplateAddress/service/IDoorplateAddressService.java b/src/main/java/org/springblade/modules/doorplateAddress/service/IDoorplateAddressService.java
index 038dba5..b5c6c9b 100644
--- a/src/main/java/org/springblade/modules/doorplateAddress/service/IDoorplateAddressService.java
+++ b/src/main/java/org/springblade/modules/doorplateAddress/service/IDoorplateAddressService.java
@@ -115,4 +115,10 @@
 	 * 门牌地址表(总台账数据) 自定义详情
 	 */
     Object getDetail(DoorplateAddressVO doorplateAddress);
+
+	/**
+	 * 社区数据处理
+	 * @return
+	 */
+	Object communityDataHandle();
 }
diff --git a/src/main/java/org/springblade/modules/doorplateAddress/service/impl/DoorplateAddressServiceImpl.java b/src/main/java/org/springblade/modules/doorplateAddress/service/impl/DoorplateAddressServiceImpl.java
index a099f7f..efe9394 100644
--- a/src/main/java/org/springblade/modules/doorplateAddress/service/impl/DoorplateAddressServiceImpl.java
+++ b/src/main/java/org/springblade/modules/doorplateAddress/service/impl/DoorplateAddressServiceImpl.java
@@ -29,6 +29,8 @@
 import org.springblade.core.secure.utils.AuthUtil;
 import org.springblade.modules.category.dto.CategoryLabelDTO;
 import org.springblade.modules.category.service.ICategoryLabelService;
+import org.springblade.modules.community.entity.CommunityEntity;
+import org.springblade.modules.community.service.ICommunityService;
 import org.springblade.modules.district.entity.DistrictEntity;
 import org.springblade.modules.district.service.IDistrictService;
 import org.springblade.modules.doorplateAddress.entity.DoorplateAddressEntity;
@@ -94,6 +96,9 @@
 
 	@Autowired
 	private ICategoryLabelService iCategoryLabelService;
+
+	@Autowired
+	private ICommunityService communityService;
 
 
 	@Override
@@ -774,4 +779,32 @@
 		}
 		return null;
 	}
+
+	/**
+	 * 社区数据处理
+	 * @return
+	 */
+	@Override
+	public Object communityDataHandle() {
+		// 查询所有的社区差值
+		List<DoorplateAddressEntity> doorplateAddressEntities = baseMapper.getAllCommunityList();
+		// 遍历,插入库
+		for (DoorplateAddressEntity doorplateAddressEntity : doorplateAddressEntities) {
+			QueryWrapper<CommunityEntity> queryWrapper = new QueryWrapper<>();
+			queryWrapper.eq("name",doorplateAddressEntity.getNeiName())
+				.eq("code",doorplateAddressEntity.getNeiCode())
+				.eq("is_deleted",0);
+			CommunityEntity one = communityService.getOne(queryWrapper);
+			if (null==one){
+				// 插入
+				CommunityEntity communityEntity = new CommunityEntity();
+				communityEntity.setCode(doorplateAddressEntity.getNeiCode());
+				communityEntity.setName(doorplateAddressEntity.getNeiName());
+				communityEntity.setStreetCode(doorplateAddressEntity.getTownStreetCode().replaceAll("0+$", ""));
+				//新增操作
+				communityService.save(communityEntity);
+			}
+		}
+		return null;
+	}
 }
diff --git a/src/main/java/org/springblade/modules/system/controller/UserController.java b/src/main/java/org/springblade/modules/system/controller/UserController.java
index f081684..3cf58f6 100644
--- a/src/main/java/org/springblade/modules/system/controller/UserController.java
+++ b/src/main/java/org/springblade/modules/system/controller/UserController.java
@@ -131,6 +131,17 @@
 		return R.data(UserWrapper.build().pageVO(pages));
 	}
 
+
+	/**
+	 * 按条件查询用户信息
+	 * @param user
+	 * @return
+	 */
+	@GetMapping("/getUserListByParam")
+	public R getUserListByParam(UserVO user) {
+		return R.data(userService.getUserListByParam(user));
+	}
+
 	/**
 	 * 新增或修改
 	 */
diff --git a/src/main/java/org/springblade/modules/system/mapper/UserMapper.java b/src/main/java/org/springblade/modules/system/mapper/UserMapper.java
index 3935273..2f45882 100644
--- a/src/main/java/org/springblade/modules/system/mapper/UserMapper.java
+++ b/src/main/java/org/springblade/modules/system/mapper/UserMapper.java
@@ -22,6 +22,7 @@
 import org.apache.ibatis.annotations.Param;
 import org.springblade.modules.system.excel.UserExcel;
 import org.springblade.modules.system.entity.User;
+import org.springblade.modules.system.vo.UserVO;
 
 import java.util.List;
 
@@ -61,4 +62,10 @@
 	 */
 	List<UserExcel> exportUser(@Param("ew") Wrapper<User> queryWrapper);
 
+	/**
+	 * 按条件查询用户信息
+	 * @param user
+	 * @return
+	 */
+    List<UserVO> getUserListByParam(@Param("user") UserVO user);
 }
diff --git a/src/main/java/org/springblade/modules/system/mapper/UserMapper.xml b/src/main/java/org/springblade/modules/system/mapper/UserMapper.xml
index e65c4d3..2b64e98 100644
--- a/src/main/java/org/springblade/modules/system/mapper/UserMapper.xml
+++ b/src/main/java/org/springblade/modules/system/mapper/UserMapper.xml
@@ -74,4 +74,13 @@
         SELECT id, tenant_id, user_type, account, name, real_name, email, phone, birthday, role_id, dept_id, post_id FROM blade_user ${ew.customSqlSegment}
     </select>
 
+    <!--按条件查询用户信息-->
+    <select id="getUserListByParam" resultType="org.springblade.modules.system.vo.UserVO">
+        SELECT id, account, name, real_name, phone, role_id, dept_id, post_id FROM blade_user
+        where is_deleted = 0
+        <if test="user.roleId!=null and user.roleId!=''">
+            and role_id like concat('%',#{user.roleId},'%')
+        </if>
+    </select>
+
 </mapper>
diff --git a/src/main/java/org/springblade/modules/system/service/IUserService.java b/src/main/java/org/springblade/modules/system/service/IUserService.java
index 932d0a5..b4f6834 100644
--- a/src/main/java/org/springblade/modules/system/service/IUserService.java
+++ b/src/main/java/org/springblade/modules/system/service/IUserService.java
@@ -206,4 +206,11 @@
 	 * @return
 	 */
 	UserVO platformDetail(User user);
+
+	/**
+	 * 按条件查询用户信息
+	 * @param user
+	 * @return
+	 */
+    List<UserVO> getUserListByParam(UserVO user);
 }
diff --git a/src/main/java/org/springblade/modules/system/service/impl/UserServiceImpl.java b/src/main/java/org/springblade/modules/system/service/impl/UserServiceImpl.java
index 0cc5984..6e95565 100644
--- a/src/main/java/org/springblade/modules/system/service/impl/UserServiceImpl.java
+++ b/src/main/java/org/springblade/modules/system/service/impl/UserServiceImpl.java
@@ -22,6 +22,7 @@
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.core.toolkit.Wrappers;
 import lombok.AllArgsConstructor;
+import org.apache.logging.log4j.util.Strings;
 import org.springblade.common.cache.DictCache;
 import org.springblade.common.cache.ParamCache;
 import org.springblade.common.cache.SysCache;
@@ -431,4 +432,18 @@
 		return userVO;
 	}
 
+	/**
+	 * 按条件查询用户信息
+	 * @param user
+	 * @return
+	 */
+	@Override
+	public List<UserVO> getUserListByParam(UserVO user) {
+		if (!Strings.isBlank(user.getRoleName())){
+			// 查询对应的角色id
+			String roleIds = roleService.getRoleIds("000000", user.getRoleName());
+			user.setRoleId(roleIds);
+		}
+		return baseMapper.getUserListByParam(user);
+	}
 }

--
Gitblit v1.9.3