Browse Source

Merge remote-tracking branch 'origin/dev_visit_group' into dev_temp

# Conflicts:
#	epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/exception/EpmetErrorCode.java
#	epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/feign/fallback/GovIssueOpenFeignClientFallBack.java
master
yinzuomei 4 years ago
parent
commit
9d1298ec4c
  1. 1
      epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/exception/EpmetErrorCode.java
  2. 7
      epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/resigroup/ResiGroupDTO.java
  3. 4
      epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/entity/resigroup/ResiGroupEntity.java
  4. 9
      epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/feign/fallback/GovIssueOpenFeignClientFallBack.java
  5. 6
      epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/ExtUserInfoResultDTO.java
  6. 0
      epmet-module/gov-project/gov-project-server/src/main/resources/db/migration/V0.0.7__add_category_tag.sql
  7. 0
      epmet-module/gov-project/gov-project-server/src/main/resources/db/migration/V0.0.8__alter_category_tag.sql
  8. 2
      epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/constant/GroupStateConstant.java
  9. 8
      epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/group/ResiGroupDTO.java
  10. 4
      epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/group/form/ApplyCreateGroupFormDTO.java
  11. 92
      epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/member/GroupVisitRecordDTO.java
  12. 97
      epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/member/GroupVisitorDTO.java
  13. 4
      epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/entity/ResiGroupEntity.java
  14. 1
      epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/service/impl/ResiGroupServiceImpl.java
  15. 40
      epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/member/controller/GroupVisitorController.java
  16. 33
      epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/member/dao/GroupVisitRecordDao.java
  17. 33
      epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/member/dao/GroupVisitorDao.java
  18. 58
      epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/member/entity/GroupVisitRecordEntity.java
  19. 66
      epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/member/entity/GroupVisitorEntity.java
  20. 85
      epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/member/service/GroupVisitRecordService.java
  21. 85
      epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/member/service/GroupVisitorService.java
  22. 92
      epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/member/service/impl/GroupVisitRecordServiceImpl.java
  23. 93
      epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/member/service/impl/GroupVisitorServiceImpl.java
  24. 36
      epmet-module/resi-group/resi-group-server/src/main/resources/db/migration/V0.0.14__visit_group.sql
  25. 8
      epmet-module/resi-group/resi-group-server/src/main/resources/mapper/member/GroupVisitRecordDao.xml
  26. 8
      epmet-module/resi-group/resi-group-server/src/main/resources/mapper/member/GroupVisitorDao.xml
  27. 1
      epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/UserBaseInfoServiceImpl.java

1
epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/exception/EpmetErrorCode.java

@ -131,6 +131,7 @@ public enum EpmetErrorCode {
CUSTOMER_VALIDATE_ERROR(8805, "内部数据校验异常"),
CATEGORY_IS_NULL(8806, "请设置分类"),
//公众号 865..开头的码
PUBLIC_NOT_EXISTS(8651,"手机号未注册,请先完成信息注册"),
SELECT_CUSTOMER_ERROR(8652,"未查询到注册客户信息"),

7
epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/resigroup/ResiGroupDTO.java

@ -17,9 +17,10 @@
package com.epmet.dataaggre.dto.resigroup;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;
/**
@ -109,4 +110,8 @@ Ps: 如果一个小组被拒绝,当前小组的状态将永久停留在“审
*/
private Date updatedTime;
/**
* VISIT_SWITCH 小组是否允许参观:允许open;不允许closed
*/
private String visitSwitch;
}

4
epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/entity/resigroup/ResiGroupEntity.java

@ -79,4 +79,8 @@ Ps: 如果一个小组被拒绝,当前小组的状态将永久停留在“审
*/
private String auditSwitch;
/**
* VISIT_SWITCH 小组是否允许参观:允许open;不允许closed
*/
private String visitSwitch;
}

9
epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/feign/fallback/GovIssueOpenFeignClientFallBack.java

@ -240,6 +240,11 @@ public class GovIssueOpenFeignClientFallBack implements GovIssueOpenFeignClient
return ModuleUtils.feignConError(ServiceConstant.GOV_ISSUE_SERVER, "detail", formDTO);
}
@Override
public Result<List<ProjectCategoryDictResultDTO>> getCustomerCategoryDict(CustomerCategoryDTO customerCategoryDTO) {
return ModuleUtils.feignConError(ServiceConstant.GOV_ISSUE_SERVER, "getCustomerCategoryDict", customerCategoryDTO);
}
@Override
public Result<List<String>> notIssueToTopicIds(List<String> topicIdList) {
return ModuleUtils.feignConError(ServiceConstant.GOV_ISSUE_SERVER, "notIssueToTopicIds", topicIdList);
@ -250,8 +255,4 @@ public class GovIssueOpenFeignClientFallBack implements GovIssueOpenFeignClient
return ModuleUtils.feignConError(ServiceConstant.GOV_ISSUE_SERVER, "votingissuedetail", issueDetail);
}
@Override
public Result<List<ProjectCategoryDictResultDTO>> getCustomerCategoryDict(CustomerCategoryDTO customerCategoryDTO) {
return ModuleUtils.feignConError(ServiceConstant.GOV_ISSUE_SERVER, "getCustomerCategoryDict", customerCategoryDTO);
}
}

