+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+package com.epmet.resi.group.dto.member;
+
+import lombok.Data;
+
+import java.io.Serializable;
+import java.util.Date;
+
+
+/**
+ * 小组参观记录表
+ *
+ * @author generator generator@elink-cn.com
+ * @since v1.0.0 2021-04-07
+ */
+@Data
+public class GroupVisitRecordDTO implements Serializable {
+
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * 主键(点击参观,加入记录)
+ */
+ private String id;
+
+ /**
+ * 客户id
+ */
+ private String customerId;
+
+ /**
+ * 小组所属网格id
+ */
+ private String gridId;
+
+ /**
+ * 小组id
+ */
+ private String groupId;
+
+ /**
+ * 用户id
+ */
+ private String userId;
+
+ /**
+ * 删除标识
+ */
+ private String delFlag;
+
+ /**
+ * 乐观锁
+ */
+ private Integer revision;
+
+ /**
+ * 当前访问用户id
+ */
+ private String createdBy;
+
+ /**
+ * 创建时间
+ */
+ private Date createdTime;
+
+ /**
+ * 更新人
+ */
+ private String updatedBy;
+
+ /**
+ * 更新时间
+ */
+ private Date updatedTime;
+
+}
\ No newline at end of file
diff --git a/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/member/GroupVisitorDTO.java b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/member/GroupVisitorDTO.java
new file mode 100644
index 0000000000..2fc7cb896a
--- /dev/null
+++ b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/member/GroupVisitorDTO.java
@@ -0,0 +1,97 @@
+/**
+ * Copyright 2018 人人开源 https://www.renren.io
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+package com.epmet.modules.member.dao;
+
+import com.epmet.commons.mybatis.dao.BaseDao;
+import com.epmet.modules.member.entity.GroupVisitRecordEntity;
+import org.apache.ibatis.annotations.Mapper;
+
+/**
+ * 小组参观记录表
+ *
+ * @author generator generator@elink-cn.com
+ * @since v1.0.0 2021-04-07
+ */
+@Mapper
+public interface GroupVisitRecordDao extends BaseDao {
+
+}
\ No newline at end of file
diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/member/dao/GroupVisitorDao.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/member/dao/GroupVisitorDao.java
new file mode 100644
index 0000000000..b2b8eed76b
--- /dev/null
+++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/member/dao/GroupVisitorDao.java
@@ -0,0 +1,33 @@
+/**
+ * Copyright 2018 人人开源 https://www.renren.io
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+package com.epmet.modules.member.dao;
+
+import com.epmet.commons.mybatis.dao.BaseDao;
+import com.epmet.modules.member.entity.GroupVisitorEntity;
+import org.apache.ibatis.annotations.Mapper;
+
+/**
+ * 小组参观者记录
+ *
+ * @author generator generator@elink-cn.com
+ * @since v1.0.0 2021-04-07
+ */
+@Mapper
+public interface GroupVisitorDao extends BaseDao {
+
+}
\ No newline at end of file
diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/member/entity/GroupVisitRecordEntity.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/member/entity/GroupVisitRecordEntity.java
new file mode 100644
index 0000000000..b4ebd7869f
--- /dev/null
+++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/member/entity/GroupVisitRecordEntity.java
@@ -0,0 +1,58 @@
+/**
+ * Copyright 2018 人人开源 https://www.renren.io
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+package com.epmet.modules.member.entity;
+
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.epmet.commons.mybatis.entity.BaseEpmetEntity;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+/**
+ * 小组参观记录表
+ *
+ * @author generator generator@elink-cn.com
+ * @since v1.0.0 2021-04-07
+ */
+@Data
+@EqualsAndHashCode(callSuper=false)
+@TableName("group_visit_record")
+public class GroupVisitRecordEntity extends BaseEpmetEntity {
+
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * 客户id
+ */
+ private String customerId;
+
+ /**
+ * 小组所属网格id
+ */
+ private String gridId;
+
+ /**
+ * 小组id
+ */
+ private String groupId;
+
+ /**
+ * 用户id
+ */
+ private String userId;
+
+}
diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/member/entity/GroupVisitorEntity.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/member/entity/GroupVisitorEntity.java
new file mode 100644
index 0000000000..0f72355c82
--- /dev/null
+++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/member/entity/GroupVisitorEntity.java
@@ -0,0 +1,66 @@
+/**
+ * Copyright 2018 人人开源 https://www.renren.io
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+package com.epmet.modules.member.entity;
+
+import com.baomidou.mybatisplus.annotation.TableName;
+
+import com.epmet.commons.mybatis.entity.BaseEpmetEntity;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+import java.util.Date;
+
+/**
+ * 小组参观者记录
+ *
+ * @author generator generator@elink-cn.com
+ * @since v1.0.0 2021-04-07
+ */
+@Data
+@EqualsAndHashCode(callSuper=false)
+@TableName("group_visitor")
+public class GroupVisitorEntity extends BaseEpmetEntity {
+
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * 客户id
+ */
+ private String customerId;
+
+ /**
+ * 小组id
+ */
+ private String groupId;
+
+ /**
+ * 小组所属网格id
+ */
+ private String gridId;
+
+ /**
+ * 用户id
+ */
+ private String userId;
+
+ /**
+ * 最近一次访问的时间
+ */
+ private Date latestVisitTime;
+
+}
diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/member/service/GroupVisitRecordService.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/member/service/GroupVisitRecordService.java
new file mode 100644
index 0000000000..5a1b54156c
--- /dev/null
+++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/member/service/GroupVisitRecordService.java
@@ -0,0 +1,85 @@
+/**
+ * Copyright 2018 人人开源 https://www.renren.io
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+package com.epmet.modules.member.service.impl;
+
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.epmet.commons.mybatis.service.impl.BaseServiceImpl;
+import com.epmet.commons.tools.constant.FieldConstant;
+import com.epmet.commons.tools.page.PageData;
+import com.epmet.commons.tools.utils.ConvertUtils;
+import com.epmet.modules.member.dao.GroupVisitRecordDao;
+import com.epmet.modules.member.entity.GroupVisitRecordEntity;
+import com.epmet.modules.member.service.GroupVisitRecordService;
+import com.epmet.resi.group.dto.member.GroupVisitRecordDTO;
+import org.apache.commons.lang3.StringUtils;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * 小组参观记录表
+ *
+ * @author generator generator@elink-cn.com
+ * @since v1.0.0 2021-04-07
+ */
+@Service
+public class GroupVisitRecordServiceImpl extends BaseServiceImpl implements GroupVisitRecordService {
+
+ @Override
+ public PageData page(Map params) {
+ IPage page = baseDao.selectPage(
+ getPage(params, FieldConstant.CREATED_TIME, false),
+ getWrapper(params)
+ );
+ return getPageData(page, GroupVisitRecordDTO.class);
+ }
+
+ @Override
+ public List list(Map params) {
+ List entityList = baseDao.selectList(getWrapper(params));
+
+ return ConvertUtils.sourceToTarget(entityList, GroupVisitRecordDTO.class);
+ }
+
+ private QueryWrapper getWrapper(Map params){
+ String id = (String)params.get(FieldConstant.ID_HUMP);
+
+ QueryWrapper wrapper = new QueryWrapper<>();
+ wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id);
+
+ return wrapper;
+ }
+
+ @Override
+ public GroupVisitRecordDTO get(String id) {
+ GroupVisitRecordEntity entity = baseDao.selectById(id);
+ return ConvertUtils.sourceToTarget(entity, GroupVisitRecordDTO.class);
+ }
+
+ @Override
+ @Transactional(rollbackFor = Exception.class)
+ public void save(GroupVisitRecordDTO dto) {
+ GroupVisitRecordEntity entity = ConvertUtils.sourceToTarget(dto, GroupVisitRecordEntity.class);
+ insert(entity);
+ }
+
+ @Override
+ @Transactional(rollbackFor = Exception.class)
+ public void update(GroupVisitRecordDTO dto) {
+ GroupVisitRecordEntity entity = ConvertUtils.sourceToTarget(dto, GroupVisitRecordEntity.class);
+ updateById(entity);
+ }
+
+
+}
\ No newline at end of file
diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/member/service/impl/GroupVisitorServiceImpl.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/member/service/impl/GroupVisitorServiceImpl.java
new file mode 100644
index 0000000000..83f8f6e1d4
--- /dev/null
+++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/member/service/impl/GroupVisitorServiceImpl.java
@@ -0,0 +1,93 @@
+/**
+ * Copyright 2018 人人开源 https://www.renren.io
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+package com.epmet.modules.member.service.impl;
+
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.epmet.commons.mybatis.service.impl.BaseServiceImpl;
+import com.epmet.commons.tools.constant.FieldConstant;
+import com.epmet.commons.tools.page.PageData;
+import com.epmet.commons.tools.utils.ConvertUtils;
+import com.epmet.modules.member.dao.GroupVisitorDao;
+import com.epmet.modules.member.entity.GroupVisitorEntity;
+import com.epmet.modules.member.service.GroupVisitorService;
+import com.epmet.resi.group.dto.member.GroupVisitorDTO;
+import org.apache.commons.lang3.StringUtils;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * 小组参观者记录
+ *
+ * @author generator generator@elink-cn.com
+ * @since v1.0.0 2021-04-07
+ */
+@Service
+public class GroupVisitorServiceImpl extends BaseServiceImpl implements GroupVisitorService {
+
+
+ @Override
+ public PageData page(Map params) {
+ IPage page = baseDao.selectPage(
+ getPage(params, FieldConstant.CREATED_TIME, false),
+ getWrapper(params)
+ );
+ return getPageData(page, GroupVisitorDTO.class);
+ }
+
+ @Override
+ public List list(Map params) {
+ List entityList = baseDao.selectList(getWrapper(params));
+
+ return ConvertUtils.sourceToTarget(entityList, GroupVisitorDTO.class);
+ }
+
+ private QueryWrapper getWrapper(Map params){
+ String id = (String)params.get(FieldConstant.ID_HUMP);
+
+ QueryWrapper wrapper = new QueryWrapper<>();
+ wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id);
+
+ return wrapper;
+ }
+
+ @Override
+ public GroupVisitorDTO get(String id) {
+ GroupVisitorEntity entity = baseDao.selectById(id);
+ return ConvertUtils.sourceToTarget(entity, GroupVisitorDTO.class);
+ }
+
+ @Override
+ @Transactional(rollbackFor = Exception.class)
+ public void save(GroupVisitorDTO dto) {
+ GroupVisitorEntity entity = ConvertUtils.sourceToTarget(dto, GroupVisitorEntity.class);
+ insert(entity);
+ }
+
+ @Override
+ @Transactional(rollbackFor = Exception.class)
+ public void update(GroupVisitorDTO dto) {
+ GroupVisitorEntity entity = ConvertUtils.sourceToTarget(dto, GroupVisitorEntity.class);
+ updateById(entity);
+ }
+
+
+}
\ No newline at end of file
diff --git a/epmet-module/resi-group/resi-group-server/src/main/resources/mapper/member/GroupVisitRecordDao.xml b/epmet-module/resi-group/resi-group-server/src/main/resources/mapper/member/GroupVisitRecordDao.xml
new file mode 100644
index 0000000000..f4b395b5a5
--- /dev/null
+++ b/epmet-module/resi-group/resi-group-server/src/main/resources/mapper/member/GroupVisitRecordDao.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/epmet-module/resi-group/resi-group-server/src/main/resources/mapper/member/GroupVisitorDao.xml b/epmet-module/resi-group/resi-group-server/src/main/resources/mapper/member/GroupVisitorDao.xml
new file mode 100644
index 0000000000..82303b9699
--- /dev/null
+++ b/epmet-module/resi-group/resi-group-server/src/main/resources/mapper/member/GroupVisitorDao.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
From 97914ad8d3256f9c826e7063c72268af16dc35fe Mon Sep 17 00:00:00 2001
From: yinzuomei <576302893@qq.com>
Date: Wed, 7 Apr 2021 10:46:31 +0800
Subject: [PATCH 03/11] =?UTF-8?q?groupvisitor=E6=BC=8F=E9=A2=98?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../controller/GroupVisitorController.java | 40 +++++++++++++++++++
1 file changed, 40 insertions(+)
create mode 100644 epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/member/controller/GroupVisitorController.java
diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/member/controller/GroupVisitorController.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/member/controller/GroupVisitorController.java
new file mode 100644
index 0000000000..5140967fb6
--- /dev/null
+++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/member/controller/GroupVisitorController.java
@@ -0,0 +1,40 @@
+/**
+ * Copyright 2018 人人开源 https://www.renren.io
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *