diff --git a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/constant/FieldConstant.java b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/constant/FieldConstant.java
index b2d467d6f4..d99374d1b0 100644
--- a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/constant/FieldConstant.java
+++ b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/constant/FieldConstant.java
@@ -49,6 +49,7 @@ public interface FieldConstant {
String GRID_ID = "GRID_ID";
String GRID_ID_HUMP = "gridId";
-
+ String USER_ID = "USER_ID";
+ String USER_ID_HUMP = "userId";
}
diff --git a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/constant/ServiceConstant.java b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/constant/ServiceConstant.java
index c136164acc..eab4df7b72 100644
--- a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/constant/ServiceConstant.java
+++ b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/constant/ServiceConstant.java
@@ -24,6 +24,11 @@ public interface ServiceConstant {
*/
String EPMET_AUTH_SERVER = "epmet-auth-server";
+ /**
+ * 文件对象模块
+ */
+ String EPMET_OSS_SERVER = "epmet-oss-server";
+
/**
* 用户管理模块
*/
diff --git a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/exception/EpmetErrorCode.java b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/exception/EpmetErrorCode.java
index c4262835b7..fe76e0f607 100644
--- a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/exception/EpmetErrorCode.java
+++ b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/exception/EpmetErrorCode.java
@@ -25,7 +25,8 @@ public enum EpmetErrorCode {
*/
MOBILE_EXIST(8201, "该手机号已注册居民,请使用其他手机号注册!"),
PARAMETER_EXCEPTION(8202, "必要参数存在空值或手机号输入不合规,请检查参数赋值情况!!"),
- UPDATE_EXCEPTION(8203, "用户居民注册访问记录表更新数据失败!");
+ UPDATE_EXCEPTION(8203, "用户居民注册访问记录表更新数据失败!"),
+ PARTICIPATION_EXCEPTION(8204, "参数异常,请检查所传参数是否合规!");
private int value;
diff --git a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/redis/RedisKeys.java b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/redis/RedisKeys.java
index fe3e8b4a0d..9d0d310866 100644
--- a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/redis/RedisKeys.java
+++ b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/redis/RedisKeys.java
@@ -135,4 +135,18 @@ public class RedisKeys {
return rootPrefix.concat("party:member:confirm:").concat(userId).concat("-").concat(mobile).concat("-").concat(code);
}
+ /**
+ *
+ * 居民注册手机验证码key
+ *
+ * @param userId 用户id
+ * @param mobile 手机号
+ * @param code 验证码
+ * @return String
+ * @author sun
+ */
+ public static String getResiRegisterMobileCodeKey(String userId, String mobile, String code) {
+ return rootPrefix.concat("resiregister:confirm:").concat(userId).concat("-").concat(mobile).concat("-").concat(code);
+ }
+
}
diff --git a/epmet-gateway/src/main/resources/bootstrap.yml b/epmet-gateway/src/main/resources/bootstrap.yml
index a5c57a6531..dec03ba191 100644
--- a/epmet-gateway/src/main/resources/bootstrap.yml
+++ b/epmet-gateway/src/main/resources/bootstrap.yml
@@ -52,6 +52,7 @@ spring:
- Path=${server.servlet.context-path}/oss/**
filters:
- StripPrefix=1
+ - CpAuth=true
#消息服务
- id: epmet-message-server
uri: @gateway.routes.epmet-message-server.uri@
diff --git a/epmet-module/epmet-message/epmet-message-client/src/main/java/com/epmet/dto/UserMessageDTO.java b/epmet-module/epmet-message/epmet-message-client/src/main/java/com/epmet/dto/UserMessageDTO.java
new file mode 100644
index 0000000000..f8b887c240
--- /dev/null
+++ b/epmet-module/epmet-message/epmet-message-client/src/main/java/com/epmet/dto/UserMessageDTO.java
@@ -0,0 +1,107 @@
+/**
+ * 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.dto;
+
+import lombok.Data;
+
+import java.io.Serializable;
+import java.util.Date;
+
+
+/**
+ * 用户消息表
+ *
+ * @author generator generator@elink-cn.com
+ * @since v1.0.0 2020-04-07
+ */
+@Data
+public class UserMessageDTO implements Serializable {
+
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * 主键
+ */
+ private String id;
+
+ /**
+ * 客户id
+ */
+ private String customerId;
+
+ /**
+ * app=resi时,此列为gridId,其他情况暂定 *
+ */
+ private String gridId;
+
+ /**
+ * 对应用户id
+ */
+ private String userId;
+
+ /**
+ * 消息通知对象:居民端用户resi、政府端工作人员gov、运营端工作人员oper
+ */
+ private String app;
+
+ /**
+ * 消息标题
+ */
+ private String title;
+
+ /**
+ * 消息通知内容
+ */
+ private String messageContent;
+
+ /**
+ * read已读、unread未读
+ */
+ private String readFlag;
+
+ /**
+ * 删除标记 0:未删除,1:已删除
+ */
+ private String delFlag;
+
+ /**
+ * 乐观锁
+ */
+ private Integer revision;
+
+ /**
+ * 创建人(发布消息的人)
+ */
+ private String createdBy;
+
+ /**
+ * 创建时间
+ */
+ private Date createdTime;
+
+ /**
+ * 更新人
+ */
+ private String updatedBy;
+
+ /**
+ * 更新时间
+ */
+ private Date updatedTime;
+
+}
\ No newline at end of file
diff --git a/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/controller/UserMessageController.java b/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/controller/UserMessageController.java
new file mode 100644
index 0000000000..ad77e7ea2a
--- /dev/null
+++ b/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/controller/UserMessageController.java
@@ -0,0 +1,94 @@
+/**
+ * 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.controller;
+
+import com.epmet.commons.tools.page.PageData;
+import com.epmet.commons.tools.utils.ExcelUtils;
+import com.epmet.commons.tools.utils.Result;
+import com.epmet.commons.tools.validator.AssertUtils;
+import com.epmet.commons.tools.validator.ValidatorUtils;
+import com.epmet.commons.tools.validator.group.AddGroup;
+import com.epmet.commons.tools.validator.group.UpdateGroup;
+import com.epmet.commons.tools.validator.group.DefaultGroup;
+import com.epmet.dto.UserMessageDTO;
+import com.epmet.excel.UserMessageExcel;
+import com.epmet.service.UserMessageService;
+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 generator generator@elink-cn.com
+ * @since v1.0.0 2020-04-07
+ */
+@RestController
+@RequestMapping("usermessage")
+public class UserMessageController {
+
+ @Autowired
+ private UserMessageService userMessageService;
+
+ @GetMapping("page")
+ public Result> page(@RequestParam Map params){
+ PageData page = userMessageService.page(params);
+ return new Result>().ok(page);
+ }
+
+ @GetMapping("{id}")
+ public Result get(@PathVariable("id") String id){
+ UserMessageDTO data = userMessageService.get(id);
+ return new Result().ok(data);
+ }
+
+ @PostMapping
+ public Result save(@RequestBody UserMessageDTO dto){
+ //效验数据
+ ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class);
+ userMessageService.save(dto);
+ return new Result();
+ }
+
+ @PutMapping
+ public Result update(@RequestBody UserMessageDTO dto){
+ //效验数据
+ ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class);
+ userMessageService.update(dto);
+ return new Result();
+ }
+
+ @DeleteMapping
+ public Result delete(@RequestBody String[] ids){
+ //效验数据
+ AssertUtils.isArrayEmpty(ids, "id");
+ userMessageService.delete(ids);
+ return new Result();
+ }
+
+ @GetMapping("export")
+ public void export(@RequestParam Map params, HttpServletResponse response) throws Exception {
+ List list = userMessageService.list(params);
+ ExcelUtils.exportExcelToTarget(response, null, list, UserMessageExcel.class);
+ }
+
+}
\ No newline at end of file
diff --git a/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/dao/UserMessageDao.java b/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/dao/UserMessageDao.java
new file mode 100644
index 0000000000..01c3898318
--- /dev/null
+++ b/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/dao/UserMessageDao.java
@@ -0,0 +1,39 @@
+/**
+ * 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.dao;
+
+import com.epmet.commons.mybatis.dao.BaseDao;
+import com.epmet.entity.UserMessageEntity;
+import org.apache.ibatis.annotations.Mapper;
+
+/**
+ * 用户消息表
+ *
+ * @author generator generator@elink-cn.com
+ * @since v1.0.0 2020-04-07
+ */
+@Mapper
+public interface UserMessageDao extends BaseDao {
+ /**
+ * 更新阅读状态为已读
+ *
+ * @param entity 参数
+ */
+ void updateReadFlag(UserMessageEntity entity);
+
+}
\ No newline at end of file
diff --git a/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/entity/UserMessageEntity.java b/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/entity/UserMessageEntity.java
new file mode 100644
index 0000000000..db267d9fd7
--- /dev/null
+++ b/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/entity/UserMessageEntity.java
@@ -0,0 +1,73 @@
+/**
+ * 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.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 2020-04-07
+ */
+@Data
+@EqualsAndHashCode(callSuper=false)
+@TableName("user_message")
+public class UserMessageEntity extends BaseEpmetEntity {
+
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * 客户id
+ */
+ private String customerId;
+
+ /**
+ * app=resi时,此列为gridId,其他情况暂定 *
+ */
+ private String gridId;
+
+ /**
+ * 对应用户id
+ */
+ private String userId;
+
+ /**
+ * 消息通知对象:居民端用户resi、政府端工作人员gov、运营端工作人员oper
+ */
+ private String app;
+
+ /**
+ * 消息标题
+ */
+ private String title;
+
+ /**
+ * 消息通知内容
+ */
+ private String messageContent;
+
+ /**
+ * read已读、unread未读
+ */
+ private String readFlag;
+
+}
diff --git a/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/excel/UserMessageExcel.java b/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/excel/UserMessageExcel.java
new file mode 100644
index 0000000000..8dbbf8249c
--- /dev/null
+++ b/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/excel/UserMessageExcel.java
@@ -0,0 +1,77 @@
+/**
+ * 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.excel;
+
+import cn.afterturn.easypoi.excel.annotation.Excel;
+import lombok.Data;
+
+import java.util.Date;
+
+/**
+ * 用户消息表
+ *
+ * @author generator generator@elink-cn.com
+ * @since v1.0.0 2020-04-07
+ */
+@Data
+public class UserMessageExcel {
+
+ @Excel(name = "主键")
+ private String id;
+
+ @Excel(name = "客户id")
+ private String customerId;
+
+ @Excel(name = "app=resi时,此列为gridId,其他情况暂定 *")
+ private String gridId;
+
+ @Excel(name = "对应用户id")
+ private String userId;
+
+ @Excel(name = "消息通知对象:居民端用户resi、政府端工作人员gov、运营端工作人员oper")
+ private String app;
+
+ @Excel(name = "消息标题")
+ private String title;
+
+ @Excel(name = "消息通知内容")
+ private String messageContent;
+
+ @Excel(name = "read已读、unread未读")
+ private String readFlag;
+
+ @Excel(name = "删除标记 0:未删除,1:已删除")
+ private String delFlag;
+
+ @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;
+
+
+}
\ No newline at end of file
diff --git a/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/redis/UserMessageRedis.java b/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/redis/UserMessageRedis.java
new file mode 100644
index 0000000000..090a4ac0f9
--- /dev/null
+++ b/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/redis/UserMessageRedis.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.epmet.redis;
+
+import com.epmet.commons.tools.redis.RedisUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Component;
+
+/**
+ * 用户消息表
+ *
+ * @author generator generator@elink-cn.com
+ * @since v1.0.0 2020-04-07
+ */
+@Component
+public class UserMessageRedis {
+ @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/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/service/UserMessageService.java b/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/service/UserMessageService.java
new file mode 100644
index 0000000000..6739dc7f8d
--- /dev/null
+++ b/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/service/UserMessageService.java
@@ -0,0 +1,104 @@
+/**
+ * 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.service;
+
+import com.epmet.commons.mybatis.service.BaseService;
+import com.epmet.commons.tools.page.PageData;
+import com.epmet.commons.tools.utils.Result;
+import com.epmet.dto.UserMessageDTO;
+import com.epmet.entity.UserMessageEntity;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * 用户消息表
+ *
+ * @author generator generator@elink-cn.com
+ * @since v1.0.0 2020-04-07
+ */
+public interface UserMessageService extends BaseService {
+
+ /**
+ * 默认分页
+ *
+ * @param params
+ * @return PageData
+ * @author generator
+ * @date 2020-04-07
+ */
+ PageData page(Map params);
+
+ /**
+ * 默认查询
+ *
+ * @param params
+ * @return java.util.List
+ * @author generator
+ * @date 2020-04-07
+ */
+ List list(Map params);
+
+ /**
+ * 单条查询
+ *
+ * @param id
+ * @return UserMessageDTO
+ * @author generator
+ * @date 2020-04-07
+ */
+ UserMessageDTO get(String id);
+
+ /**
+ * 默认保存
+ *
+ * @param dto
+ * @return void
+ * @author generator
+ * @date 2020-04-07
+ */
+ void save(UserMessageDTO dto);
+
+ /**
+ * 默认更新
+ *
+ * @param dto
+ * @return void
+ * @author generator
+ * @date 2020-04-07
+ */
+ void update(UserMessageDTO dto);
+
+ /**
+ * 批量删除
+ *
+ * @param ids
+ * @return void
+ * @author generator
+ * @date 2020-04-07
+ */
+ void delete(String[] ids);
+
+ /**
+ * 全部已读
+ *
+ * @param messageDTO 参数
+ * @return Result
+ */
+ Result allRead(UserMessageDTO messageDTO);
+}
\ No newline at end of file
diff --git a/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/service/impl/UserMessageServiceImpl.java b/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/service/impl/UserMessageServiceImpl.java
new file mode 100644
index 0000000000..2d01201a4a
--- /dev/null
+++ b/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/service/impl/UserMessageServiceImpl.java
@@ -0,0 +1,116 @@
+/**
+ * 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.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.page.PageData;
+import com.epmet.commons.tools.utils.ConvertUtils;
+import com.epmet.commons.tools.constant.FieldConstant;
+import com.epmet.commons.tools.utils.Result;
+import com.epmet.dao.UserMessageDao;
+import com.epmet.dto.UserMessageDTO;
+import com.epmet.entity.UserMessageEntity;
+import com.epmet.redis.UserMessageRedis;
+import com.epmet.service.UserMessageService;
+import org.apache.commons.lang3.StringUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+import java.util.Arrays;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * 用户消息表
+ *
+ * @author generator generator@elink-cn.com
+ * @since v1.0.0 2020-04-07
+ */
+@Service
+public class UserMessageServiceImpl extends BaseServiceImpl implements UserMessageService {
+
+ @Autowired
+ private UserMessageRedis userMessageRedis;
+
+ @Override
+ public PageData page(Map params) {
+ IPage page = baseDao.selectPage(
+ getPage(params, FieldConstant.CREATED_TIME, false),
+ getWrapper(params)
+ );
+ return getPageData(page, UserMessageDTO.class);
+ }
+
+ @Override
+ public List list(Map params) {
+ List entityList = baseDao.selectList(getWrapper(params));
+
+ return ConvertUtils.sourceToTarget(entityList, UserMessageDTO.class);
+ }
+
+ private QueryWrapper getWrapper(Map params) {
+ String id = (String) params.get(FieldConstant.ID_HUMP);
+ String communityId = (String) params.get(FieldConstant.COMMUNITY_ID_HUMP);
+ String gridId = (String) params.get(FieldConstant.GRID_ID_HUMP);
+ String userId = (String) params.get(FieldConstant.USER_ID_HUMP);
+
+ QueryWrapper wrapper = new QueryWrapper<>();
+ wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id)
+ .eq(StringUtils.isNotBlank(communityId), FieldConstant.COMMUNITY_ID, communityId)
+ .eq(StringUtils.isNotBlank(gridId), FieldConstant.GRID_ID, gridId)
+ .eq(StringUtils.isNotBlank(userId), FieldConstant.USER_ID, userId);
+
+ return wrapper;
+ }
+
+ @Override
+ public UserMessageDTO get(String id) {
+ UserMessageEntity entity = baseDao.selectById(id);
+ return ConvertUtils.sourceToTarget(entity, UserMessageDTO.class);
+ }
+
+ @Override
+ @Transactional(rollbackFor = Exception.class)
+ public void save(UserMessageDTO dto) {
+ UserMessageEntity entity = ConvertUtils.sourceToTarget(dto, UserMessageEntity.class);
+ insert(entity);
+ }
+
+ @Override
+ @Transactional(rollbackFor = Exception.class)
+ public void update(UserMessageDTO dto) {
+ UserMessageEntity entity = ConvertUtils.sourceToTarget(dto, UserMessageEntity.class);
+ updateById(entity);
+ }
+
+ @Override
+ @Transactional(rollbackFor = Exception.class)
+ public void delete(String[] ids) {
+ // 逻辑删除(@TableLogic 注解)
+ baseDao.deleteBatchIds(Arrays.asList(ids));
+ }
+
+ @Override
+ public Result allRead(UserMessageDTO messageDTO) {
+ return null;
+ }
+
+}
\ No newline at end of file
diff --git a/epmet-module/epmet-message/epmet-message-server/src/main/resources/mapper/UserMessageDao.xml b/epmet-module/epmet-message/epmet-message-server/src/main/resources/mapper/UserMessageDao.xml
new file mode 100644
index 0000000000..381f748093
--- /dev/null
+++ b/epmet-module/epmet-message/epmet-message-server/src/main/resources/mapper/UserMessageDao.xml
@@ -0,0 +1,27 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/epmet-module/epmet-oss/epmet-oss-client/src/main/java/com/epmet/dto/result/UploadImgResultDTO.java b/epmet-module/epmet-oss/epmet-oss-client/src/main/java/com/epmet/dto/result/UploadImgResultDTO.java
new file mode 100644
index 0000000000..b93b58bb39
--- /dev/null
+++ b/epmet-module/epmet-oss/epmet-oss-client/src/main/java/com/epmet/dto/result/UploadImgResultDTO.java
@@ -0,0 +1,15 @@
+package com.epmet.dto.result;
+
+import lombok.Data;
+
+import java.io.Serializable;
+
+/**
+ * @Description 上传图片返参DTO
+ * @Author yinzuomei
+ * @Date 2020/4/7 12:35
+ */
+@Data
+public class UploadImgResultDTO implements Serializable {
+ private String url;
+}
diff --git a/epmet-module/epmet-oss/epmet-oss-server/src/main/java/com/epmet/controller/OssController.java b/epmet-module/epmet-oss/epmet-oss-server/src/main/java/com/epmet/controller/OssController.java
index dd7256c27b..2a51d935c8 100644
--- a/epmet-module/epmet-oss/epmet-oss-server/src/main/java/com/epmet/controller/OssController.java
+++ b/epmet-module/epmet-oss/epmet-oss-server/src/main/java/com/epmet/controller/OssController.java
@@ -8,23 +8,23 @@
package com.epmet.controller;
-import com.google.gson.Gson;
-import com.epmet.commons.tools.annotation.LogOperation;
+import com.epmet.cloud.CloudStorageConfig;
+import com.epmet.cloud.OssFactory;
import com.epmet.commons.tools.page.PageData;
import com.epmet.commons.tools.utils.Result;
import com.epmet.commons.tools.validator.ValidatorUtils;
-import com.epmet.cloud.CloudStorageConfig;
-import com.epmet.cloud.OssFactory;
import com.epmet.commons.tools.validator.group.AliyunGroup;
import com.epmet.commons.tools.validator.group.QcloudGroup;
import com.epmet.commons.tools.validator.group.QiniuGroup;
import com.epmet.dto.UploadDTO;
+import com.epmet.dto.result.UploadImgResultDTO;
import com.epmet.entity.OssEntity;
import com.epmet.enums.OssTypeEnum;
import com.epmet.exception.ModuleErrorCode;
+import com.epmet.remote.ParamsRemoteService;
import com.epmet.service.OssService;
import com.epmet.utils.ModuleConstant;
-import com.epmet.remote.ParamsRemoteService;
+import com.google.gson.Gson;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.apache.commons.io.FilenameUtils;
@@ -106,7 +106,6 @@ public class OssController {
//保存文件信息
OssEntity ossEntity = new OssEntity();
ossEntity.setUrl(url);
- ossEntity.setCreateDate(new Date());
ossService.insertOssEntity(ossEntity);
//文件信息
@@ -126,4 +125,15 @@ public class OssController {
return new Result();
}
+ /**
+ * @param file
+ * @return com.epmet.commons.tools.utils.Result
+ * @Author yinzuomei
+ * @Description 上传图片
+ * @Date 2020/4/7 10:39
+ **/
+ @PostMapping("uploadimg")
+ public Result uploadImg(@RequestParam("file") MultipartFile file) {
+ return ossService.uploadImg(file);
+ }
}
diff --git a/epmet-module/epmet-oss/epmet-oss-server/src/main/java/com/epmet/dao/OssDao.java b/epmet-module/epmet-oss/epmet-oss-server/src/main/java/com/epmet/dao/OssDao.java
index 3d57a9424e..79f8b14823 100644
--- a/epmet-module/epmet-oss/epmet-oss-server/src/main/java/com/epmet/dao/OssDao.java
+++ b/epmet-module/epmet-oss/epmet-oss-server/src/main/java/com/epmet/dao/OssDao.java
@@ -20,5 +20,4 @@ import org.apache.ibatis.annotations.Mapper;
@Mapper
public interface OssDao extends BaseDao {
- int insertOssEntity(String url);
}
diff --git a/epmet-module/epmet-oss/epmet-oss-server/src/main/java/com/epmet/entity/OssEntity.java b/epmet-module/epmet-oss/epmet-oss-server/src/main/java/com/epmet/entity/OssEntity.java
index a92a7a91bd..abeb56c49a 100644
--- a/epmet-module/epmet-oss/epmet-oss-server/src/main/java/com/epmet/entity/OssEntity.java
+++ b/epmet-module/epmet-oss/epmet-oss-server/src/main/java/com/epmet/entity/OssEntity.java
@@ -9,7 +9,7 @@
package com.epmet.entity;
import com.baomidou.mybatisplus.annotation.TableName;
-import com.epmet.commons.mybatis.entity.BaseEntity;
+import com.epmet.commons.mybatis.entity.BaseEpmetEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
@@ -21,7 +21,7 @@ import lombok.EqualsAndHashCode;
@Data
@EqualsAndHashCode(callSuper=false)
@TableName("sys_oss")
-public class OssEntity extends BaseEntity {
+public class OssEntity extends BaseEpmetEntity {
private static final long serialVersionUID = 1L;
/**
diff --git a/epmet-module/epmet-oss/epmet-oss-server/src/main/java/com/epmet/service/OssService.java b/epmet-module/epmet-oss/epmet-oss-server/src/main/java/com/epmet/service/OssService.java
index b688001b02..2195e4f0f1 100644
--- a/epmet-module/epmet-oss/epmet-oss-server/src/main/java/com/epmet/service/OssService.java
+++ b/epmet-module/epmet-oss/epmet-oss-server/src/main/java/com/epmet/service/OssService.java
@@ -10,7 +10,10 @@ package com.epmet.service;
import com.epmet.commons.mybatis.service.BaseService;
import com.epmet.commons.tools.page.PageData;
+import com.epmet.commons.tools.utils.Result;
+import com.epmet.dto.result.UploadImgResultDTO;
import com.epmet.entity.OssEntity;
+import org.springframework.web.multipart.MultipartFile;
import java.util.Map;
@@ -24,4 +27,6 @@ public interface OssService extends BaseService {
PageData page(Map params);
int insertOssEntity(OssEntity ossEntity);
+
+ Result uploadImg(MultipartFile file);
}
diff --git a/epmet-module/epmet-oss/epmet-oss-server/src/main/java/com/epmet/service/impl/OssServiceImpl.java b/epmet-module/epmet-oss/epmet-oss-server/src/main/java/com/epmet/service/impl/OssServiceImpl.java
index b235163e81..9e492044db 100644
--- a/epmet-module/epmet-oss/epmet-oss-server/src/main/java/com/epmet/service/impl/OssServiceImpl.java
+++ b/epmet-module/epmet-oss/epmet-oss-server/src/main/java/com/epmet/service/impl/OssServiceImpl.java
@@ -10,14 +10,21 @@ package com.epmet.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.epmet.cloud.OssFactory;
import com.epmet.commons.mybatis.service.impl.BaseServiceImpl;
import com.epmet.commons.tools.constant.Constant;
import com.epmet.commons.tools.page.PageData;
+import com.epmet.commons.tools.utils.Result;
import com.epmet.dao.OssDao;
+import com.epmet.dto.result.UploadImgResultDTO;
import com.epmet.entity.OssEntity;
+import com.epmet.exception.ModuleErrorCode;
import com.epmet.service.OssService;
+import org.apache.commons.io.FilenameUtils;
import org.springframework.stereotype.Service;
+import org.springframework.web.multipart.MultipartFile;
+import java.io.IOException;
import java.util.Map;
@Service
@@ -34,6 +41,32 @@ public class OssServiceImpl extends BaseServiceImpl implement
@Override
public int insertOssEntity(OssEntity ossEntity) {
- return baseDao.insertOssEntity(ossEntity.getUrl());
+ return baseDao.insert(ossEntity);
+ }
+
+ @Override
+ public Result uploadImg(MultipartFile file) {
+ if (file.isEmpty()) {
+ return new Result().error(ModuleErrorCode.UPLOAD_FILE_EMPTY);
+ }
+ //上传文件
+ String extension = FilenameUtils.getExtension(file.getOriginalFilename());
+ String url = null;
+ try {
+ url = OssFactory.build().uploadSuffix(file.getBytes(), extension);
+ } catch (IOException e) {
+ e.printStackTrace();
+ return new Result().error("图片上传异常");
+
+
+ }
+ //保存文件信息
+ OssEntity ossEntity = new OssEntity();
+ ossEntity.setUrl(url);
+ baseDao.insert(ossEntity);
+ //文件信息
+ UploadImgResultDTO dto = new UploadImgResultDTO();
+ dto.setUrl(url);
+ return new Result().ok(dto);
}
}
diff --git a/epmet-module/epmet-oss/epmet-oss-server/src/main/resources/mapper/SysOssDao.xml b/epmet-module/epmet-oss/epmet-oss-server/src/main/resources/mapper/SysOssDao.xml
index 57994ca119..2531640cb1 100644
--- a/epmet-module/epmet-oss/epmet-oss-server/src/main/resources/mapper/SysOssDao.xml
+++ b/epmet-module/epmet-oss/epmet-oss-server/src/main/resources/mapper/SysOssDao.xml
@@ -3,11 +3,4 @@
-
- INSERT INTO `sys_oss` ( `url`, `creator`, `create_date` )
- VALUES
- ( #{url},
- "1",
- now( ) )
-
diff --git a/epmet-module/resi-mine/resi-mine-server/src/main/java/com/epmet/modules/feign/ResiPartymemberFeignClient.java b/epmet-module/resi-mine/resi-mine-server/src/main/java/com/epmet/modules/feign/ResiPartymemberFeignClient.java
index 51796840f4..541d86fb2b 100644
--- a/epmet-module/resi-mine/resi-mine-server/src/main/java/com/epmet/modules/feign/ResiPartymemberFeignClient.java
+++ b/epmet-module/resi-mine/resi-mine-server/src/main/java/com/epmet/modules/feign/ResiPartymemberFeignClient.java
@@ -7,6 +7,7 @@ import com.epmet.resi.mine.dto.from.PartyMemberInitFromDTO;
import com.epmet.resi.mine.dto.from.VerificationCodeFromDTO;
import com.epmet.resi.mine.dto.result.PartyMemberInitResultDTO;
import com.epmet.resi.partymember.dto.partymember.PartymemberInfoDTO;
+import com.epmet.resi.partymember.dto.warmhearted.form.ResiWarmheartedAuditFormDTO;
import com.epmet.resi.partymember.dto.warmhearted.form.ResiWarmheartedFormDTO;
import com.epmet.resi.partymember.dto.warmhearted.form.ResiWarmheartedSubmitFormDTO;
import com.epmet.resi.partymember.dto.warmhearted.result.ResiWarmheartedResultDTO;
@@ -76,4 +77,13 @@ public interface ResiPartymemberFeignClient {
*/
@PostMapping("/resi/partymember/confirm/extra")
Result partyMemberInfoExtra(@RequestBody PartymemberInfoDTO partyMemberInfoDTO);
+
+ /**
+ * @Author sun
+ * @Description 政府端-热心居民申请人工审核
+ **/
+ @PostMapping(value = "resi/partymember/resiwarmheartedapply/manageaudit")
+ Result manageAudit(ResiWarmheartedAuditFormDTO formDTO);
+
+
}
diff --git a/epmet-module/resi-mine/resi-mine-server/src/main/java/com/epmet/modules/feign/fallback/ResiPartymemberFeignClientFallBack.java b/epmet-module/resi-mine/resi-mine-server/src/main/java/com/epmet/modules/feign/fallback/ResiPartymemberFeignClientFallBack.java
index 7559eb81fb..acff6efa3f 100644
--- a/epmet-module/resi-mine/resi-mine-server/src/main/java/com/epmet/modules/feign/fallback/ResiPartymemberFeignClientFallBack.java
+++ b/epmet-module/resi-mine/resi-mine-server/src/main/java/com/epmet/modules/feign/fallback/ResiPartymemberFeignClientFallBack.java
@@ -8,6 +8,7 @@ import com.epmet.resi.mine.dto.from.PartyMemberInitFromDTO;
import com.epmet.resi.mine.dto.from.VerificationCodeFromDTO;
import com.epmet.resi.mine.dto.result.PartyMemberInitResultDTO;
import com.epmet.resi.partymember.dto.partymember.PartymemberInfoDTO;
+import com.epmet.resi.partymember.dto.warmhearted.form.ResiWarmheartedAuditFormDTO;
import com.epmet.resi.partymember.dto.warmhearted.form.ResiWarmheartedFormDTO;
import com.epmet.resi.partymember.dto.warmhearted.form.ResiWarmheartedSubmitFormDTO;
import com.epmet.resi.partymember.dto.warmhearted.result.ResiWarmheartedResultDTO;
@@ -61,4 +62,9 @@ public class ResiPartymemberFeignClientFallBack implements ResiPartymemberFeignC
public Result partyMemberInfoExtra(PartymemberInfoDTO partyMemberInfoDTO) {
return ModuleUtils.feignConError(ServiceConstant.RESI_PARTYMEMBER_SERVER, "partyMemberInfoExtra", partyMemberInfoDTO);
}
+
+ @Override
+ public Result manageAudit(ResiWarmheartedAuditFormDTO formDTO) {
+ return ModuleUtils.feignConError(ServiceConstant.RESI_PARTYMEMBER_SERVER, "manageAudit", formDTO);
+ }
}
diff --git a/epmet-module/resi-mine/resi-mine-server/src/main/java/com/epmet/modules/warmhearted/controller/ResiWarmheartedController.java b/epmet-module/resi-mine/resi-mine-server/src/main/java/com/epmet/modules/warmhearted/controller/ResiWarmheartedController.java
index 0f3d22fe2f..c5896ce965 100644
--- a/epmet-module/resi-mine/resi-mine-server/src/main/java/com/epmet/modules/warmhearted/controller/ResiWarmheartedController.java
+++ b/epmet-module/resi-mine/resi-mine-server/src/main/java/com/epmet/modules/warmhearted/controller/ResiWarmheartedController.java
@@ -4,6 +4,7 @@ import com.epmet.commons.tools.annotation.LoginUser;
import com.epmet.commons.tools.security.dto.TokenDto;
import com.epmet.commons.tools.utils.Result;
import com.epmet.modules.warmhearted.service.ResiWarmheartedService;
+import com.epmet.resi.partymember.dto.warmhearted.form.ResiWarmheartedAuditFormDTO;
import com.epmet.resi.partymember.dto.warmhearted.form.ResiWarmheartedFormDTO;
import com.epmet.resi.partymember.dto.warmhearted.form.ResiWarmheartedSubmitFormDTO;
import com.epmet.resi.partymember.dto.warmhearted.result.ResiWarmheartedResultDTO;
@@ -44,5 +45,15 @@ public class ResiWarmheartedController {
return resiWarmheartedService.submit(tokenDTO, formDTO);
}
+ /**
+ * @param
+ * @Author sun
+ * @Description 政府端-热心居民申请人工审核
+ **/
+ @PostMapping("manageaudit")
+ public Result manageAudit(@LoginUser TokenDto tokenDTO, @RequestBody ResiWarmheartedAuditFormDTO formDTO) {
+ return resiWarmheartedService.manageAudit(tokenDTO, formDTO);
+ }
+
}
diff --git a/epmet-module/resi-mine/resi-mine-server/src/main/java/com/epmet/modules/warmhearted/service/ResiWarmheartedService.java b/epmet-module/resi-mine/resi-mine-server/src/main/java/com/epmet/modules/warmhearted/service/ResiWarmheartedService.java
index 12924304d3..a222f93e65 100644
--- a/epmet-module/resi-mine/resi-mine-server/src/main/java/com/epmet/modules/warmhearted/service/ResiWarmheartedService.java
+++ b/epmet-module/resi-mine/resi-mine-server/src/main/java/com/epmet/modules/warmhearted/service/ResiWarmheartedService.java
@@ -2,6 +2,7 @@ package com.epmet.modules.warmhearted.service;
import com.epmet.commons.tools.security.dto.TokenDto;
import com.epmet.commons.tools.utils.Result;
+import com.epmet.resi.partymember.dto.warmhearted.form.ResiWarmheartedAuditFormDTO;
import com.epmet.resi.partymember.dto.warmhearted.form.ResiWarmheartedFormDTO;
import com.epmet.resi.partymember.dto.warmhearted.form.ResiWarmheartedSubmitFormDTO;
import com.epmet.resi.partymember.dto.warmhearted.result.ResiWarmheartedResultDTO;
@@ -31,4 +32,13 @@ public interface ResiWarmheartedService {
*/
Result submit(TokenDto tokenDTO, ResiWarmheartedSubmitFormDTO formDTO);
+ /**
+ * 政府端-热心居民申请人工审核
+ *
+ * @param
+ * @return void
+ * @author sun
+ */
+ Result manageAudit(TokenDto tokenDTO, ResiWarmheartedAuditFormDTO formDTO);
+
}
diff --git a/epmet-module/resi-mine/resi-mine-server/src/main/java/com/epmet/modules/warmhearted/service/impl/ResiWarmheartedServiceImpl.java b/epmet-module/resi-mine/resi-mine-server/src/main/java/com/epmet/modules/warmhearted/service/impl/ResiWarmheartedServiceImpl.java
index 2d8fa6ad62..3d51c81005 100644
--- a/epmet-module/resi-mine/resi-mine-server/src/main/java/com/epmet/modules/warmhearted/service/impl/ResiWarmheartedServiceImpl.java
+++ b/epmet-module/resi-mine/resi-mine-server/src/main/java/com/epmet/modules/warmhearted/service/impl/ResiWarmheartedServiceImpl.java
@@ -1,11 +1,13 @@
package com.epmet.modules.warmhearted.service.impl;
+import com.epmet.commons.tools.constant.NumConstant;
import com.epmet.commons.tools.exception.EpmetErrorCode;
import com.epmet.commons.tools.security.dto.TokenDto;
import com.epmet.commons.tools.utils.Result;
import com.epmet.modules.feign.ResiPartymemberFeignClient;
import com.epmet.modules.utils.ModuleConstant;
import com.epmet.modules.warmhearted.service.ResiWarmheartedService;
+import com.epmet.resi.partymember.dto.warmhearted.form.ResiWarmheartedAuditFormDTO;
import com.epmet.resi.partymember.dto.warmhearted.form.ResiWarmheartedFormDTO;
import com.epmet.resi.partymember.dto.warmhearted.form.ResiWarmheartedSubmitFormDTO;
import com.epmet.resi.partymember.dto.warmhearted.result.ResiWarmheartedResultDTO;
@@ -51,15 +53,36 @@ public class ResiWarmheartedServiceImpl implements ResiWarmheartedService {
@Override
public Result submit(TokenDto tokenDTO, ResiWarmheartedSubmitFormDTO formDTO) {
if (null == tokenDTO || StringUtils.isBlank(tokenDTO.getUserId())) {
- return new Result().error(ModuleConstant.USER_NOT_NULL);
+ return new Result().error(ModuleConstant.USER_NOT_NULL);
}
if (null == formDTO || StringUtils.isBlank(formDTO.getCustomerId())
|| StringUtils.isBlank(formDTO.getGridId())
|| StringUtils.isBlank(formDTO.getResiWarmVisitId())
|| StringUtils.isBlank(formDTO.getReason())) {
- return new Result().error(EpmetErrorCode.PARAMETER_EXCEPTION.getName());
+ return new Result().error(EpmetErrorCode.PARAMETER_EXCEPTION.getName());
}
formDTO.setUserId(tokenDTO.getUserId());
return resiPartymemberFeignClient.submit(formDTO);
}
+
+ /**
+ * @param
+ * @Author sun
+ * @Description 政府端-热心居民申请人工审核
+ **/
+ @Override
+ public Result manageAudit(TokenDto tokenDTO, ResiWarmheartedAuditFormDTO formDTO) {
+ if (null == tokenDTO || StringUtils.isBlank(tokenDTO.getUserId())) {
+ return new Result().error(ModuleConstant.USER_NOT_NULL);
+ }
+ if (null == formDTO || StringUtils.isBlank(formDTO.getCustomerId())
+ || StringUtils.isBlank(formDTO.getResiWarmApplyId())
+ || StringUtils.isBlank(formDTO.getAuditStatus())
+ || (!NumConstant.ZERO_STR.equals(formDTO.getAuditStatus())&&!NumConstant.ONE_STR.equals(formDTO.getAuditStatus()))) {
+ return new Result().error(EpmetErrorCode.PARTICIPATION_EXCEPTION.getName());
+ }
+ formDTO.setUserId(tokenDTO.getUserId());
+ return resiPartymemberFeignClient.manageAudit(formDTO);
+ }
+
}
diff --git a/epmet-module/resi-partymember/resi-partymember-client/src/main/java/com/epmet/resi/partymember/dto/warmhearted/form/ResiWarmheartedAuditFormDTO.java b/epmet-module/resi-partymember/resi-partymember-client/src/main/java/com/epmet/resi/partymember/dto/warmhearted/form/ResiWarmheartedAuditFormDTO.java
new file mode 100644
index 0000000000..6c35e40152
--- /dev/null
+++ b/epmet-module/resi-partymember/resi-partymember-client/src/main/java/com/epmet/resi/partymember/dto/warmhearted/form/ResiWarmheartedAuditFormDTO.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.epmet.resi.partymember.dto.warmhearted.form;
+
+import lombok.Data;
+
+import javax.validation.constraints.NotBlank;
+import java.io.Serializable;
+
+
+/**
+ * 政府端-人工审核热心居民申请-配置入参
+ * @author sun
+ */
+@Data
+public class ResiWarmheartedAuditFormDTO implements Serializable {
+
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * 热心居民申请id
+ */
+ @NotBlank(message = "申请ID不能为空")
+ private String resiWarmApplyId;
+
+ /**
+ * 审核状态(0:取消驳回 1:审核通过)
+ */
+ @NotBlank(message = "审核状态不能为空")
+ private String auditStatus;
+
+ /**
+ * 驳回理由
+ */
+ @NotBlank(message = "驳回理由不能为空")
+ private String refuseReason;
+
+ /**
+ * 客户Id CUSTOMER.id
+ */
+ @NotBlank(message = "客户ID不能为空")
+ private String customerId;
+
+ /**
+ * 用户Id
+ */
+ @NotBlank(message = "用户ID不能为空")
+ private String userId;
+
+}
\ No newline at end of file
diff --git a/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/warmhearted/controller/ResiWarmheartedApplyController.java b/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/warmhearted/controller/ResiWarmheartedApplyController.java
index 430be44a6c..ec08f6f466 100644
--- a/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/warmhearted/controller/ResiWarmheartedApplyController.java
+++ b/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/warmhearted/controller/ResiWarmheartedApplyController.java
@@ -28,6 +28,7 @@ import com.epmet.commons.tools.validator.group.UpdateGroup;
import com.epmet.modules.warmhearted.excel.ResiWarmheartedApplyExcel;
import com.epmet.modules.warmhearted.service.ResiWarmheartedApplyService;
import com.epmet.resi.partymember.dto.warmhearted.ResiWarmheartedApplyDTO;
+import com.epmet.resi.partymember.dto.warmhearted.form.ResiWarmheartedAuditFormDTO;
import com.epmet.resi.partymember.dto.warmhearted.form.ResiWarmheartedFormDTO;
import com.epmet.resi.partymember.dto.warmhearted.form.ResiWarmheartedSubmitFormDTO;
import com.epmet.resi.partymember.dto.warmhearted.result.ResiWarmheartedResultDTO;
@@ -40,7 +41,7 @@ import java.util.Map;
/**
- * 热心居民申请表
+ * 热心居民申请表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2020-03-30
@@ -48,24 +49,24 @@ import java.util.Map;
@RestController
@RequestMapping("resiwarmheartedapply")
public class ResiWarmheartedApplyController {
-
+
@Autowired
private ResiWarmheartedApplyService resiWarmheartedApplyService;
@GetMapping("page")
- public Result> page(@RequestParam Map params){
+ public Result> page(@RequestParam Map params) {
PageData page = resiWarmheartedApplyService.page(params);
return new Result>().ok(page);
}
@GetMapping("{id}")
- public Result get(@PathVariable("id") String id){
+ public Result get(@PathVariable("id") String id) {
ResiWarmheartedApplyDTO data = resiWarmheartedApplyService.get(id);
return new Result().ok(data);
}
@PostMapping
- public Result save(@RequestBody ResiWarmheartedApplyDTO dto){
+ public Result save(@RequestBody ResiWarmheartedApplyDTO dto) {
//效验数据
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class);
resiWarmheartedApplyService.save(dto);
@@ -73,7 +74,7 @@ public class ResiWarmheartedApplyController {
}
@PutMapping
- public Result update(@RequestBody ResiWarmheartedApplyDTO dto){
+ public Result update(@RequestBody ResiWarmheartedApplyDTO dto) {
//效验数据
ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class);
resiWarmheartedApplyService.update(dto);
@@ -81,7 +82,7 @@ public class ResiWarmheartedApplyController {
}
@DeleteMapping
- public Result delete(@RequestBody String[] ids){
+ public Result delete(@RequestBody String[] ids) {
//效验数据
AssertUtils.isArrayEmpty(ids, "id");
resiWarmheartedApplyService.delete(ids);
@@ -95,13 +96,18 @@ public class ResiWarmheartedApplyController {
}
@PostMapping("init")
- public Result init(@RequestBody ResiWarmheartedFormDTO formDTO){
+ public Result init(@RequestBody ResiWarmheartedFormDTO formDTO) {
return resiWarmheartedApplyService.init(formDTO);
}
@PostMapping("submit")
- public Result submit(@RequestBody ResiWarmheartedSubmitFormDTO formDTO){
+ public Result submit(@RequestBody ResiWarmheartedSubmitFormDTO formDTO) {
return resiWarmheartedApplyService.submit(formDTO);
}
+ @PostMapping("manageaudit")
+ public Result manageAudit(@RequestBody ResiWarmheartedAuditFormDTO formDTO) {
+ return resiWarmheartedApplyService.manageAudit(formDTO);
+ }
+
}
\ No newline at end of file
diff --git a/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/warmhearted/service/ResiWarmheartedApplyService.java b/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/warmhearted/service/ResiWarmheartedApplyService.java
index 385e1dd47f..87fb3ffd31 100644
--- a/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/warmhearted/service/ResiWarmheartedApplyService.java
+++ b/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/warmhearted/service/ResiWarmheartedApplyService.java
@@ -22,6 +22,7 @@ import com.epmet.commons.tools.page.PageData;
import com.epmet.commons.tools.utils.Result;
import com.epmet.modules.warmhearted.entity.ResiWarmheartedApplyEntity;
import com.epmet.resi.partymember.dto.warmhearted.ResiWarmheartedApplyDTO;
+import com.epmet.resi.partymember.dto.warmhearted.form.ResiWarmheartedAuditFormDTO;
import com.epmet.resi.partymember.dto.warmhearted.form.ResiWarmheartedFormDTO;
import com.epmet.resi.partymember.dto.warmhearted.form.ResiWarmheartedSubmitFormDTO;
import com.epmet.resi.partymember.dto.warmhearted.result.ResiWarmheartedResultDTO;
@@ -114,4 +115,13 @@ public interface ResiWarmheartedApplyService extends BaseService page(Map params) {
@@ -123,7 +131,7 @@ public class ResiWarmheartedApplyServiceImpl extends BaseServiceImpl init(ResiWarmheartedFormDTO formDTO) {
//1:热心居民申请行为记录表新增数据
Result result = resiWarmheartedVisitService.saveResiWarmheartedVisit(formDTO);
- if(!result.success()){
+ if (!result.success()) {
log.warn(ResiWarmheartedVisitConstant.OPERATION_EXCEPTION);
}
ResiWarmheartedResultDTO resiWarmheartedResultDTO = result.getData();
@@ -150,6 +158,7 @@ public class ResiWarmheartedApplyServiceImpl extends BaseServiceImpl