6
epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/ExtUserInfoResultDTO.java

@ -110,12 +110,6 @@ public class ExtUserInfoResultDTO implements Serializable {
*/
private String idNum;
/**
* 显示昵称 xx网格-y先生/女士
* */
private String showName;
/**
* 用户角色列表
* */

0
epmet-module/gov-project/gov-project-server/src/main/resources/db/migration/V0.0.5__add_category_tag.sql → epmet-module/gov-project/gov-project-server/src/main/resources/db/migration/V0.0.7__add_category_tag.sql

0
epmet-module/gov-project/gov-project-server/src/main/resources/db/migration/V0.0.7__alter_category_tag.sql → epmet-module/gov-project/gov-project-server/src/main/resources/db/migration/V0.0.8__alter_category_tag.sql

2
epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/constant/GroupStateConstant.java

@ -57,4 +57,6 @@ public interface GroupStateConstant {
* 进组审核open开启close关闭
*/
String AUDIT_SWITCH_CLOSED = "close";
String CLOSED="closed";
}

8
epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/group/ResiGroupDTO.java

@ -17,9 +17,10 @@
package com.epmet.resi.group.dto.group;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;
/**
@ -79,6 +80,11 @@ Ps: 如果一个小组被拒绝,当前小组的状态将永久停留在“审
*/
private String auditSwitch;
/**
* VISIT_SWITCH 小组是否允许参观:允许open;不允许closed
*/
private String visitSwitch;
/**
* 删除标记 0未删除1已删除
*/

4
epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/group/form/ApplyCreateGroupFormDTO.java

@ -65,4 +65,8 @@ public class ApplyCreateGroupFormDTO implements Serializable {
@NotBlank(message = "app不能为空")
private String app;
/**
* 小组是否允许参观:允许open;不允许closed
*/
private String visitSwitch;
}

92
epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/member/GroupVisitRecordDTO.java

@ -0,0 +1,92 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* 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.
* <p>
* 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.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
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;
}

97
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
* <p>
* 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.
* <p>
* 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.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
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 GroupVisitorDTO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 主键
*/
private String id;
/**
* 客户id
*/
private String customerId;
/**
* 小组id
*/
private String groupId;
/**
* 小组所属网格id
*/
private String gridId;
/**
* 用户id
*/
private String userId;
/**
* 最近一次访问的时间
*/
private Date latestVisitTime;
/**
* 删除标识
*/
private String delFlag;
/**
* 乐观锁
*/
private Integer revision;
/**
* 当前操作人id即组长id
*/
private String createdBy;
/**
* 创建时间:第一次参观的时间
*/
private Date createdTime;
/**
* 更新人
*/
private String updatedBy;
/**
* 更新时间
*/
private Date updatedTime;
}

4
epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/entity/ResiGroupEntity.java

@ -79,4 +79,8 @@ Ps: 如果一个小组被拒绝,当前小组的状态将永久停留在“审
*/
private String auditSwitch;
/**
* VISIT_SWITCH 小组是否允许参观:允许open;不允许closed
*/
private String visitSwitch;
}

1
epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/service/impl/ResiGroupServiceImpl.java

@ -517,6 +517,7 @@ public class ResiGroupServiceImpl extends BaseServiceImpl<ResiGroupDao, ResiGrou
resiGroupEntity.setGroupIntroduction(applyCreateGroupFormDTO.getGroupIntroduction());
resiGroupEntity.setCreatedBy(applyCreateGroupFormDTO.getUserId());
resiGroupEntity.setState(GroupStateConstant.GROUP_UNDER_AUDITTING);
resiGroupEntity.setVisitSwitch(StringUtils.isNotBlank(applyCreateGroupFormDTO.getVisitSwitch()) ? applyCreateGroupFormDTO.getVisitSwitch() : GroupStateConstant.CLOSED);
return resiGroupEntity;
}

40
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
* <p>
* 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.
* <p>
* 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.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.modules.member.controller;
import com.epmet.modules.member.service.GroupVisitorService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
/**
* 小组参观者记录
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2021-04-07
*/
@RestController
@RequestMapping("groupvisitor")
public class GroupVisitorController {
@Autowired
private GroupVisitorService groupVisitorService;
}

