*
- * @params [userDetail, formDto]
* @return com.elink.esua.epdc.commons.tools.utils.Result
+ * @params [userDetail, formDto]
* @author liuchuang
* @since 2019/10/25 16:26
*/
+ @Deprecated
Result updateWxInfo(TokenDto userDetail, EpdcAppUserMaInfoFormDTO formDto);
/**
@@ -189,6 +212,17 @@ public interface AppUserService {
*/
Result completeUserInfo(TokenDto tokenDto, EpdcCompleteUserInfoFormDTO formDto);
+ /**
+ * 用户完善个人信息-保存
+ *
+ * @param tokenDto
+ * @param formDto
+ * @return com.elink.esua.epdc.commons.tools.utils.Result
+ * @author work@yujt.net.cn
+ * @date 2019/10/26 11:05
+ */
+ Result completeUserInfo(TokenDto tokenDto, EpdcCompleteUserInfoFormV2DTO formDto);
+
/**
* 用于用户完善个人信息页面,获取个人信息
*
@@ -215,5 +249,15 @@ public interface AppUserService {
* @Description 查看用户是否已保存unionId
* @Date 2019/12/7 14:32
**/
- Result checkWxUnionId(TokenDto tokenDto);
+ Result checkWxUnionId(TokenDto tokenDto);
+
+ /**
+ * 获取用户微信手机号
+ *
+ * @param formDto
+ * @return com.elink.esua.epdc.commons.tools.utils.Result
+ * @author work@yujt.net.cn
+ * @date 2020/2/20 17:24
+ */
+ Result getUserWxPhone(EpdcAppUserMaInfoFormDTO formDto);
}
diff --git a/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/service/impl/AppUserServiceImpl.java b/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/service/impl/AppUserServiceImpl.java
index 0368e1578..9ec397831 100644
--- a/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/service/impl/AppUserServiceImpl.java
+++ b/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/service/impl/AppUserServiceImpl.java
@@ -1,6 +1,8 @@
package com.elink.esua.epdc.service.impl;
+import cn.binarywang.wx.miniapp.api.WxMaService;
import cn.binarywang.wx.miniapp.bean.WxMaJscode2SessionResult;
+import cn.binarywang.wx.miniapp.bean.WxMaPhoneNumberInfo;
import cn.binarywang.wx.miniapp.bean.WxMaUserInfo;
import cn.binarywang.wx.miniapp.util.crypt.WxMaCryptUtils;
import com.alibaba.fastjson.JSONObject;
@@ -17,20 +19,23 @@ import com.elink.esua.epdc.dto.*;
import com.elink.esua.epdc.dto.enums.GroupUserStateEnum;
import com.elink.esua.epdc.dto.epdc.EpdcCompleteAppUserDTO;
import com.elink.esua.epdc.dto.epdc.EpdcGridLeaderRegisterDTO;
-import com.elink.esua.epdc.dto.epdc.form.EpdcGridLeaderRegisterFormDTO;
import com.elink.esua.epdc.dto.epdc.GridLeaderRegisterDTO;
import com.elink.esua.epdc.dto.epdc.form.*;
import com.elink.esua.epdc.dto.epdc.result.EpdcUserGridResultDTO;
-import com.elink.esua.epdc.dto.epdc.result.EpdcUserRegisterInfoResultDTO;
import com.elink.esua.epdc.dto.epdc.result.EpdcUserInfoResultDTO;
+import com.elink.esua.epdc.dto.epdc.result.EpdcUserRegisterInfoResultDTO;
import com.elink.esua.epdc.dto.epdc.result.UserInvitationRecordResultDTO;
import com.elink.esua.epdc.dto.form.*;
+import com.elink.esua.epdc.dto.form.v2.EpdcCompleteUserInfoFormV2DTO;
import com.elink.esua.epdc.dto.group.form.GroupUserFormDTO;
import com.elink.esua.epdc.dto.group.form.GroupUserPartyMemberFormDTO;
-import com.elink.esua.epdc.dto.result.EpdcAppRegisterCallbackDTO;
import com.elink.esua.epdc.dto.result.EpdcAppAuthorizationDTO;
+import com.elink.esua.epdc.dto.result.EpdcAppRegisterCallbackDTO;
import com.elink.esua.epdc.dto.result.EpdcCompleteUserInfoDTO;
-import com.elink.esua.epdc.enums.*;
+import com.elink.esua.epdc.enums.AppUserAuditStateEnum;
+import com.elink.esua.epdc.enums.AppUserRegisterSourceEnum;
+import com.elink.esua.epdc.enums.AppUserRegisterWayEnum;
+import com.elink.esua.epdc.enums.AppUserStatesEnum;
import com.elink.esua.epdc.feign.AdminFeignClient;
import com.elink.esua.epdc.feign.GroupFeignClient;
import com.elink.esua.epdc.feign.OssFeignClient;
@@ -107,6 +112,10 @@ public class AppUserServiceImpl implements AppUserService {
//private static String USER_FACE = "https://epdc.elinkchina.com.cn/esua-epdc/static/default/default_user_face.png";
private static String USER_FACE = "https://epdc-shibei.elinkservice.cn/epdcFile/M00/00/00/CgUipV3wgl6Afm4cAAAa8QfEb00266_big.png";
+ /**
+ * 小程序首页
+ */
+ private static String MA_FRONT_PAGE_URL = "pages/index/index";
@Override
public Result getMpToken(EpdcAppUserTokenFormDTO formDto) {
@@ -135,6 +144,48 @@ public class AppUserServiceImpl implements AppUserService {
return this.userFeignClient.saveWxFormId(saveFormId);
}
+ /**
+ * 用户生成小程序码-永久有效,数量暂无限制
+ *
+ * @param formDto
+ * @return com.elink.esua.epdc.commons.tools.utils.Result
+ * @author yinzuomei
+ * @date 2020/03/01 09:14
+ */
+ @Override
+ public Result createQRCodeUnlimited(InvitedQRCodeFormDTO formDto) {
+ //1、先查询是否已经生成过,有则直接返回
+ EpdcUserGridInvitationCodeFormDTO userGridInvitationCodeFormDTO = new EpdcUserGridInvitationCodeFormDTO();
+ userGridInvitationCodeFormDTO.setGridId(formDto.getGridId().toString());
+ userGridInvitationCodeFormDTO.setInviteUserId(formDto.getInviteUserId());
+ Result result = userFeignClient.getUserGridInvitationCodeDTO(userGridInvitationCodeFormDTO);
+ if (!result.success()) {
+ throw new RenException("用户网格邀请码查询失败");
+ } else if (null != result.getData() && StringUtils.isNotBlank(result.getData().getInvitationCodeUrl())) {
+ return new Result().ok(result.getData().getInvitationCodeUrl());
+ }
+ //2、调用微信接口生成小程序码
+ File wxaCodeUnlimit;
+ try {
+ wxaCodeUnlimit = wxMaServiceUtils.normalWxMaService().getQrcodeService()
+ .createWxaCodeUnlimit(result.getData().getId(), MA_FRONT_PAGE_URL, 1280, true, null, false);
+ } catch (WxErrorException e) {
+ throw new RenException("请求微信接口失败");
+ }
+ //3、上传到服务器
+ UploadToOssDTO dto = new UploadToOssDTO();
+ dto.setFileByte(this.fileToByteArray(wxaCodeUnlimit));
+ dto.setFileName(wxaCodeUnlimit.getName());
+ Result ossResult = ossFeignClient.uploadFile(dto);
+ if (null == ossResult || !ossResult.success() || null == ossResult.getData()) {
+ throw new RenException("邀请码上传失败");
+ }
+ //4、回写用户网格邀请码表
+ result.getData().setInvitationCodeUrl(ossResult.getData());
+ Result updateResult = userFeignClient.updateInvitationCodeUrl(result.getData());
+ return ossResult;
+ }
+
/**
* 创建微信小程序码,并上传到oss
*
@@ -684,6 +735,21 @@ public class AppUserServiceImpl implements AppUserService {
return this.dealWithUserRegisterState(userResult.getData(), openId, unionId, IpUtils.getIpAddr(request), formDto.getInviteUserId());
}
+ @Override
+ public Result getMaV3Token(EpdcAppUserRegisterV3FormDTO formDto) {
+ EpdcAppUserRegisterFormDTO epdcAppUserRegisterFormDTO = new EpdcAppUserRegisterFormDTO();
+ Result res = userFeignClient.queryUserGridInvitationCodeDTO(formDto.getGridId());
+ if (res.success() && null != res.getData()) {
+ epdcAppUserRegisterFormDTO.setGridId(Long.valueOf(res.getData().getGridId()));
+ epdcAppUserRegisterFormDTO.setInviteUserId(res.getData().getInviteUserId());
+ } else {
+ epdcAppUserRegisterFormDTO.setGridId(Long.valueOf(formDto.getGridId()));
+ epdcAppUserRegisterFormDTO.setInviteUserId(formDto.getInviteUserId());
+ }
+ epdcAppUserRegisterFormDTO.setWxCode(formDto.getWxCode());
+ return this.getMaV2Token(epdcAppUserRegisterFormDTO);
+ }
+
/**
* 针对不同用户注册状态进行处理
*
@@ -960,6 +1026,23 @@ public class AppUserServiceImpl implements AppUserService {
return null;
}
+ @Override
+ public Result completeUserInfo(TokenDto tokenDto, EpdcCompleteUserInfoFormDTO infoDto) {
+ UserDTO userDto = ConvertUtils.sourceToTarget(infoDto, UserDTO.class);
+ userDto.setDeptId(infoDto.getGridId());
+ userDto.setId(tokenDto.getUserId());
+ return this.completeUserInfo(tokenDto, userDto, infoDto.getWxCode(), infoDto.getEncryptedData(), infoDto.getIv(), infoDto.getSmsCode());
+ }
+
+
+ @Override
+ public Result completeUserInfo(TokenDto tokenDto, EpdcCompleteUserInfoFormV2DTO infoDto) {
+ UserDTO userDto = ConvertUtils.sourceToTarget(infoDto, UserDTO.class);
+ userDto.setDeptId(infoDto.getGridId());
+ userDto.setId(tokenDto.getUserId());
+ return this.completeUserInfo(tokenDto, userDto, infoDto.getWxCode(), infoDto.getEncryptedData(), infoDto.getIv(), null);
+ }
+
@Override
public Result prepareCompleteUserInfo(TokenDto tokenDto) {
@@ -1185,4 +1268,20 @@ public class AppUserServiceImpl implements AppUserService {
}
return result;
}
+
+ @Override
+ public Result getUserWxPhone(EpdcAppUserMaInfoFormDTO formDto) {
+ try {
+ WxMaService wxMaService = wxMaServiceUtils.normalWxMaService();
+ WxMaJscode2SessionResult wxMaJscode2SessionResult = wxMaService.jsCode2SessionInfo(formDto.getWxCode());
+ WxMaPhoneNumberInfo phoneNoInfo = wxMaService.getUserService().getPhoneNoInfo(wxMaJscode2SessionResult.getSessionKey(), formDto.getEncryptedData(), formDto.getIv());
+ if (null != phoneNoInfo) {
+ return new Result().ok(phoneNoInfo.getPurePhoneNumber());
+ }
+ } catch (WxErrorException e) {
+ e.printStackTrace();
+ log.error(e.getError().getErrorMsg());
+ }
+ return new Result().error("解析用户手机号失败");
+ }
}
diff --git a/esua-epdc/epdc-module/epdc-events/epdc-events-client/src/main/java/com/elink/esua/epdc/dto/issue/IssueWaitHandleOrClosedDTO.java b/esua-epdc/epdc-module/epdc-events/epdc-events-client/src/main/java/com/elink/esua/epdc/dto/issue/IssueWaitHandleOrClosedDTO.java
index 1a4ee82be..4c8b0d71b 100644
--- a/esua-epdc/epdc-module/epdc-events/epdc-events-client/src/main/java/com/elink/esua/epdc/dto/issue/IssueWaitHandleOrClosedDTO.java
+++ b/esua-epdc/epdc-module/epdc-events/epdc-events-client/src/main/java/com/elink/esua/epdc/dto/issue/IssueWaitHandleOrClosedDTO.java
@@ -62,4 +62,9 @@ public class IssueWaitHandleOrClosedDTO implements Serializable {
* 来源:话题名称或者‘党群议事’
*/
private String groupName;
+
+ /**
+ * 项目状态 0-处理中,5-已关闭,10-已结案
+ */
+ private String itemState;
}
diff --git a/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/resources/mapper/issue/IssueDao.xml b/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/resources/mapper/issue/IssueDao.xml
index a893ec266..b13373de1 100644
--- a/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/resources/mapper/issue/IssueDao.xml
+++ b/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/resources/mapper/issue/IssueDao.xml
@@ -19,11 +19,13 @@
WHEN trim( issue.GROUP_NAME ) != ''
AND issue.GROUP_NAME IS NOT NULL
THEN issue.GROUP_NAME ELSE '党群议事'
- END ) AS groupName
+ END ) AS groupName,
+ ei.ITEM_STATE as itemState
FROM
epdc_issue issue
LEFT JOIN epdc_events e ON issue.EVENT_ID = e.ID
AND e.DEL_FLAG = '0'
+ left join epdc_item ei on( issue.id=ei.ISSUE_ID and ei.del_flag='0')
WHERE
issue.DEL_FLAG = '0'
and issue.ISSUE_STATE = #{state}
@@ -57,6 +59,9 @@
and trim(issue.GROUP_NAME) !=''
and issue.GROUP_NAME is not null
+
+ and ei.ITEM_STATE=#{itemState}
+
ORDER BY
issue.CREATED_TIME DESC
diff --git a/esua-epdc/epdc-module/epdc-user/epdc-user-client/src/main/java/com/elink/esua/epdc/dto/UserGridInvitationCodeDTO.java b/esua-epdc/epdc-module/epdc-user/epdc-user-client/src/main/java/com/elink/esua/epdc/dto/UserGridInvitationCodeDTO.java
new file mode 100644
index 000000000..0b7925367
--- /dev/null
+++ b/esua-epdc/epdc-module/epdc-user/epdc-user-client/src/main/java/com/elink/esua/epdc/dto/UserGridInvitationCodeDTO.java
@@ -0,0 +1,86 @@
+/**
+ * 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.elink.esua.epdc.controller;
+
+import com.elink.esua.epdc.commons.tools.page.PageData;
+import com.elink.esua.epdc.commons.tools.utils.ExcelUtils;
+import com.elink.esua.epdc.commons.tools.utils.Result;
+import com.elink.esua.epdc.commons.tools.validator.AssertUtils;
+import com.elink.esua.epdc.commons.tools.validator.ValidatorUtils;
+import com.elink.esua.epdc.commons.tools.validator.group.AddGroup;
+import com.elink.esua.epdc.commons.tools.validator.group.DefaultGroup;
+import com.elink.esua.epdc.commons.tools.validator.group.UpdateGroup;
+import com.elink.esua.epdc.dto.UserGridInvitationCodeDTO;
+import com.elink.esua.epdc.dto.epdc.form.EpdcUserGridInvitationCodeFormDTO;
+import com.elink.esua.epdc.excel.UserGridInvitationCodeExcel;
+import com.elink.esua.epdc.service.UserGridInvitationCodeService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+import javax.servlet.http.HttpServletResponse;
+import java.util.List;
+import java.util.Map;
+
+
+/**
+ * 用户网格邀请码表 用户网格邀请码表
+ *
+ * @author qu qu@elink-cn.com
+ * @since v1.0.0 2020-03-01
+ */
+@RestController
+@RequestMapping("usergridinvitationcode")
+public class UserGridInvitationCodeController {
+
+ @Autowired
+ private UserGridInvitationCodeService userGridInvitationCodeService;
+
+ @GetMapping("page")
+ public Result> page(@RequestParam Map params){
+ PageData page = userGridInvitationCodeService.page(params);
+ return new Result>().ok(page);
+ }
+
+ @GetMapping("{id}")
+ public Result get(@PathVariable("id") String id){
+ UserGridInvitationCodeDTO data = userGridInvitationCodeService.get(id);
+ return new Result().ok(data);
+ }
+
+ @PostMapping
+ public Result save(@RequestBody UserGridInvitationCodeDTO dto){
+ //效验数据
+ ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class);
+ userGridInvitationCodeService.save(dto);
+ return new Result();
+ }
+
+ @PutMapping
+ public Result update(@RequestBody UserGridInvitationCodeDTO dto){
+ //效验数据
+ ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class);
+ userGridInvitationCodeService.update(dto);
+ return new Result();
+ }
+
+ @DeleteMapping
+ public Result delete(@RequestBody String[] ids){
+ //效验数据
+ AssertUtils.isArrayEmpty(ids, "id");
+ userGridInvitationCodeService.delete(ids);
+ return new Result();
+ }
+
+ @GetMapping("export")
+ public void export(@RequestParam Map params, HttpServletResponse response) throws Exception {
+ List list = userGridInvitationCodeService.list(params);
+ ExcelUtils.exportExcelToTarget(response, null, list, UserGridInvitationCodeExcel.class);
+ }
+
+ /**
+ * @return com.elink.esua.epdc.commons.tools.utils.Result
+ * @param formDTO
+ * @Author yinzuomei
+ * @Description 查询用户邀请码生成记录
+ * @Date 2020/3/1 17:44
+ **/
+ @PostMapping("getUserGridInvitationCodeDTO")
+ public Result getUserGridInvitationCodeDTO(@RequestBody EpdcUserGridInvitationCodeFormDTO formDTO){
+ ValidatorUtils.validateEntity(formDTO);
+ return userGridInvitationCodeService.getUserGridInvitationCodeDTO(formDTO);
+ }
+
+ /**
+ * @return com.elink.esua.epdc.commons.tools.utils.Result
+ * @param dto
+ * @Author yinzuomei
+ * @Description 回写用户网格邀请码表
+ * @Date 2020/3/1 18:00
+ **/
+ @PostMapping("updateInvitationCodeUrl")
+ public Result updateInvitationCodeUrl(@RequestBody UserGridInvitationCodeDTO dto){
+ //效验数据
+ ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class);
+ userGridInvitationCodeService.update(dto);
+ return new Result();
+ }
+
+ /**
+ * @return com.elink.esua.epdc.commons.tools.utils.Result
+ * @param id
+ * @Author yinzuomei
+ * @Description 根据用户网格邀请码表主键查询记录
+ * @Date 2020/3/1 16:32
+ **/
+ @GetMapping("queryUserGridInvitationCodeDTO/{id}")
+ public Result queryUserGridInvitationCodeDTO(@PathVariable("id") String id){
+ UserGridInvitationCodeDTO data = userGridInvitationCodeService.get(id);
+ return new Result().ok(data);
+ }
+}
diff --git a/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/dao/UserGridInvitationCodeDao.java b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/dao/UserGridInvitationCodeDao.java
new file mode 100644
index 000000000..2653b00a1
--- /dev/null
+++ b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/dao/UserGridInvitationCodeDao.java
@@ -0,0 +1,43 @@
+/**
+ * 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.elink.esua.epdc.dao;
+
+import com.elink.esua.epdc.commons.mybatis.dao.BaseDao;
+import com.elink.esua.epdc.dto.UserGridInvitationCodeDTO;
+import com.elink.esua.epdc.dto.epdc.form.EpdcUserGridInvitationCodeFormDTO;
+import com.elink.esua.epdc.entity.UserGridInvitationCodeEntity;
+import org.apache.ibatis.annotations.Mapper;
+
+/**
+ * 用户网格邀请码表 用户网格邀请码表
+ *
+ * @author qu qu@elink-cn.com
+ * @since v1.0.0 2020-03-01
+ */
+@Mapper
+public interface UserGridInvitationCodeDao extends BaseDao {
+
+ /**
+ * @return com.elink.esua.epdc.dto.UserGridInvitationCodeDTO
+ * @param formDto
+ * @Author yinzuomei
+ * @Description 根据网格id、邀请人ID查询邀请码
+ * @Date 2020/3/1 15:29
+ **/
+ UserGridInvitationCodeDTO selectUserGridInvitationCodeDTO(EpdcUserGridInvitationCodeFormDTO formDto);
+}
diff --git a/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/entity/UserGridInvitationCodeEntity.java b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/entity/UserGridInvitationCodeEntity.java
new file mode 100644
index 000000000..951ca3249
--- /dev/null
+++ b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/entity/UserGridInvitationCodeEntity.java
@@ -0,0 +1,56 @@
+/**
+ * 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.elink.esua.epdc.entity;
+
+import com.baomidou.mybatisplus.annotation.TableName;
+
+import com.elink.esua.epdc.commons.mybatis.entity.BaseEpdcEntity;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+import java.util.Date;
+
+/**
+ * 用户网格邀请码表 用户网格邀请码表
+ *
+ * @author qu qu@elink-cn.com
+ * @since v1.0.0 2020-03-01
+ */
+@Data
+@EqualsAndHashCode(callSuper=false)
+@TableName("epdc_user_grid_invitation_code")
+public class UserGridInvitationCodeEntity extends BaseEpdcEntity {
+
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * 网格ID
+ */
+ private String gridId;
+
+ /**
+ * 邀请人ID
+ */
+ private String inviteUserId;
+
+ /**
+ * 邀请码
+ */
+ private String invitationCodeUrl;
+
+}
\ No newline at end of file
diff --git a/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/excel/UserGridInvitationCodeExcel.java b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/excel/UserGridInvitationCodeExcel.java
new file mode 100644
index 000000000..364675ca4
--- /dev/null
+++ b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/excel/UserGridInvitationCodeExcel.java
@@ -0,0 +1,65 @@
+/**
+ * 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.elink.esua.epdc.excel;
+
+import cn.afterturn.easypoi.excel.annotation.Excel;
+import lombok.Data;
+
+import java.util.Date;
+
+/**
+ * 用户网格邀请码表 用户网格邀请码表
+ *
+ * @author qu qu@elink-cn.com
+ * @since v1.0.0 2020-03-01
+ */
+@Data
+public class UserGridInvitationCodeExcel {
+
+ @Excel(name = "主键")
+ private String id;
+
+ @Excel(name = "网格ID")
+ private String gridId;
+
+ @Excel(name = "邀请人ID")
+ private String inviteUserId;
+
+ @Excel(name = "邀请码")
+ private String invitationCodeUrl;
+
+ @Excel(name = "乐观锁")
+ private Integer revision;
+
+ @Excel(name = "创建人")
+ private String createdBy;
+
+ @Excel(name = "创建时间")
+ private Date createdTime;
+
+ @Excel(name = "更新人")
+ private String updatedBy;
+
+ @Excel(name = "更新时间")
+ private Date updatedTime;
+
+ @Excel(name = "删除标记")
+ private String delFlag;
+
+
+}
\ No newline at end of file
diff --git a/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/redis/UserGridInvitationCodeRedis.java b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/redis/UserGridInvitationCodeRedis.java
new file mode 100644
index 000000000..61640c338
--- /dev/null
+++ b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/redis/UserGridInvitationCodeRedis.java
@@ -0,0 +1,47 @@
+/**
+ * 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.elink.esua.epdc.redis;
+
+import com.elink.esua.epdc.commons.tools.redis.RedisUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Component;
+
+/**
+ * 用户网格邀请码表 用户网格邀请码表
+ *
+ * @author qu qu@elink-cn.com
+ * @since v1.0.0 2020-03-01
+ */
+@Component
+public class UserGridInvitationCodeRedis {
+ @Autowired
+ private RedisUtils redisUtils;
+
+ public void delete(Object[] ids) {
+
+ }
+
+ public void set(){
+
+ }
+
+ public String get(String id){
+ return null;
+ }
+
+}
\ No newline at end of file
diff --git a/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/service/UserGridInvitationCodeService.java b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/service/UserGridInvitationCodeService.java
new file mode 100644
index 000000000..2fcf09cd2
--- /dev/null
+++ b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/service/UserGridInvitationCodeService.java
@@ -0,0 +1,99 @@
+/**
+ * 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.
+ *