33
epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/member/dao/GroupVisitRecordDao.java

@ -0,0 +1,33 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* 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.
* <p>
* 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.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
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<GroupVisitRecordEntity> {
}

33
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
* <p>
* 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.
* <p>
* 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.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
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<GroupVisitorEntity> {
}

58
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
* <p>
* 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.
* <p>
* 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.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
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;
}

66
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
* <p>
* 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.
* <p>
* 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.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
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;
}

85
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
* <p>
* 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.
* <p>
* 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.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.modules.member.service;
import com.epmet.commons.mybatis.service.BaseService;
import com.epmet.commons.tools.page.PageData;
import com.epmet.modules.member.entity.GroupVisitRecordEntity;
import com.epmet.resi.group.dto.member.GroupVisitRecordDTO;
import java.util.List;
import java.util.Map;
/**
* 小组参观记录表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2021-04-07
*/
public interface GroupVisitRecordService extends BaseService<GroupVisitRecordEntity> {
/**
* 默认分页
*
* @param params
* @return PageData<GroupVisitRecordDTO>
* @author generator
* @date 2021-04-07
*/
PageData<GroupVisitRecordDTO> page(Map<String, Object> params);
/**
* 默认查询
*
* @param params
* @return java.util.List<GroupVisitRecordDTO>
* @author generator
* @date 2021-04-07
*/
List<GroupVisitRecordDTO> list(Map<String, Object> params);
/**
* 单条查询
*
* @param id
* @return GroupVisitRecordDTO
* @author generator
* @date 2021-04-07
*/
GroupVisitRecordDTO get(String id);
/**
* 默认保存
*
* @param dto
* @return void
* @author generator
* @date 2021-04-07
*/
void save(GroupVisitRecordDTO dto);
/**
* 默认更新
*
* @param dto
* @return void
* @author generator
* @date 2021-04-07
*/
void update(GroupVisitRecordDTO dto);
}

85
epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/member/service/GroupVisitorService.java

@ -0,0 +1,85 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* 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.
* <p>
* 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.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.modules.member.service;
import com.epmet.commons.mybatis.service.BaseService;
import com.epmet.commons.tools.page.PageData;
import com.epmet.modules.member.entity.GroupVisitorEntity;
import com.epmet.resi.group.dto.member.GroupVisitorDTO;
import java.util.List;
import java.util.Map;
/**
* 小组参观者记录
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2021-04-07
*/
public interface GroupVisitorService extends BaseService<GroupVisitorEntity> {
/**
* 默认分页
*
* @param params
* @return PageData<GroupVisitorDTO>
* @author generator
* @date 2021-04-07
*/
PageData<GroupVisitorDTO> page(Map<String, Object> params);
/**
* 默认查询
*
* @param params
* @return java.util.List<GroupVisitorDTO>
* @author generator
* @date 2021-04-07
*/
List<GroupVisitorDTO> list(Map<String, Object> params);
/**
* 单条查询
*
* @param id
* @return GroupVisitorDTO
* @author generator
* @date 2021-04-07
*/
GroupVisitorDTO get(String id);
/**
* 默认保存
*
* @param dto
* @return void
* @author generator
* @date 2021-04-07
*/
void save(GroupVisitorDTO dto);
/**
* 默认更新
*
* @param dto
* @return void
* @author generator
* @date 2021-04-07
*/
void update(GroupVisitorDTO dto);
}

92
epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/member/service/impl/GroupVisitRecordServiceImpl.java

@ -0,0 +1,92 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* 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.
* <p>
* 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.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
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<GroupVisitRecordDao, GroupVisitRecordEntity> implements GroupVisitRecordService {
@Override
public PageData<GroupVisitRecordDTO> page(Map<String, Object> params) {
IPage<GroupVisitRecordEntity> page = baseDao.selectPage(
getPage(params, FieldConstant.CREATED_TIME, false),
getWrapper(params)
);
return getPageData(page, GroupVisitRecordDTO.class);
}
@Override
public List<GroupVisitRecordDTO> list(Map<String, Object> params) {
List<GroupVisitRecordEntity> entityList = baseDao.selectList(getWrapper(params));
return ConvertUtils.sourceToTarget(entityList, GroupVisitRecordDTO.class);
}
private QueryWrapper<GroupVisitRecordEntity> getWrapper(Map<String, Object> params){
String id = (String)params.get(FieldConstant.ID_HUMP);
QueryWrapper<GroupVisitRecordEntity> 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);
}
}

93
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
* <p>
* 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.
* <p>
* 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.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
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<GroupVisitorDao, GroupVisitorEntity> implements GroupVisitorService {
@Override
public PageData<GroupVisitorDTO> page(Map<String, Object> params) {
IPage<GroupVisitorEntity> page = baseDao.selectPage(
getPage(params, FieldConstant.CREATED_TIME, false),
getWrapper(params)
);
return getPageData(page, GroupVisitorDTO.class);
}
@Override
public List<GroupVisitorDTO> list(Map<String, Object> params) {
List<GroupVisitorEntity> entityList = baseDao.selectList(getWrapper(params));
return ConvertUtils.sourceToTarget(entityList, GroupVisitorDTO.class);
}
private QueryWrapper<GroupVisitorEntity> getWrapper(Map<String, Object> params){
String id = (String)params.get(FieldConstant.ID_HUMP);
QueryWrapper<GroupVisitorEntity> 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);
}
}

36
epmet-module/resi-group/resi-group-server/src/main/resources/db/migration/V0.0.14__visit_group.sql

@ -0,0 +1,36 @@
DROP TABLE IF EXISTS `group_visitor`;
CREATE TABLE `group_visitor` (
`ID` varchar(64) NOT NULL COMMENT '主键',
`CUSTOMER_ID` varchar(64) NOT NULL COMMENT '客户id',
`GROUP_ID` varchar(64) NOT NULL COMMENT '小组id',
`GRID_ID` varchar(64) NOT NULL COMMENT '小组所属网格id',
`USER_ID` varchar(64) NOT NULL COMMENT '用户id',
`LATEST_VISIT_TIME` datetime NOT NULL COMMENT '最近一次访问的时间',
`DEL_FLAG` varchar(1) NOT NULL DEFAULT '0' COMMENT '删除标识',
`REVISION` int(11) NOT NULL DEFAULT '0' COMMENT '乐观锁',
`CREATED_BY` varchar(64) NOT NULL COMMENT '当前操作人id即组长id',
`CREATED_TIME` datetime NOT NULL COMMENT '创建时间:第一次参观的时间',
`UPDATED_BY` varchar(64) NOT NULL COMMENT '更新人',
`UPDATED_TIME` datetime NOT NULL COMMENT '更新时间',
PRIMARY KEY (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='小组参观者记录';
DROP TABLE IF EXISTS `group_visit_record`;
CREATE TABLE `group_visit_record` (
`ID` varchar(64) NOT NULL COMMENT '主键(点击参观,加入记录)',
`CUSTOMER_ID` varchar(64) NOT NULL COMMENT '客户id',
`GRID_ID` varchar(64) NOT NULL COMMENT '小组所属网格id',
`GROUP_ID` varchar(64) NOT NULL COMMENT '小组id',
`USER_ID` varchar(64) NOT NULL COMMENT '用户id',
`DEL_FLAG` varchar(1) NOT NULL DEFAULT '0' COMMENT '删除标识',
`REVISION` int(11) NOT NULL DEFAULT '0' COMMENT '乐观锁',
`CREATED_BY` varchar(64) NOT NULL COMMENT '当前访问用户id',
`CREATED_TIME` datetime NOT NULL COMMENT '创建时间',
`UPDATED_BY` varchar(64) NOT NULL COMMENT '更新人',
`UPDATED_TIME` datetime NOT NULL COMMENT '更新时间',
PRIMARY KEY (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='小组参观记录表';
alter table resi_group add COLUMN VISIT_SWITCH VARCHAR(6)
NOT NULL DEFAULT 'closed' comment '小组是否允许参观:允许:open;不允许:closed' AFTER AUDIT_SWITCH;

8
epmet-module/resi-group/resi-group-server/src/main/resources/mapper/member/GroupVisitRecordDao.xml

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.epmet.modules.member.dao.GroupVisitRecordDao">
</mapper>

8
epmet-module/resi-group/resi-group-server/src/main/resources/mapper/member/GroupVisitorDao.xml

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.epmet.modules.member.dao.GroupVisitorDao">
</mapper>

1
epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/UserBaseInfoServiceImpl.java

@ -381,7 +381,6 @@ public class UserBaseInfoServiceImpl extends BaseServiceImpl<UserBaseInfoDao, Us
result.setDistrict(userMsg.getDistrict());
result.setBuildingAddress(userMsg.getBuildingAddress());
result.setIdNum(userMsg.getIdNum());
result.setShowName(userMsg.getShowName());
// 2020.11.24 sun start
result.setMobile(StringUtils.isNotBlank(userMsg.getMobile()) ? userMsg.getMobile() : "");
List<UserWechatEntity> list = userWechatDao.selectByUserId(param.getUserId());

Loading…
Cancel
Save