Browse Source
# Conflicts: # epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/member/redis/ResiGroupMemberRedis.javamaster
209 changed files with 6024 additions and 651 deletions
@ -1,48 +1,48 @@ |
|||
/** |
|||
* 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.service; |
|||
|
|||
import org.junit.Test; |
|||
import org.junit.runner.RunWith; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.boot.test.context.SpringBootTest; |
|||
import org.springframework.test.context.junit4.SpringRunner; |
|||
|
|||
/** |
|||
* 多数据源测试 |
|||
* |
|||
* @author Mark sunlightcs@gmail.com |
|||
* @since 1.0.0 |
|||
*/ |
|||
@RunWith(SpringRunner.class) |
|||
@SpringBootTest |
|||
public class DynamicDataSourceTest { |
|||
@Autowired |
|||
private DynamicDataSourceTestService dynamicDataSourceTestService; |
|||
|
|||
@Test |
|||
public void test(){ |
|||
Long id = 1067246875800000001L; |
|||
dynamicDataSourceTestService.selectById(id); |
|||
dynamicDataSourceTestService.updateUser(id); |
|||
dynamicDataSourceTestService.updateUserBySlave1(id); |
|||
dynamicDataSourceTestService.updateUserBySlave2(id); |
|||
} |
|||
|
|||
|
|||
} |
|||
///**
|
|||
// * 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.service;
|
|||
//
|
|||
//import org.junit.Test;
|
|||
//import org.junit.runner.RunWith;
|
|||
//import org.springframework.beans.factory.annotation.Autowired;
|
|||
//import org.springframework.boot.test.context.SpringBootTest;
|
|||
//import org.springframework.test.context.junit4.SpringRunner;
|
|||
//
|
|||
///**
|
|||
// * 多数据源测试
|
|||
// *
|
|||
// * @author Mark sunlightcs@gmail.com
|
|||
// * @since 1.0.0
|
|||
// */
|
|||
//@RunWith(SpringRunner.class)
|
|||
//@SpringBootTest
|
|||
//public class DynamicDataSourceTest {
|
|||
// @Autowired
|
|||
// private com.epmet.service.DynamicDataSourceTestService dynamicDataSourceTestService;
|
|||
//
|
|||
// @Test
|
|||
// public void test(){
|
|||
// Long id = 1067246875800000001L;
|
|||
// dynamicDataSourceTestService.selectById(id);
|
|||
// dynamicDataSourceTestService.updateUser(id);
|
|||
// dynamicDataSourceTestService.updateUserBySlave1(id);
|
|||
// dynamicDataSourceTestService.updateUserBySlave2(id);
|
|||
// }
|
|||
//
|
|||
//
|
|||
//}
|
|||
|
@ -0,0 +1,15 @@ |
|||
package com.epmet.commons.mybatis.constant; |
|||
|
|||
public class AccessSettingConstant { |
|||
public static final String I_CREATED_KEY = "I_CREATED"; |
|||
public static final String I_CREATED_YES = "YES"; |
|||
|
|||
public static final String I_PART_KEY = "I_PART"; |
|||
public static final String I_PART_YES = "YES"; |
|||
|
|||
public static final String IN_GRID_KEY = "IN_GRID"; |
|||
public static final String IN_GRID_YES = "YES"; |
|||
|
|||
public static final String IN_DEPARTMENT_KEY = "IN_DEPARTMENT"; |
|||
public static final String IN_DEPARTMENT_YES = "YES"; |
|||
} |
@ -0,0 +1,49 @@ |
|||
/** |
|||
* 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.commons.mybatis.dto.form; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import java.io.Serializable; |
|||
|
|||
|
|||
/** |
|||
* 组织首页-获取机关下部门列表-部门详情数据 |
|||
* |
|||
* @author sun |
|||
*/ |
|||
@Data |
|||
public class DepartmentListResultDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** |
|||
* 部门Id |
|||
*/ |
|||
private String departmentId; |
|||
|
|||
/** |
|||
* 部门名称 |
|||
*/ |
|||
private String departmentName; |
|||
|
|||
/** |
|||
* 部门下总人数 |
|||
*/ |
|||
private Integer totalUser; |
|||
} |
@ -0,0 +1,13 @@ |
|||
package com.epmet.commons.mybatis.dto.form; |
|||
|
|||
import lombok.Data; |
|||
|
|||
@Data |
|||
public class RoleAccessSettingResultDTO { |
|||
|
|||
private String settingKey; |
|||
private String id; |
|||
private String settingName; |
|||
private String roleId; |
|||
|
|||
} |
@ -0,0 +1,30 @@ |
|||
package com.epmet.commons.mybatis.feign; |
|||
|
|||
import com.epmet.commons.mybatis.dto.form.*; |
|||
import com.epmet.commons.mybatis.feign.fallback.GovAccessFeignClientFallback; |
|||
import com.epmet.commons.mybatis.feign.fallback.GovOrgFeignClientFallback; |
|||
import com.epmet.commons.tools.constant.ServiceConstant; |
|||
import com.epmet.commons.tools.utils.Result; |
|||
import org.springframework.cloud.openfeign.FeignClient; |
|||
import org.springframework.web.bind.annotation.PathVariable; |
|||
import org.springframework.web.bind.annotation.PostMapping; |
|||
|
|||
import java.util.List; |
|||
import java.util.Set; |
|||
|
|||
/** |
|||
* @Description |
|||
* @Author sun |
|||
*/ |
|||
//, url = "localhost:8092"
|
|||
@FeignClient(name = ServiceConstant.GOV_ORG_SERVER, fallback = GovOrgFeignClientFallback.class) |
|||
public interface GovOrgFeignClient { |
|||
|
|||
/** |
|||
* 查询人员部门列表 |
|||
* @param staffId |
|||
* @return |
|||
*/ |
|||
@PostMapping("/gov/org/department/staff/{staffId}/departmentlist") |
|||
Result<List<DepartmentListResultDTO>> getDepartmentListByStaffId(@PathVariable("staffId") String staffId); |
|||
} |
@ -0,0 +1,27 @@ |
|||
package com.epmet.commons.mybatis.feign.fallback; |
|||
|
|||
import com.epmet.commons.mybatis.dto.form.*; |
|||
import com.epmet.commons.mybatis.feign.GovAccessFeignClient; |
|||
import com.epmet.commons.mybatis.feign.GovOrgFeignClient; |
|||
import com.epmet.commons.tools.constant.ServiceConstant; |
|||
import com.epmet.commons.tools.utils.ModuleUtils; |
|||
import com.epmet.commons.tools.utils.Result; |
|||
import org.springframework.stereotype.Component; |
|||
|
|||
import java.util.List; |
|||
import java.util.Set; |
|||
|
|||
/** |
|||
* 调用政府端权限 |
|||
* @Author wxz |
|||
* @Description |
|||
* @Date 2020/4/24 11:17 |
|||
**/ |
|||
@Component |
|||
public class GovOrgFeignClientFallback implements GovOrgFeignClient { |
|||
|
|||
@Override |
|||
public Result<List<DepartmentListResultDTO>> getDepartmentListByStaffId(String staffId) { |
|||
return ModuleUtils.feignConError(ServiceConstant.GOV_ACCESS_SERVER, "getDepartmentListByStaffId", staffId); |
|||
} |
|||
} |
@ -0,0 +1,14 @@ |
|||
package com.epmet.dto.result; |
|||
|
|||
import lombok.Data; |
|||
|
|||
@Data |
|||
public class RoleAccessSettingResultDTO { |
|||
|
|||
private String settingKey; |
|||
private String id; |
|||
private String settingName; |
|||
private String settingValue; |
|||
private String roleId; |
|||
|
|||
} |
@ -0,0 +1,11 @@ |
|||
FROM java:8 |
|||
|
|||
RUN export LANG="zh_CN.UTF-8" |
|||
RUN ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime |
|||
RUN echo 'Asia/Shanghai' > /etc/timezone |
|||
|
|||
COPY ./target/*.jar ./app.jar |
|||
|
|||
EXPOSE 8099 |
|||
|
|||
ENTRYPOINT ["java","-Xms32m","-Xmx200m","-jar","./app.jar"] |
@ -0,0 +1,15 @@ |
|||
version: "3.7" |
|||
services: |
|||
gov-access-server: |
|||
container_name: gov-access-server-dev |
|||
image: registry-vpc.cn-qingdao.aliyuncs.com/epmet-cloud-dev/gov-access-server:0.3.1 |
|||
ports: |
|||
- "8099:8099" |
|||
network_mode: host # 使用现有网络 |
|||
volumes: |
|||
- "/opt/epmet-cloud-logs/dev:/logs" |
|||
deploy: |
|||
resources: |
|||
limits: |
|||
cpus: '0.1' |
|||
memory: 250M |
@ -0,0 +1,37 @@ |
|||
/** |
|||
* 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.dao; |
|||
|
|||
import com.epmet.commons.mybatis.dao.BaseDao; |
|||
import com.epmet.dto.result.RoleAccessSettingResultDTO; |
|||
import com.epmet.entity.RoleAccessSettingEntity; |
|||
import org.apache.ibatis.annotations.Mapper; |
|||
|
|||
import java.util.List; |
|||
|
|||
/** |
|||
* 权限配置 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2020-04-26 |
|||
*/ |
|||
@Mapper |
|||
public interface RoleAccessSettingDao extends BaseDao<RoleAccessSettingEntity> { |
|||
|
|||
List<RoleAccessSettingResultDTO> listRoleAccessSettingsByRoleId(String roleId); |
|||
} |
@ -0,0 +1,65 @@ |
|||
/** |
|||
* 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.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 2020-04-26 |
|||
*/ |
|||
@Data |
|||
@EqualsAndHashCode(callSuper=false) |
|||
@TableName("role_access_setting") |
|||
public class RoleAccessSettingEntity extends BaseEpmetEntity { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** |
|||
* 配置KEY |
|||
*/ |
|||
private String settingKey; |
|||
|
|||
/** |
|||
* 配置name |
|||
*/ |
|||
private String settingName; |
|||
/** |
|||
* 配置值 |
|||
*/ |
|||
private String settingValue; |
|||
|
|||
/** |
|||
* 角色ID |
|||
*/ |
|||
private String roleId; |
|||
|
|||
/** |
|||
* 操作简介 |
|||
*/ |
|||
private String brief; |
|||
|
|||
} |
@ -0,0 +1,37 @@ |
|||
package com.epmet.redis; |
|||
|
|||
import com.epmet.commons.tools.redis.RedisKeys; |
|||
import com.epmet.commons.tools.redis.RedisUtils; |
|||
import com.epmet.dto.result.RoleAccessSettingResultDTO; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.stereotype.Component; |
|||
|
|||
import java.util.HashMap; |
|||
import java.util.List; |
|||
import java.util.Map; |
|||
import java.util.function.BiConsumer; |
|||
|
|||
@Component |
|||
public class RoleAccessSettingRedis { |
|||
|
|||
@Autowired |
|||
private RedisUtils redisUtils; |
|||
|
|||
public void set(Map<String, Object> settings, String roleId) { |
|||
String roleAccessSettingKey = RedisKeys.getRoleAccessSettingKey(roleId); |
|||
redisUtils.hMSet(roleAccessSettingKey, settings); |
|||
} |
|||
|
|||
public Map<String, String> get(String roleId) { |
|||
String roleAccessSettingKey = RedisKeys.getRoleAccessSettingKey(roleId); |
|||
Map<String, Object> s = redisUtils.hGetAll(roleAccessSettingKey); |
|||
Map<String, String> settings = new HashMap<>(); |
|||
s.forEach((s1, o) -> { |
|||
if (o != null) { |
|||
settings.put(s1, String.valueOf(o)); |
|||
} |
|||
}); |
|||
return settings; |
|||
} |
|||
|
|||
} |
@ -0,0 +1,30 @@ |
|||
<?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.dao.RoleAccessSettingDao"> |
|||
|
|||
<resultMap type="com.epmet.entity.RoleAccessSettingEntity" id="roleAccessSettingMap"> |
|||
<result property="id" column="ID"/> |
|||
<result property="settingKey" column="SETTING_KEY"/> |
|||
<result property="settingName" column="SETTING_NAME"/> |
|||
<result property="settingValue" column="SETTING_VALUE"/> |
|||
<result property="roleId" column="ROLE_ID"/> |
|||
<result property="brief" column="BRIEF"/> |
|||
<result property="delFlag" column="DEL_FLAG"/> |
|||
<result property="revision" column="REVISION"/> |
|||
<result property="createdBy" column="CREATED_BY"/> |
|||
<result property="createdTime" column="CREATED_TIME"/> |
|||
<result property="updatedBy" column="UPDATED_BY"/> |
|||
<result property="updatedTime" column="UPDATED_TIME"/> |
|||
</resultMap> |
|||
|
|||
<!--查询角色的权限相关配置--> |
|||
<select id="listRoleAccessSettingsByRoleId" resultType="com.epmet.dto.result.RoleAccessSettingResultDTO"> |
|||
select settings.* |
|||
from role_access_setting settings |
|||
where ROLE_ID = #{roleId} |
|||
AND DEL_FLAG = '0' |
|||
</select> |
|||
|
|||
|
|||
</mapper> |
@ -0,0 +1,38 @@ |
|||
package com.epmet.test.govaccess; |
|||
|
|||
import com.epmet.dao.RoleAccessSettingDao; |
|||
import com.epmet.dto.result.RoleAccessSettingResultDTO; |
|||
import com.epmet.redis.RoleAccessSettingRedis; |
|||
import org.junit.Test; |
|||
import org.junit.runner.RunWith; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.boot.test.context.SpringBootTest; |
|||
import org.springframework.test.context.junit4.SpringRunner; |
|||
|
|||
import java.util.HashMap; |
|||
import java.util.List; |
|||
import java.util.Map; |
|||
|
|||
@RunWith(SpringRunner.class) |
|||
@SpringBootTest |
|||
public class AccessSettingTest { |
|||
|
|||
@Autowired |
|||
private RoleAccessSettingDao roleAccessSettingDao; |
|||
|
|||
@Autowired |
|||
private RoleAccessSettingRedis roleAccessSettingRedis; |
|||
|
|||
@Test |
|||
public void addAccessSettings2Redis() { |
|||
List<RoleAccessSettingResultDTO> settings = roleAccessSettingDao.listRoleAccessSettingsByRoleId("1"); |
|||
HashMap<String, Object> objectObjectHashMap = new HashMap<>(); |
|||
settings.forEach(s -> { |
|||
objectObjectHashMap.put(s.getSettingKey(), s.getSettingValue()); |
|||
}); |
|||
roleAccessSettingRedis.set(objectObjectHashMap, "1"); |
|||
Map<String, String> map = roleAccessSettingRedis.get("1"); |
|||
System.out.println(map); |
|||
} |
|||
|
|||
} |
@ -0,0 +1,25 @@ |
|||
<?xml version="1.0" encoding="UTF-8"?> |
|||
<project xmlns="http://maven.apache.org/POM/4.0.0" |
|||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
|||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> |
|||
<parent> |
|||
<artifactId>gov-grid</artifactId> |
|||
<groupId>com.epmet</groupId> |
|||
<version>2.0.0</version> |
|||
</parent> |
|||
<modelVersion>4.0.0</modelVersion> |
|||
|
|||
<artifactId>gov-grid-client</artifactId> |
|||
<dependencies> |
|||
<dependency> |
|||
<groupId>javax.validation</groupId> |
|||
<artifactId>validation-api</artifactId> |
|||
</dependency> |
|||
<dependency> |
|||
<groupId>org.projectlombok</groupId> |
|||
<artifactId>lombok</artifactId> |
|||
</dependency> |
|||
</dependencies> |
|||
|
|||
|
|||
</project> |
@ -0,0 +1,34 @@ |
|||
package com.epmet.dto.form; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import javax.validation.constraints.Min; |
|||
import javax.validation.constraints.NotBlank; |
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* @Description 党员认证-审核历史列表入参 |
|||
* @Author yinzuomei |
|||
* @Date 2020/4/26 23:28 |
|||
*/ |
|||
@Data |
|||
public class AuditedPartyMemberFormDTO implements Serializable { |
|||
private static final long serialVersionUID = -6698685200715718225L; |
|||
/** |
|||
* 网格ID |
|||
*/ |
|||
@NotBlank(message = "网格id不能为空") |
|||
private String gridId; |
|||
|
|||
/** |
|||
* 页码 |
|||
*/ |
|||
@Min(1) |
|||
private Integer pageNo; |
|||
|
|||
/** |
|||
* 每页显示数量默认20 |
|||
*/ |
|||
private Integer pageSize=20; |
|||
} |
|||
|
@ -0,0 +1,35 @@ |
|||
package com.epmet.dto.form; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import javax.validation.constraints.Min; |
|||
import javax.validation.constraints.NotBlank; |
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* @Description 党员认证-待审核列表入参 |
|||
* @Author yinzuomei |
|||
* @Date 2020/4/26 15:59 |
|||
*/ |
|||
@Data |
|||
public class AuditingPartyMemberFormDTO implements Serializable { |
|||
private static final long serialVersionUID = 6022180109189321760L; |
|||
|
|||
/** |
|||
* 网格ID |
|||
*/ |
|||
@NotBlank(message = "网格id不能为空") |
|||
private String gridId; |
|||
|
|||
/** |
|||
* 页码 |
|||
*/ |
|||
@Min(1) |
|||
private Integer pageNo; |
|||
|
|||
/** |
|||
* 每页显示数量默认20 |
|||
*/ |
|||
private Integer pageSize=20; |
|||
} |
|||
|
@ -0,0 +1,46 @@ |
|||
package com.epmet.dto.result; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import java.io.Serializable; |
|||
import java.util.Date; |
|||
|
|||
/** |
|||
* @Description 党员认证-审核历史列表f返参 |
|||
* @Author yinzuomei |
|||
* @Date 2020/4/26 23:29 |
|||
*/ |
|||
@Data |
|||
public class AuditedPartyMemberResultDTO implements Serializable { |
|||
private static final long serialVersionUID = 4203582446687799299L; |
|||
/** |
|||
* 居民id |
|||
*/ |
|||
private String userId; |
|||
|
|||
/** |
|||
* 用户真实姓名 |
|||
*/ |
|||
private String realName; |
|||
|
|||
/** |
|||
* 居民头像 |
|||
*/ |
|||
private String userHeadPhoto; |
|||
|
|||
/** |
|||
* 申请时间 |
|||
*/ |
|||
private Date applyTime; |
|||
|
|||
/** |
|||
* auto_confirm_failed:自动认证失败,rejected :拒绝 |
|||
*/ |
|||
private String status; |
|||
|
|||
/** |
|||
* read已读unread未读 |
|||
*/ |
|||
private String gridFullPath; |
|||
} |
|||
|
@ -0,0 +1,47 @@ |
|||
package com.epmet.dto.result; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import java.io.Serializable; |
|||
import java.util.Date; |
|||
|
|||
/** |
|||
* @Description 党员认证-待审核列表返参 |
|||
* @Author yinzuomei |
|||
* @Date 2020/4/26 16:08 |
|||
*/ |
|||
@Data |
|||
public class AuditingPartyMemberResultDTO implements Serializable { |
|||
private static final long serialVersionUID = 5408510275912925158L; |
|||
|
|||
/** |
|||
* 居民id |
|||
*/ |
|||
private String userId; |
|||
|
|||
/** |
|||
* 用户真实姓名 |
|||
*/ |
|||
private String realName; |
|||
|
|||
/** |
|||
* 居民头像 |
|||
*/ |
|||
private String userHeadPhoto; |
|||
|
|||
/** |
|||
* 申请时间 |
|||
*/ |
|||
private Date applyTime; |
|||
|
|||
/** |
|||
* 提交网格:XXX街道-XXX社区-XXX网格 |
|||
*/ |
|||
private String readFlag; |
|||
|
|||
/** |
|||
* read已读unread未读 |
|||
*/ |
|||
private String gridFullPath; |
|||
} |
|||
|
@ -0,0 +1,11 @@ |
|||
FROM java:8 |
|||
|
|||
RUN export LANG="zh_CN.UTF-8" |
|||
RUN ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime |
|||
RUN echo 'Asia/Shanghai' > /etc/timezone |
|||
|
|||
COPY ./target/*.jar ./app.jar |
|||
|
|||
EXPOSE 8097 |
|||
|
|||
ENTRYPOINT ["java","-Xms32m","-Xmx200m","-jar","./app.jar"] |
@ -0,0 +1,15 @@ |
|||
version: "3.7" |
|||
services: |
|||
gov-grid-server: |
|||
container_name: gov-grid-server-dev |
|||
image: registry-vpc.cn-qingdao.aliyuncs.com/epmet-cloud-dev/gov-grid-server:0.3.1 |
|||
ports: |
|||
- "8097:8097" |
|||
network_mode: host # 使用现有网络 |
|||
volumes: |
|||
- "/opt/epmet-cloud-logs/dev:/logs" |
|||
deploy: |
|||
resources: |
|||
limits: |
|||
cpus: '0.1' |
|||
memory: 250M |
@ -0,0 +1,169 @@ |
|||
<?xml version="1.0" encoding="UTF-8"?> |
|||
<project xmlns="http://maven.apache.org/POM/4.0.0" |
|||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
|||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> |
|||
<modelVersion>4.0.0</modelVersion> |
|||
<version>0.3.1</version> |
|||
<parent> |
|||
<groupId>com.epmet</groupId> |
|||
<artifactId>gov-grid</artifactId> |
|||
<version>2.0.0</version> |
|||
</parent> |
|||
<artifactId>gov-grid-server</artifactId> |
|||
<packaging>jar</packaging> |
|||
|
|||
<dependencies> |
|||
<dependency> |
|||
<groupId>com.epmet</groupId> |
|||
<artifactId>gov-grid-client</artifactId> |
|||
<version>2.0.0</version> |
|||
</dependency> |
|||
<dependency> |
|||
<groupId>org.springframework.boot</groupId> |
|||
<artifactId>spring-boot-starter-web</artifactId> |
|||
</dependency> |
|||
<dependency> |
|||
<groupId>org.springframework</groupId> |
|||
<artifactId>spring-context-support</artifactId> |
|||
</dependency> |
|||
<dependency> |
|||
<groupId>org.springframework.boot</groupId> |
|||
<artifactId>spring-boot-starter-actuator</artifactId> |
|||
</dependency> |
|||
<dependency> |
|||
<groupId>com.alibaba.cloud</groupId> |
|||
<artifactId>spring-cloud-starter-alibaba-nacos-discovery</artifactId> |
|||
</dependency> |
|||
<dependency> |
|||
<groupId>com.alibaba.cloud</groupId> |
|||
<artifactId>spring-cloud-starter-alibaba-nacos-config</artifactId> |
|||
</dependency> |
|||
<!-- 替换Feign原生httpclient --> |
|||
<dependency> |
|||
<groupId>io.github.openfeign</groupId> |
|||
<artifactId>feign-httpclient</artifactId> |
|||
<version>10.3.0</version> |
|||
</dependency> |
|||
|
|||
|
|||
<dependency> |
|||
<groupId>com.epmet</groupId> |
|||
<artifactId>gov-org-client</artifactId> |
|||
<version>2.0.0</version> |
|||
</dependency> |
|||
<dependency> |
|||
<groupId>com.epmet</groupId> |
|||
<artifactId>resi-partymember-client</artifactId> |
|||
<version>2.0.0</version> |
|||
<scope>compile</scope> |
|||
</dependency> |
|||
<dependency> |
|||
<groupId>com.epmet</groupId> |
|||
<artifactId>resi-group-client</artifactId> |
|||
<version>2.0.0</version> |
|||
<scope>compile</scope> |
|||
</dependency> |
|||
</dependencies> |
|||
|
|||
<build> |
|||
<finalName>${project.artifactId}</finalName> |
|||
<plugins> |
|||
<plugin> |
|||
<groupId>org.springframework.boot</groupId> |
|||
<artifactId>spring-boot-maven-plugin</artifactId> |
|||
</plugin> |
|||
<plugin> |
|||
<groupId>org.apache.maven.plugins</groupId> |
|||
<artifactId>maven-surefire-plugin</artifactId> |
|||
<configuration> |
|||
<skipTests>true</skipTests> |
|||
</configuration> |
|||
</plugin> |
|||
</plugins> |
|||
|
|||
<sourceDirectory>${project.basedir}/src/main/java</sourceDirectory> |
|||
<resources> |
|||
<resource> |
|||
<filtering>true</filtering> |
|||
<directory>${basedir}/src/main/resources</directory> |
|||
</resource> |
|||
</resources> |
|||
</build> |
|||
|
|||
<profiles> |
|||
<profile> |
|||
<id>dev-local</id> |
|||
<activation> |
|||
<activeByDefault>true</activeByDefault> |
|||
</activation> |
|||
<properties> |
|||
<server.port>8097</server.port> |
|||
<spring.profiles.active>dev</spring.profiles.active> |
|||
|
|||
<!-- redis配置 --> |
|||
<spring.redis.index>0</spring.redis.index> |
|||
<spring.redis.host>127.0.0.1</spring.redis.host> |
|||
<spring.redis.port>6379</spring.redis.port> |
|||
<spring.redis.password>123456</spring.redis.password> |
|||
<!-- nacos --> |
|||
<nacos.register-enabled>false</nacos.register-enabled> |
|||
<nacos.server-addr>122.152.200.70:8848</nacos.server-addr> |
|||
<nacos.discovery.namespace>fcd6fc8f-ca3a-4b01-8026-2b05cdc5976b</nacos.discovery.namespace> |
|||
<nacos.config.namespace></nacos.config.namespace> |
|||
<nacos.config.group></nacos.config.group> |
|||
<nacos.config-enabled>false</nacos.config-enabled> |
|||
<nacos.ip/> |
|||
</properties> |
|||
</profile> |
|||
<profile> |
|||
<id>dev</id> |
|||
<!--<activation> |
|||
<activeByDefault>true</activeByDefault> |
|||
</activation>--> |
|||
<properties> |
|||
<server.port>8097</server.port> |
|||
<spring.profiles.active>dev</spring.profiles.active> |
|||
|
|||
<!-- redis配置 --> |
|||
<spring.redis.index>0</spring.redis.index> |
|||
<spring.redis.host>r-m5eoz5b6tkx09y6bpz.redis.rds.aliyuncs.com</spring.redis.host> |
|||
<spring.redis.port>6379</spring.redis.port> |
|||
<spring.redis.password>EpmEtrEdIs!q@w</spring.redis.password> |
|||
<!-- nacos --> |
|||
<nacos.register-enabled>true</nacos.register-enabled> |
|||
<nacos.server-addr>192.168.10.150:8848</nacos.server-addr> |
|||
<nacos.discovery.namespace>67e3c350-533e-4d7c-9f8f-faf1b4aa82ae</nacos.discovery.namespace> |
|||
<nacos.config.namespace></nacos.config.namespace> |
|||
<nacos.config.group></nacos.config.group> |
|||
<nacos.config-enabled>false</nacos.config-enabled> |
|||
<nacos.ip/> |
|||
</properties> |
|||
</profile> |
|||
<profile> |
|||
<id>test</id> |
|||
<!--<activation> |
|||
<activeByDefault>true</activeByDefault> |
|||
</activation>--> |
|||
<properties> |
|||
<server.port>8097</server.port> |
|||
<spring.profiles.active>test</spring.profiles.active> |
|||
|
|||
<!-- redis配置 --> |
|||
<spring.redis.index>0</spring.redis.index> |
|||
<spring.redis.host>10.10.10.248</spring.redis.host> |
|||
<spring.redis.port>6379</spring.redis.port> |
|||
<spring.redis.password>123456</spring.redis.password> |
|||
<!-- nacos --> |
|||
<nacos.register-enabled>true</nacos.register-enabled> |
|||
<nacos.server-addr>122.152.200.70:8848</nacos.server-addr> |
|||
<nacos.discovery.namespace>fcd6fc8f-ca3a-4b01-8026-2b05cdc5976b</nacos.discovery.namespace> |
|||
<nacos.config.namespace></nacos.config.namespace> |
|||
<nacos.config.group></nacos.config.group> |
|||
<nacos.config-enabled>false</nacos.config-enabled> |
|||
<nacos.ip/> |
|||
</properties> |
|||
</profile> |
|||
</profiles> |
|||
|
|||
|
|||
</project> |
@ -0,0 +1,23 @@ |
|||
package com.epmet; |
|||
|
|||
import org.springframework.boot.SpringApplication; |
|||
import org.springframework.boot.autoconfigure.SpringBootApplication; |
|||
import org.springframework.cloud.client.discovery.EnableDiscoveryClient; |
|||
import org.springframework.cloud.openfeign.EnableFeignClients; |
|||
|
|||
/** |
|||
* |
|||
* |
|||
* @author Mark sunlightcs@gmail.com |
|||
* @since 1.0.0 |
|||
*/ |
|||
@SpringBootApplication |
|||
@EnableDiscoveryClient |
|||
@EnableFeignClients |
|||
public class GovGridApplication { |
|||
|
|||
public static void main(String[] args) { |
|||
SpringApplication.run(GovGridApplication.class, args); |
|||
} |
|||
|
|||
} |
@ -0,0 +1,26 @@ |
|||
/** |
|||
* Copyright (c) 2018 人人开源 All rights reserved. |
|||
* |
|||
* https://www.renren.io
|
|||
* |
|||
* 版权所有,侵权必究! |
|||
*/ |
|||
|
|||
package com.epmet.config; |
|||
|
|||
import com.epmet.commons.tools.config.ModuleConfig; |
|||
import org.springframework.stereotype.Service; |
|||
|
|||
/** |
|||
* 模块配置信息 |
|||
* |
|||
* @author Mark sunlightcs@gmail.com |
|||
* @since 1.0.0 |
|||
*/ |
|||
@Service |
|||
public class ModuleConfigImpl implements ModuleConfig { |
|||
@Override |
|||
public String getName() { |
|||
return "govgrid"; |
|||
} |
|||
} |
@ -0,0 +1,68 @@ |
|||
/** |
|||
* Copyright (c) 2018 人人开源 All rights reserved. |
|||
* |
|||
* https://www.renren.io
|
|||
* |
|||
* 版权所有,侵权必究! |
|||
*/ |
|||
|
|||
package com.epmet.config; |
|||
|
|||
import com.epmet.commons.tools.constant.Constant; |
|||
import io.swagger.annotations.ApiOperation; |
|||
import org.springframework.context.annotation.Bean; |
|||
import org.springframework.context.annotation.Configuration; |
|||
import springfox.documentation.builders.ApiInfoBuilder; |
|||
import springfox.documentation.builders.PathSelectors; |
|||
import springfox.documentation.builders.RequestHandlerSelectors; |
|||
import springfox.documentation.service.ApiInfo; |
|||
import springfox.documentation.service.ApiKey; |
|||
import springfox.documentation.spi.DocumentationType; |
|||
import springfox.documentation.spring.web.plugins.Docket; |
|||
import springfox.documentation.swagger2.annotations.EnableSwagger2; |
|||
|
|||
import java.util.List; |
|||
|
|||
import static com.google.common.collect.Lists.newArrayList; |
|||
|
|||
/** |
|||
* Swagger配置 |
|||
* |
|||
* @author Mark sunlightcs@gmail.com |
|||
* @since 1.0.0 |
|||
*/ |
|||
@Configuration |
|||
@EnableSwagger2 |
|||
public class SwaggerConfig { |
|||
|
|||
@Bean |
|||
public Docket createRestApi() { |
|||
return new Docket(DocumentationType.SWAGGER_2) |
|||
.apiInfo(apiInfo()) |
|||
.select() |
|||
//加了ApiOperation注解的类,才生成接口文档
|
|||
.apis(RequestHandlerSelectors.withMethodAnnotation(ApiOperation.class)) |
|||
//包下的类,才生成接口文档
|
|||
//.apis(RequestHandlerSelectors.basePackage("io.renren.controller"))
|
|||
.paths(PathSelectors.any()) |
|||
.build() |
|||
.directModelSubstitute(java.util.Date.class, String.class) |
|||
.securitySchemes(security()); |
|||
} |
|||
|
|||
private ApiInfo apiInfo() { |
|||
return new ApiInfoBuilder() |
|||
.title("人人开源") |
|||
.description("系统模块开发文档") |
|||
.termsOfServiceUrl("https://www.renren.io/community") |
|||
.version("1.4.0") |
|||
.build(); |
|||
} |
|||
|
|||
private List<ApiKey> security() { |
|||
return newArrayList( |
|||
new ApiKey(Constant.TOKEN_HEADER, Constant.TOKEN_HEADER, "header") |
|||
); |
|||
} |
|||
|
|||
} |
@ -0,0 +1,126 @@ |
|||
package com.epmet.controller; |
|||
|
|||
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.commons.tools.validator.ValidatorUtils; |
|||
import com.epmet.resi.group.dto.group.form.*; |
|||
import com.epmet.resi.group.dto.group.result.ApplyingGroupDetailResultDTO; |
|||
import com.epmet.resi.group.dto.group.result.ApplyingGroupResultDTO; |
|||
import com.epmet.commons.tools.validator.ValidatorUtils; |
|||
import com.epmet.resi.group.dto.group.form.GovGroupSummarizeFromDTO; |
|||
import com.epmet.resi.group.dto.group.form.GroupAuditedFromDTO; |
|||
import com.epmet.resi.group.dto.group.result.GovGroupSummarizeResultDTO; |
|||
import com.epmet.resi.group.dto.group.result.GroupAuditedResultDTO; |
|||
import com.epmet.resi.group.dto.group.result.GroupsInGridResultDTO; |
|||
import com.epmet.service.ResiGroupService; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.web.bind.annotation.PostMapping; |
|||
import org.springframework.web.bind.annotation.RequestBody; |
|||
import org.springframework.web.bind.annotation.RequestMapping; |
|||
import org.springframework.web.bind.annotation.RestController; |
|||
|
|||
import java.util.List; |
|||
|
|||
/** |
|||
* @Description 政府端管理楼院小组业务 |
|||
* @ClassName ResiGroupController |
|||
* @Author wangc |
|||
* @date 2020.04.16 15:30 |
|||
*/ |
|||
@RestController |
|||
@RequestMapping("resi/group") |
|||
public class ResiGroupController { |
|||
@Autowired |
|||
ResiGroupService resiGroupService; |
|||
/** |
|||
* 小组审核历史列表 |
|||
* |
|||
* @param formDTO 参数 |
|||
* @return |
|||
*/ |
|||
@PostMapping("audited") |
|||
public Result<List<GroupAuditedResultDTO>> audited(@RequestBody GroupAuditedFromDTO formDTO) { |
|||
return resiGroupService.audited(formDTO); |
|||
} |
|||
|
|||
/** |
|||
* 本网格小组列表 |
|||
* |
|||
* @param formDTO 参数 |
|||
* @return Result<List < GroupAuditedResultDTO>> |
|||
*/ |
|||
@PostMapping("groupsingrid") |
|||
public Result<List<GroupsInGridResultDTO>> getGroupsInGrid(GroupAuditedFromDTO formDTO) { |
|||
ValidatorUtils.validateEntity(formDTO); |
|||
return resiGroupService.getGroupsInGrid(formDTO); |
|||
} |
|||
|
|||
/** |
|||
* 小组管理界面信息 |
|||
* |
|||
* @param formDTO 参数 |
|||
* @return Result<GovGroupSummarizeResultDTO> |
|||
*/ |
|||
@PostMapping("getgroupsummarize") |
|||
public Result<GovGroupSummarizeResultDTO> getGroupSummarize(GovGroupSummarizeFromDTO formDTO) { |
|||
ValidatorUtils.validateEntity(formDTO); |
|||
return resiGroupService.getGroupSummarize(formDTO); |
|||
} |
|||
|
|||
/** |
|||
* @Description 查询小组待审核列表 |
|||
* @Param ApplyingGroupsFormDTO.class |
|||
* @return Result<List<ApplyingGroupResultDTO>> |
|||
* @Author wangc |
|||
* @Date 2020.04.20 13:59 |
|||
**/ |
|||
@PostMapping("auditing") |
|||
public Result<List<ApplyingGroupResultDTO>> auditing(@LoginUser TokenDto tokenDto, @RequestBody ApplyingGroupsFormDTO applyingGroupsFormDTO){ |
|||
applyingGroupsFormDTO.setUserId(tokenDto.getUserId()); |
|||
ValidatorUtils.validateEntity(applyingGroupsFormDTO); |
|||
return resiGroupService.auditing(applyingGroupsFormDTO); |
|||
} |
|||
|
|||
/** |
|||
* @Description 得到待审核/未审核小组信息的详情 |
|||
* @Param CommonGroupIdFromDTO -> String groupId |
|||
* @return Result<ApplyingGroupDetailResultDTO> |
|||
* @Author wangc |
|||
* @Date 2020.04.20 14:08 |
|||
**/ |
|||
@PostMapping("applygroupdetail") |
|||
public Result<ApplyingGroupDetailResultDTO> applyGroupDetail(@LoginUser TokenDto tokenDto, @RequestBody CommonGroupIdFromDTO groupIdFromDTO){ |
|||
groupIdFromDTO.setUserId(tokenDto.getUserId()); |
|||
ValidatorUtils.validateEntity(groupIdFromDTO); |
|||
return resiGroupService.applyGroupDetail(groupIdFromDTO); |
|||
} |
|||
|
|||
/** |
|||
* @Description 建组申请-审核通过 |
|||
* @Param AgreeApplyGroupFormDTO |
|||
* @return Result |
|||
* @Author wangc |
|||
* @Date 2020.04.20 14:25 |
|||
**/ |
|||
@PostMapping("approve") |
|||
public Result agreeApplying(@LoginUser TokenDto tokenDto, @RequestBody AgreeApplyGroupFormDTO agreeApplyGroupFormDTO){ |
|||
agreeApplyGroupFormDTO.setUserId(tokenDto.getUserId()); |
|||
ValidatorUtils.validateEntity(agreeApplyGroupFormDTO); |
|||
return resiGroupService.agreeApplying(agreeApplyGroupFormDTO); |
|||
} |
|||
|
|||
/** |
|||
* @Description 建组申请-审核驳回 |
|||
* @Param DisAgreeApplyGroupFormDTO |
|||
* @return Result |
|||
* @Author wangc |
|||
* @Date 2020.04.20 14:26 |
|||
**/ |
|||
@PostMapping("reject") |
|||
public Result disagreeApplying(@LoginUser TokenDto tokenDto, @RequestBody DisAgreeApplyGroupFormDTO disAgreeApplyGroupFormDTO){ |
|||
disAgreeApplyGroupFormDTO.setUserId(tokenDto.getUserId()); |
|||
ValidatorUtils.validateEntity(disAgreeApplyGroupFormDTO); |
|||
return resiGroupService.disagreeApplying(disAgreeApplyGroupFormDTO); |
|||
} |
|||
} |
@ -0,0 +1,53 @@ |
|||
package com.epmet.controller; |
|||
|
|||
import com.epmet.commons.tools.utils.Result; |
|||
import com.epmet.dto.form.AuditedPartyMemberFormDTO; |
|||
import com.epmet.dto.form.AuditingPartyMemberFormDTO; |
|||
import com.epmet.dto.result.AuditedPartyMemberResultDTO; |
|||
import com.epmet.dto.result.AuditingPartyMemberResultDTO; |
|||
import com.epmet.service.ResiPartyMemberService; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.web.bind.annotation.PostMapping; |
|||
import org.springframework.web.bind.annotation.RequestBody; |
|||
import org.springframework.web.bind.annotation.RequestMapping; |
|||
import org.springframework.web.bind.annotation.RestController; |
|||
|
|||
import java.util.List; |
|||
|
|||
/** |
|||
* @Description 基层治理-党员认证 |
|||
* @Author yinzuomei |
|||
* @Date 2020/4/26 14:01 |
|||
*/ |
|||
@RestController |
|||
@RequestMapping("partymember") |
|||
public class ResiPartyMemberController { |
|||
@Autowired |
|||
private ResiPartyMemberService resiPartyMemberService; |
|||
|
|||
/** |
|||
* @param formDTO |
|||
* @return com.epmet.commons.tools.utils.Result |
|||
* @Author yinzuomei |
|||
* @Description 待审核列表:自动审核失败且已经录入了补充信息的 |
|||
* @Date 2020/4/26 16:04 |
|||
**/ |
|||
@PostMapping("auditing") |
|||
public Result<List<AuditingPartyMemberResultDTO>> auditing(@RequestBody AuditingPartyMemberFormDTO formDTO) { |
|||
return resiPartyMemberService.auditing(formDTO); |
|||
} |
|||
|
|||
/** |
|||
* @return com.epmet.commons.tools.utils.Result<java.util.List < com.epmet.dto.result.AuditedPartyMemberResultDTO>> |
|||
* @param formDTO |
|||
* @Author yinzuomei |
|||
* @Description 党员认证-审核历史列表(审核历史:只包括自动审核失败和拒绝的审核失败:居民未填写补充信息。) |
|||
* @Date 2020/4/26 23:31 |
|||
**/ |
|||
@PostMapping("audited") |
|||
public Result<List<AuditedPartyMemberResultDTO>> audited(@RequestBody AuditedPartyMemberFormDTO formDTO) { |
|||
return resiPartyMemberService.audited(formDTO); |
|||
} |
|||
} |
|||
|
|||
|
@ -0,0 +1,85 @@ |
|||
package com.epmet.controller; |
|||
|
|||
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.commons.tools.validator.ValidatorUtils; |
|||
import com.epmet.resi.group.dto.comment.form.ResiQueryCommentFormDTO; |
|||
import com.epmet.resi.group.dto.comment.result.ResiCommentResultDTO; |
|||
import com.epmet.resi.group.dto.topic.form.ResiTopicDetailFormDTO; |
|||
import com.epmet.resi.group.dto.topic.form.ResiTopicPageFormDTO; |
|||
import com.epmet.resi.group.dto.topic.result.ResiTopicDetailResultDTO; |
|||
import com.epmet.resi.group.dto.topic.result.ResiTopicInfoResultDTO; |
|||
import com.epmet.service.ResiTopicService; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.web.bind.annotation.PostMapping; |
|||
import org.springframework.web.bind.annotation.RequestBody; |
|||
import org.springframework.web.bind.annotation.RequestMapping; |
|||
import org.springframework.web.bind.annotation.RestController; |
|||
|
|||
import java.util.List; |
|||
|
|||
@RestController |
|||
@RequestMapping("resi/topic") |
|||
public class ResiTopicController { |
|||
@Autowired |
|||
private ResiTopicService resiTopicService; |
|||
|
|||
/** |
|||
* @Description 政府端群组管理-屏蔽话题列表查询 |
|||
* @Param tokenDto |
|||
* @Param ResiTopicPageFormDTO.class |
|||
* @return List<ResiTopicInfoResultDTO> |
|||
* @Author wangc |
|||
* @Date 2020.04.01 16:45 |
|||
**/ |
|||
@PostMapping("hiddenlist") |
|||
Result<List<ResiTopicInfoResultDTO>> hiddenList(@LoginUser TokenDto tokenDto, @RequestBody ResiTopicPageFormDTO topicPageFormDTO){ |
|||
ValidatorUtils.validateEntity(topicPageFormDTO); |
|||
return resiTopicService.hiddenList(topicPageFormDTO); |
|||
} |
|||
|
|||
/** |
|||
* @Description 政府端群组管理-查看历史话题(分页,允许状态筛选) |
|||
* @Param tokenDto |
|||
* @Param ResiTopicPageFormDTO.class |
|||
* @return Result<List<ResiTopicInfoResultDTO>> |
|||
* @Author wangc |
|||
* @Date 2020.04.01 10:36 |
|||
**/ |
|||
@PostMapping("alltopics") |
|||
Result<List<ResiTopicInfoResultDTO>> allTopics(@LoginUser TokenDto tokenDto,@RequestBody ResiTopicPageFormDTO topicPageFormDTO){ |
|||
ValidatorUtils.validateEntity(topicPageFormDTO); |
|||
return resiTopicService.allTopics(topicPageFormDTO); |
|||
} |
|||
|
|||
/** |
|||
* @Description 政府端群组管理-获取话题详情 |
|||
* @Param tokenDto |
|||
* @Param String |
|||
* @return Result<ResiTopicDetailResultDTO> |
|||
* @Author wangc |
|||
* @Date 2020.04.01 23:48 |
|||
**/ |
|||
@PostMapping("topicdetail") |
|||
Result<ResiTopicDetailResultDTO> getTopicDetailGov(@LoginUser TokenDto tokenDto,@RequestBody ResiTopicDetailFormDTO topicDetailFormDTO){ |
|||
ValidatorUtils.validateEntity(topicDetailFormDTO); |
|||
return resiTopicService.topicDetail(topicDetailFormDTO); |
|||
} |
|||
|
|||
/** |
|||
* @Description 政府端群组管理-获取某个话题的评论列表 |
|||
* @Param tokenDto |
|||
* @Param ResiQueryCommentFormDTO |
|||
* @return Result<List<ResiCommentResultDTO>> |
|||
* @Author wangc |
|||
* @Date 2020.04.01 23:49 |
|||
**/ |
|||
@PostMapping("topiccomments") |
|||
Result<List<ResiCommentResultDTO>> topicComments(@LoginUser TokenDto tokenDto,@RequestBody ResiQueryCommentFormDTO queryCommentFormDTO){ |
|||
ValidatorUtils.validateEntity(queryCommentFormDTO); |
|||
return resiTopicService.topicComments(queryCommentFormDTO); |
|||
} |
|||
|
|||
|
|||
} |
@ -0,0 +1,88 @@ |
|||
package com.epmet.controller; |
|||
|
|||
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.commons.tools.validator.ValidatorUtils; |
|||
import com.epmet.resi.partymember.dto.warmhearted.form.*; |
|||
import com.epmet.resi.partymember.dto.warmhearted.result.ResiWarmAuditResultDTO; |
|||
import com.epmet.resi.partymember.dto.warmhearted.result.ResiWarmheartedAuditedResultDTO; |
|||
import com.epmet.service.ResiWarmheartedService; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.web.bind.annotation.PostMapping; |
|||
import org.springframework.web.bind.annotation.RequestBody; |
|||
import org.springframework.web.bind.annotation.RequestMapping; |
|||
import org.springframework.web.bind.annotation.RestController; |
|||
|
|||
import java.util.List; |
|||
|
|||
/** |
|||
* @Description 政府端管理热心居民业务 |
|||
* @ClassName ResiWarmheartedController |
|||
* @Author wangc |
|||
* @date 2020.04.16 15:30 |
|||
*/ |
|||
@RestController |
|||
@RequestMapping("resi/warmhearted") |
|||
public class ResiWarmheartedController { |
|||
|
|||
@Autowired |
|||
private ResiWarmheartedService resiWarmheartedService; |
|||
|
|||
/** |
|||
* 热心居民审核历史列表 |
|||
* |
|||
* @param formDTO 参数 |
|||
* @return |
|||
*/ |
|||
@PostMapping("audited") |
|||
public Result<List<ResiWarmheartedAuditedResultDTO>> audited(@RequestBody ResiWarmheartedAuditedFromDTO formDTO) { |
|||
return resiWarmheartedService.audited(formDTO); |
|||
} |
|||
|
|||
/** |
|||
* @param |
|||
* @Author sun |
|||
* @Description 政府端-获取待审核的热心居民申请列表 |
|||
**/ |
|||
@PostMapping("auditing") |
|||
public Result<List<ResiWarmAuditResultDTO>> auditing(@LoginUser TokenDto tokenDTO, @RequestBody ResiWarmAuditFormDTO formDTO) { |
|||
ValidatorUtils.validateEntity(formDTO); |
|||
return resiWarmheartedService.auditing(formDTO); |
|||
} |
|||
|
|||
/** |
|||
* @param |
|||
* @Author sun |
|||
* @Description 政府端-热心居民申请-审核通过 |
|||
**/ |
|||
@PostMapping("approve") |
|||
public Result approve(@LoginUser TokenDto tokenDTO, @RequestBody ResiWarmAuditApproveFormDTO formDTO) { |
|||
ValidatorUtils.validateEntity(formDTO); |
|||
return resiWarmheartedService.approve(formDTO); |
|||
} |
|||
|
|||
/** |
|||
* @param |
|||
* @Author sun |
|||
* @Description 政府端-热心居民申请-审核驳回 |
|||
**/ |
|||
@PostMapping("reject") |
|||
public Result reject(@LoginUser TokenDto tokenDTO, @RequestBody ResiWarmAuditRejectFormDTO formDTO) { |
|||
ValidatorUtils.validateEntity(formDTO); |
|||
return resiWarmheartedService.reject(formDTO); |
|||
} |
|||
|
|||
/** |
|||
* @param |
|||
* @Author sun |
|||
* @Description 政府端-热心居民申请详情信息 |
|||
**/ |
|||
@PostMapping("getdetail") |
|||
public Result<ResiWarmAuditResultDTO> getDetail(@LoginUser TokenDto tokenDTO, @RequestBody ResiWarmGetDetailFormDTO formDTO) { |
|||
ValidatorUtils.validateEntity(formDTO); |
|||
return resiWarmheartedService.getDetail(formDTO); |
|||
} |
|||
|
|||
|
|||
} |
@ -0,0 +1,16 @@ |
|||
package com.epmet.exception; |
|||
|
|||
import com.epmet.commons.tools.exception.ErrorCode; |
|||
|
|||
/** |
|||
* 模块错误编码,由9位数字组成,前6位为模块编码,后3位为业务编码 |
|||
* <p> |
|||
* 如:100001001(100001代表模块,001代表业务代码) |
|||
* </p> |
|||
* |
|||
* @author Mark sunlightcs@gmail.com |
|||
* @since 1.0.0 |
|||
*/ |
|||
public interface ModuleErrorCode extends ErrorCode { |
|||
|
|||
} |
@ -0,0 +1,144 @@ |
|||
package com.epmet.feign; |
|||
|
|||
import com.epmet.commons.tools.constant.ServiceConstant; |
|||
import com.epmet.commons.tools.utils.Result; |
|||
import com.epmet.feign.fallback.ResiGroupFeignClientFallBack; |
|||
import com.epmet.resi.group.dto.comment.form.ResiQueryCommentFormDTO; |
|||
import com.epmet.resi.group.dto.comment.result.ResiCommentResultDTO; |
|||
import com.epmet.resi.group.dto.group.form.GovGroupSummarizeFromDTO; |
|||
import com.epmet.resi.group.dto.group.form.GroupAuditedFromDTO; |
|||
import com.epmet.resi.group.dto.group.result.GovGroupSummarizeResultDTO; |
|||
import com.epmet.resi.group.dto.group.form.*; |
|||
import com.epmet.resi.group.dto.group.result.ApplyingGroupDetailResultDTO; |
|||
import com.epmet.resi.group.dto.group.result.ApplyingGroupResultDTO; |
|||
import com.epmet.resi.group.dto.group.result.GroupAuditedResultDTO; |
|||
import com.epmet.resi.group.dto.group.result.GroupsInGridResultDTO; |
|||
import com.epmet.resi.group.dto.topic.form.ResiTopicDetailFormDTO; |
|||
import com.epmet.resi.group.dto.topic.form.ResiTopicPageFormDTO; |
|||
import com.epmet.resi.group.dto.topic.result.ResiTopicDetailResultDTO; |
|||
import com.epmet.resi.group.dto.topic.result.ResiTopicInfoResultDTO; |
|||
import org.springframework.cloud.openfeign.FeignClient; |
|||
import org.springframework.web.bind.annotation.PostMapping; |
|||
import org.springframework.web.bind.annotation.RequestBody; |
|||
|
|||
import java.util.List; |
|||
|
|||
/** |
|||
* @author zhaoqifeng |
|||
* @dscription |
|||
* @date 2020/4/17 15:24 |
|||
*/ |
|||
@FeignClient(name = ServiceConstant.RESI_GROUP_SERVER, fallback = ResiGroupFeignClientFallBack.class) |
|||
public interface ResiGroupFeignClient { |
|||
/** |
|||
* 小组审核历史列表 |
|||
* |
|||
* @param formDTO 参数 |
|||
* @return Result<List < GroupAuditedResultDTO>> |
|||
*/ |
|||
@PostMapping("/resi/group/group/audited") |
|||
Result<List<GroupAuditedResultDTO>> audited(GroupAuditedFromDTO formDTO); |
|||
|
|||
/** |
|||
* 本网格小组列表 |
|||
* |
|||
* @param formDTO 参数 |
|||
* @return Result<List < GroupAuditedResultDTO>> |
|||
*/ |
|||
@PostMapping("/resi/group/group/groupsingrid") |
|||
Result<List<GroupsInGridResultDTO>> getGroupsInGrid(GroupAuditedFromDTO formDTO); |
|||
|
|||
/** |
|||
* 小组管理界面信息 |
|||
* |
|||
* @param formDTO 参数 |
|||
* @return Result<GovGroupSummarizeResultDTO> |
|||
*/ |
|||
@PostMapping("/resi/group/group/getgovgroupsummarize") |
|||
Result<GovGroupSummarizeResultDTO> getGovGroupSummarize(GovGroupSummarizeFromDTO formDTO); |
|||
|
|||
/** |
|||
* @Description 得到小组待审核列表,用户信息不注入TokenDTO,通过外部服务调用直接传入参数 |
|||
* @Param ApplyingGroupsFormDTO.class |
|||
* @return Result<List<ApplyingGroupResultDTO>> |
|||
* @Author wangc |
|||
* @Date 2020.04.20 13:59 |
|||
**/ |
|||
@PostMapping("/resi/group/group/getapplyinggroups") |
|||
Result<List<ApplyingGroupResultDTO>> getApplyingGroups(ApplyingGroupsFormDTO applyingGroupsFormDTO); |
|||
|
|||
/** |
|||
* @Description 得到待审核/未审核小组信息的详情 |
|||
* @Param CommonGroupIdFromDTO -> String groupId |
|||
* @return Result<ApplyingGroupDetailResultDTO> |
|||
* @Author wangc |
|||
* @Date 2020.04.20 14:08 |
|||
**/ |
|||
@PostMapping("/resi/group/group/getapplyinggroupdetail") |
|||
Result<ApplyingGroupDetailResultDTO> getApplyingGroupDetail(CommonGroupIdFromDTO groupId); |
|||
|
|||
/** |
|||
* @Description 建组申请-审核通过 |
|||
* @Param AgreeApplyGroupFormDTO |
|||
* @return Result |
|||
* @Author wangc |
|||
* @Date 2020.04.20 14:25 |
|||
**/ |
|||
@PostMapping("/resi/group/group/agreeapplying") |
|||
Result agreeApplying(AgreeApplyGroupFormDTO agreeApplyGroupFormDTO); |
|||
|
|||
/** |
|||
* @Description 建组申请-审核驳回 |
|||
* @Param DisAgreeApplyGroupFormDTO |
|||
* @return Result |
|||
* @Author wangc |
|||
* @Date 2020.04.20 14:26 |
|||
**/ |
|||
@PostMapping("/resi/group/group/disagreeapplying") |
|||
Result disagreeApplying(DisAgreeApplyGroupFormDTO disAgreeApplyGroupFormDTO); |
|||
|
|||
/** |
|||
* @Description 政府端群组管理-屏蔽话题列表查询 |
|||
* @Param tokenDto |
|||
* @Param ResiTopicPageFormDTO.class |
|||
* @return List<ResiTopicInfoResultDTO> |
|||
* @Author wangc |
|||
* @Date 2020.04.01 16:45 |
|||
**/ |
|||
@PostMapping("/resi/group/topic/gethiddentopicgov") |
|||
Result<List<ResiTopicInfoResultDTO>> getHiddenTopicGov(ResiTopicPageFormDTO topicPageFormDTO); |
|||
|
|||
/** |
|||
* @Description 政府端群组管理-查看历史话题(分页,允许状态筛选) |
|||
* @Param tokenDto |
|||
* @Param ResiTopicPageFormDTO.class |
|||
* @return Result<List<ResiTopicInfoResultDTO>> |
|||
* @Author wangc |
|||
* @Date 2020.04.01 10:36 |
|||
**/ |
|||
@PostMapping("/resi/group/topic/getpasttopiclistgov") |
|||
Result<List<ResiTopicInfoResultDTO>> getPastTopicListGov(ResiTopicPageFormDTO topicPageFormDTO); |
|||
|
|||
/** |
|||
* @Description 政府端群组管理-获取话题详情 |
|||
* @Param tokenDto |
|||
* @Param String |
|||
* @return Result<ResiTopicDetailResultDTO> |
|||
* @Author wangc |
|||
* @Date 2020.04.01 23:48 |
|||
**/ |
|||
@PostMapping("/resi/group/topic/gettopicdetailgov") |
|||
Result<ResiTopicDetailResultDTO> getTopicDetailGov(ResiTopicDetailFormDTO topicDetailFormDTO); |
|||
|
|||
/** |
|||
* @Description 政府端群组管理-获取某个话题的评论列表 |
|||
* @Param tokenDto |
|||
* @Param ResiQueryCommentFormDTO |
|||
* @return Result<List<ResiCommentResultDTO>> |
|||
* @Author wangc |
|||
* @Date 2020.04.01 23:49 |
|||
**/ |
|||
@PostMapping("/resi/group/comment/getcommentlistoftopicgov") |
|||
Result<List<ResiCommentResultDTO>> getCommentListOfTopicGov(ResiQueryCommentFormDTO queryCommentFormDTO); |
|||
|
|||
} |
@ -0,0 +1,90 @@ |
|||
package com.epmet.feign; |
|||
|
|||
import com.epmet.commons.tools.constant.ServiceConstant; |
|||
import com.epmet.commons.tools.utils.Result; |
|||
import com.epmet.feign.fallback.ResiPartymemberFeignClientFallBack; |
|||
import com.epmet.resi.partymember.dto.partymember.form.ReviewedParyMemberFormDTO; |
|||
import com.epmet.resi.partymember.dto.partymember.form.UnderReviewParyMemberFormDTO; |
|||
import com.epmet.resi.partymember.dto.partymember.result.ReviewedParyMemberResultDTO; |
|||
import com.epmet.resi.partymember.dto.partymember.result.UnderReviewParyMemberResultDTO; |
|||
import com.epmet.resi.partymember.dto.warmhearted.form.*; |
|||
import com.epmet.resi.partymember.dto.warmhearted.result.ResiWarmAuditResultDTO; |
|||
import com.epmet.resi.partymember.dto.warmhearted.result.ResiWarmheartedAuditedResultDTO; |
|||
import org.springframework.cloud.openfeign.FeignClient; |
|||
import org.springframework.http.MediaType; |
|||
import org.springframework.web.bind.annotation.PostMapping; |
|||
import org.springframework.web.bind.annotation.RequestBody; |
|||
|
|||
import java.util.List; |
|||
|
|||
/** |
|||
* 调用epmet-user服务 |
|||
* |
|||
* @author 赵奇风 |
|||
*/ |
|||
@FeignClient(name = ServiceConstant.RESI_PARTYMEMBER_SERVER, fallback = ResiPartymemberFeignClientFallBack.class) |
|||
public interface ResiPartymemberFeignClient { |
|||
/** |
|||
* 居民端-热心居民申请-提交申请数据 |
|||
* |
|||
* @author zhaoqf |
|||
**/ |
|||
@PostMapping(value = "resi/partymember/resiwarmheartedapply/audited", consumes = MediaType.APPLICATION_JSON_UTF8_VALUE) |
|||
Result<List<ResiWarmheartedAuditedResultDTO>> audited(@RequestBody ResiWarmheartedAuditedFromDTO formDTO); |
|||
|
|||
/** |
|||
* 政府端-获取待审核的热心居民申请列表 |
|||
* @param |
|||
* @return void |
|||
* @author sun |
|||
*/ |
|||
@PostMapping(value = "resi/partymember/resiwarmheartedapply/auditing", consumes = MediaType.APPLICATION_JSON_UTF8_VALUE) |
|||
Result<List<ResiWarmAuditResultDTO>> auditing(@RequestBody ResiWarmAuditFormDTO formDTO); |
|||
|
|||
/** |
|||
* 政府端-热心居民申请-审核通过 |
|||
* @param |
|||
* @return void |
|||
* @author sun |
|||
*/ |
|||
@PostMapping(value = "resi/partymember/resiwarmheartedapply/approve", consumes = MediaType.APPLICATION_JSON_UTF8_VALUE) |
|||
Result approve(@RequestBody ResiWarmAuditApproveFormDTO formDTO); |
|||
|
|||
/** |
|||
* 政府端-热心居民申请-审核驳回 |
|||
* @param |
|||
* @return void |
|||
* @author sun |
|||
*/ |
|||
@PostMapping(value = "resi/partymember/resiwarmheartedapply/reject", consumes = MediaType.APPLICATION_JSON_UTF8_VALUE) |
|||
Result reject(@RequestBody ResiWarmAuditRejectFormDTO formDTO); |
|||
|
|||
/** |
|||
* 政府端-获取待审核的热心居民申请列表 |
|||
* @param |
|||
* @return void |
|||
* @author sun |
|||
*/ |
|||
@PostMapping(value = "resi/partymember/resiwarmheartedapply/getdetail", consumes = MediaType.APPLICATION_JSON_UTF8_VALUE) |
|||
Result<ResiWarmAuditResultDTO> getDetail(@RequestBody ResiWarmGetDetailFormDTO formDTO); |
|||
|
|||
/** |
|||
* @param underReviewParyMemberFormDTO |
|||
* @return com.epmet.commons.tools.utils.Result<java.util.List < com.epmet.resi.partymember.dto.partymember.result.UnderReviewParyMemberResultDTO>> |
|||
* @Author yinzuomei |
|||
* @Description 政府端(小程序端)查询待审核列表 |
|||
* @Date 2020/4/26 21:53 |
|||
**/ |
|||
@PostMapping(value = "resi/partymember/partymemberbaseinfo/auditing", consumes = MediaType.APPLICATION_JSON_UTF8_VALUE) |
|||
Result<List<UnderReviewParyMemberResultDTO>> auditingPartyMember(@RequestBody UnderReviewParyMemberFormDTO underReviewParyMemberFormDTO); |
|||
|
|||
/** |
|||
* @return com.epmet.commons.tools.utils.Result<java.util.List<com.epmet.resi.partymember.dto.partymember.result.ReviewedParyMemberResultDTO>> |
|||
* @param reviewedParyMemberFormDTO |
|||
* @Author yinzuomei |
|||
* @Description 党员认证-审核历史列表查询 |
|||
* @Date 2020/4/26 23:38 |
|||
**/ |
|||
@PostMapping(value = "resi/partymember/partymemberbaseinfo/audited", consumes = MediaType.APPLICATION_JSON_UTF8_VALUE) |
|||
Result<List<ReviewedParyMemberResultDTO>> auditedPartyMember(@RequestBody ReviewedParyMemberFormDTO reviewedParyMemberFormDTO); |
|||
} |
@ -0,0 +1,114 @@ |
|||
package com.epmet.feign.fallback; |
|||
|
|||
import com.epmet.commons.tools.constant.ServiceConstant; |
|||
import com.epmet.commons.tools.utils.ModuleUtils; |
|||
import com.epmet.commons.tools.utils.Result; |
|||
import com.epmet.feign.ResiGroupFeignClient; |
|||
import com.epmet.resi.group.dto.comment.form.ResiQueryCommentFormDTO; |
|||
import com.epmet.resi.group.dto.comment.result.ResiCommentResultDTO; |
|||
import com.epmet.resi.group.dto.group.form.GovGroupSummarizeFromDTO; |
|||
import com.epmet.resi.group.dto.group.form.GroupAuditedFromDTO; |
|||
import com.epmet.resi.group.dto.group.result.GovGroupSummarizeResultDTO; |
|||
import com.epmet.resi.group.dto.group.form.*; |
|||
import com.epmet.resi.group.dto.group.result.ApplyingGroupDetailResultDTO; |
|||
import com.epmet.resi.group.dto.group.result.ApplyingGroupResultDTO; |
|||
import com.epmet.resi.group.dto.group.result.GroupAuditedResultDTO; |
|||
import com.epmet.resi.group.dto.group.result.GroupsInGridResultDTO; |
|||
import com.epmet.resi.group.dto.topic.form.ResiTopicDetailFormDTO; |
|||
import com.epmet.resi.group.dto.topic.form.ResiTopicPageFormDTO; |
|||
import com.epmet.resi.group.dto.topic.result.ResiTopicDetailResultDTO; |
|||
import com.epmet.resi.group.dto.topic.result.ResiTopicInfoResultDTO; |
|||
import org.springframework.stereotype.Component; |
|||
|
|||
import java.util.List; |
|||
|
|||
/** |
|||
* @author zhaoqifeng |
|||
* @dscription |
|||
* @date 2020/4/17 15:27 |
|||
*/ |
|||
@Component |
|||
public class ResiGroupFeignClientFallBack implements ResiGroupFeignClient { |
|||
@Override |
|||
public Result<List<GroupAuditedResultDTO>> audited(GroupAuditedFromDTO formDTO) { |
|||
return ModuleUtils.feignConError(ServiceConstant.RESI_GROUP_SERVER, "audited", formDTO); |
|||
} |
|||
|
|||
@Override |
|||
public Result<List<GroupsInGridResultDTO>> getGroupsInGrid(GroupAuditedFromDTO formDTO) { |
|||
return ModuleUtils.feignConError(ServiceConstant.RESI_GROUP_SERVER, "getGroupsInGrid", formDTO); |
|||
} |
|||
|
|||
@Override |
|||
public Result<GovGroupSummarizeResultDTO> getGovGroupSummarize(GovGroupSummarizeFromDTO formDTO) { |
|||
return ModuleUtils.feignConError(ServiceConstant.RESI_GROUP_SERVER, "getGovGroupSummarize", formDTO); |
|||
} |
|||
|
|||
/** |
|||
* @Description 得到小组待审核列表,用户信息不注入TokenDTO,通过外部服务调用直接传入参数 |
|||
* @Param ApplyingGroupsFormDTO.class |
|||
* @return Result<List<ApplyingGroupResultDTO>> |
|||
* @Author wangc |
|||
* @Date 2020.04.20 13:59 |
|||
**/ |
|||
@Override |
|||
public Result<List<ApplyingGroupResultDTO>> getApplyingGroups(ApplyingGroupsFormDTO applyingGroupsFormDTO) { |
|||
return ModuleUtils.feignConError(ServiceConstant.RESI_GROUP_SERVER, "getApplyingGroups", applyingGroupsFormDTO); |
|||
} |
|||
|
|||
/** |
|||
* @Description 得到待审核/未审核小组信息的详情 |
|||
* @Param CommonGroupIdFromDTO -> String groupId |
|||
* @return Result<ApplyingGroupDetailResultDTO> |
|||
* @Author wangc |
|||
* @Date 2020.04.20 14:08 |
|||
**/ |
|||
@Override |
|||
public Result<ApplyingGroupDetailResultDTO> getApplyingGroupDetail(CommonGroupIdFromDTO groupId) { |
|||
return ModuleUtils.feignConError(ServiceConstant.RESI_GROUP_SERVER, "getApplyingGroupDetail", groupId); |
|||
} |
|||
|
|||
/** |
|||
* @Description 建组申请-审核通过 |
|||
* @Param AgreeApplyGroupFormDTO |
|||
* @return Result |
|||
* @Author wangc |
|||
* @Date 2020.04.20 14:25 |
|||
**/ |
|||
@Override |
|||
public Result agreeApplying(AgreeApplyGroupFormDTO agreeApplyGroupFormDTO) { |
|||
return ModuleUtils.feignConError(ServiceConstant.RESI_GROUP_SERVER, "agreeApplying", agreeApplyGroupFormDTO); |
|||
} |
|||
|
|||
/** |
|||
* @Description 建组申请-审核驳回 |
|||
* @Param DisAgreeApplyGroupFormDTO |
|||
* @return Result |
|||
* @Author wangc |
|||
* @Date 2020.04.20 14:26 |
|||
**/ |
|||
@Override |
|||
public Result disagreeApplying(DisAgreeApplyGroupFormDTO disAgreeApplyGroupFormDTO) { |
|||
return ModuleUtils.feignConError(ServiceConstant.RESI_GROUP_SERVER, "disagreeApplying", disAgreeApplyGroupFormDTO); |
|||
} |
|||
|
|||
@Override |
|||
public Result<List<ResiTopicInfoResultDTO>> getHiddenTopicGov(ResiTopicPageFormDTO topicPageFormDTO) { |
|||
return ModuleUtils.feignConError(ServiceConstant.RESI_GROUP_SERVER, "getHiddenTopicGov", topicPageFormDTO); |
|||
} |
|||
|
|||
@Override |
|||
public Result<List<ResiTopicInfoResultDTO>> getPastTopicListGov(ResiTopicPageFormDTO topicPageFormDTO) { |
|||
return ModuleUtils.feignConError(ServiceConstant.RESI_GROUP_SERVER, "getPastTopicListGov", topicPageFormDTO); |
|||
} |
|||
|
|||
@Override |
|||
public Result<ResiTopicDetailResultDTO> getTopicDetailGov(ResiTopicDetailFormDTO topicDetailFormDTO) { |
|||
return ModuleUtils.feignConError(ServiceConstant.RESI_GROUP_SERVER, "getTopicDetailGov", topicDetailFormDTO); |
|||
} |
|||
|
|||
@Override |
|||
public Result<List<ResiCommentResultDTO>> getCommentListOfTopicGov(ResiQueryCommentFormDTO queryCommentFormDTO) { |
|||
return ModuleUtils.feignConError(ServiceConstant.RESI_GROUP_SERVER, "getCommentListOfTopicGov", queryCommentFormDTO); |
|||
} |
|||
} |
@ -0,0 +1,60 @@ |
|||
package com.epmet.feign.fallback; |
|||
|
|||
import com.epmet.commons.tools.constant.ServiceConstant; |
|||
import com.epmet.commons.tools.utils.ModuleUtils; |
|||
import com.epmet.commons.tools.utils.Result; |
|||
import com.epmet.feign.ResiPartymemberFeignClient; |
|||
import com.epmet.resi.partymember.dto.partymember.form.ReviewedParyMemberFormDTO; |
|||
import com.epmet.resi.partymember.dto.partymember.form.UnderReviewParyMemberFormDTO; |
|||
import com.epmet.resi.partymember.dto.partymember.result.ReviewedParyMemberResultDTO; |
|||
import com.epmet.resi.partymember.dto.partymember.result.UnderReviewParyMemberResultDTO; |
|||
import com.epmet.resi.partymember.dto.warmhearted.form.*; |
|||
import com.epmet.resi.partymember.dto.warmhearted.result.ResiWarmAuditResultDTO; |
|||
import com.epmet.resi.partymember.dto.warmhearted.result.ResiWarmheartedAuditedResultDTO; |
|||
import org.springframework.stereotype.Component; |
|||
|
|||
import java.util.List; |
|||
|
|||
/** |
|||
* @author zhaoqifeng |
|||
* @dscription |
|||
* @date 2020/4/16 17:01 |
|||
*/ |
|||
@Component |
|||
public class ResiPartymemberFeignClientFallBack implements ResiPartymemberFeignClient { |
|||
@Override |
|||
public Result<List<ResiWarmheartedAuditedResultDTO>> audited(ResiWarmheartedAuditedFromDTO formDTO) { |
|||
return ModuleUtils.feignConError(ServiceConstant.RESI_PARTYMEMBER_SERVER, "audited", formDTO); |
|||
} |
|||
|
|||
@Override |
|||
public Result<List<ResiWarmAuditResultDTO>> auditing(ResiWarmAuditFormDTO formDTO) { |
|||
return ModuleUtils.feignConError(ServiceConstant.RESI_PARTYMEMBER_SERVER, "auditing", formDTO); |
|||
} |
|||
|
|||
@Override |
|||
public Result approve(ResiWarmAuditApproveFormDTO formDTO) { |
|||
return ModuleUtils.feignConError(ServiceConstant.RESI_PARTYMEMBER_SERVER, "approve", formDTO); |
|||
} |
|||
|
|||
@Override |
|||
public Result reject(ResiWarmAuditRejectFormDTO formDTO) { |
|||
return ModuleUtils.feignConError(ServiceConstant.RESI_PARTYMEMBER_SERVER, "reject", formDTO); |
|||
} |
|||
|
|||
@Override |
|||
public Result<ResiWarmAuditResultDTO> getDetail(ResiWarmGetDetailFormDTO formDTO) { |
|||
return ModuleUtils.feignConError(ServiceConstant.RESI_PARTYMEMBER_SERVER, "getDetail", formDTO); |
|||
} |
|||
|
|||
@Override |
|||
public Result<List<UnderReviewParyMemberResultDTO>> auditingPartyMember(UnderReviewParyMemberFormDTO underReviewParyMemberFormDTO) { |
|||
return ModuleUtils.feignConError(ServiceConstant.RESI_PARTYMEMBER_SERVER, "auditing", underReviewParyMemberFormDTO); |
|||
} |
|||
|
|||
@Override |
|||
public Result<List<ReviewedParyMemberResultDTO>> auditedPartyMember(ReviewedParyMemberFormDTO reviewedParyMemberFormDTO) { |
|||
return ModuleUtils.feignConError(ServiceConstant.RESI_PARTYMEMBER_SERVER, "audited", reviewedParyMemberFormDTO); |
|||
} |
|||
|
|||
} |
@ -0,0 +1,81 @@ |
|||
package com.epmet.service; |
|||
|
|||
import com.epmet.commons.tools.utils.Result; |
|||
import com.epmet.resi.group.dto.group.form.GovGroupSummarizeFromDTO; |
|||
import com.epmet.resi.group.dto.group.form.GroupAuditedFromDTO; |
|||
import com.epmet.resi.group.dto.group.result.GovGroupSummarizeResultDTO; |
|||
import com.epmet.resi.group.dto.group.form.*; |
|||
import com.epmet.resi.group.dto.group.result.ApplyingGroupDetailResultDTO; |
|||
import com.epmet.resi.group.dto.group.result.ApplyingGroupResultDTO; |
|||
import com.epmet.resi.group.dto.group.result.GroupAuditedResultDTO; |
|||
import com.epmet.resi.group.dto.group.result.GroupsInGridResultDTO; |
|||
|
|||
import java.util.List; |
|||
|
|||
/** |
|||
* @Description |
|||
* @IntefaceName ResiGroupService |
|||
* @Author wangc |
|||
* @date 2020.04.16 15:40 |
|||
*/ |
|||
public interface ResiGroupService { |
|||
/** |
|||
* 小组审核历史列表 |
|||
* @param formDTO 参数 |
|||
* @return Result<List<GroupAuditedResultDTO>> |
|||
*/ |
|||
Result<List<GroupAuditedResultDTO>> audited(GroupAuditedFromDTO formDTO); |
|||
|
|||
/** |
|||
* 本网格小组列表 |
|||
* |
|||
* @param formDTO 参数 |
|||
* @return Result<List<GroupsInGridResultDTO>> |
|||
*/ |
|||
Result<List<GroupsInGridResultDTO>> getGroupsInGrid(GroupAuditedFromDTO formDTO); |
|||
|
|||
/** |
|||
* 小组管理界面信息 |
|||
* |
|||
* @param formDTO 参数 |
|||
* @return Result<GovGroupSummarizeResultDTO> |
|||
*/ |
|||
Result<GovGroupSummarizeResultDTO> getGroupSummarize(GovGroupSummarizeFromDTO formDTO); |
|||
|
|||
/** |
|||
* @Description 查询小组待审核列表-调用resi-group服务 |
|||
* @Param ApplyingGroupsFormDTO.class |
|||
* @return Result<List<ApplyingGroupResultDTO>> |
|||
* @Author wangc |
|||
* @Date 2020.04.20 13:59 |
|||
**/ |
|||
Result<List<ApplyingGroupResultDTO>> auditing(ApplyingGroupsFormDTO applyingGroupsFormDTO); |
|||
|
|||
/** |
|||
* @Description 得到待审核/未审核小组信息的详情-调用resi-group服务 |
|||
* @Param CommonGroupIdFromDTO -> String groupId |
|||
* @return Result<ApplyingGroupDetailResultDTO> |
|||
* @Author wangc |
|||
* @Date 2020.04.20 14:08 |
|||
**/ |
|||
Result<ApplyingGroupDetailResultDTO> applyGroupDetail(CommonGroupIdFromDTO groupIdFromDTO); |
|||
|
|||
/** |
|||
* @Description 建组申请-审核通过-调用resi-group服务 |
|||
* @Param AgreeApplyGroupFormDTO |
|||
* @return Result |
|||
* @Author wangc |
|||
* @Date 2020.04.20 14:25 |
|||
**/ |
|||
Result agreeApplying(AgreeApplyGroupFormDTO agreeApplyGroupFormDTO); |
|||
|
|||
/** |
|||
* @Description 建组申请-审核驳回-调用resi-group服务 |
|||
* @Param DisAgreeApplyGroupFormDTO |
|||
* @return Result |
|||
* @Author wangc |
|||
* @Date 2020.04.20 14:26 |
|||
**/ |
|||
Result disagreeApplying(DisAgreeApplyGroupFormDTO disAgreeApplyGroupFormDTO); |
|||
|
|||
} |
@ -0,0 +1,33 @@ |
|||
package com.epmet.service; |
|||
|
|||
import com.epmet.commons.tools.utils.Result; |
|||
import com.epmet.dto.form.AuditedPartyMemberFormDTO; |
|||
import com.epmet.dto.form.AuditingPartyMemberFormDTO; |
|||
import com.epmet.dto.result.AuditedPartyMemberResultDTO; |
|||
import com.epmet.dto.result.AuditingPartyMemberResultDTO; |
|||
|
|||
import java.util.List; |
|||
|
|||
/** |
|||
* @Description 基层治理-党员认证 |
|||
* @Author yinzuomei |
|||
* @Date 2020/4/26 16:02 |
|||
*/ |
|||
public interface ResiPartyMemberService { |
|||
/** |
|||
* @param formDTO |
|||
* @return com.epmet.commons.tools.utils.Result |
|||
* @Author yinzuomei |
|||
* @Description 待审核列表 |
|||
* @Date 2020/4/26 16:04 |
|||
**/ |
|||
Result<List<AuditingPartyMemberResultDTO>> auditing(AuditingPartyMemberFormDTO formDTO); |
|||
/** |
|||
* @return com.epmet.commons.tools.utils.Result<java.util.List<com.epmet.dto.result.AuditedPartyMemberResultDTO>> |
|||
* @param formDTO |
|||
* @Author yinzuomei |
|||
* @Description 党员认证-审核历史列表(审核历史:只包括自动审核失败和拒绝的审核失败:居民未填写补充信息。) |
|||
* @Date 2020/4/26 23:32 |
|||
**/ |
|||
Result<List<AuditedPartyMemberResultDTO>> audited(AuditedPartyMemberFormDTO formDTO); |
|||
} |
@ -0,0 +1,57 @@ |
|||
package com.epmet.service; |
|||
|
|||
import com.epmet.commons.tools.utils.Result; |
|||
import com.epmet.resi.group.dto.comment.form.ResiQueryCommentFormDTO; |
|||
import com.epmet.resi.group.dto.comment.result.ResiCommentResultDTO; |
|||
import com.epmet.resi.group.dto.topic.form.ResiTopicDetailFormDTO; |
|||
import com.epmet.resi.group.dto.topic.form.ResiTopicPageFormDTO; |
|||
import com.epmet.resi.group.dto.topic.result.ResiTopicDetailResultDTO; |
|||
import com.epmet.resi.group.dto.topic.result.ResiTopicInfoResultDTO; |
|||
import org.springframework.web.bind.annotation.PostMapping; |
|||
|
|||
import java.util.List; |
|||
|
|||
public interface ResiTopicService { |
|||
|
|||
/** |
|||
* @Description 政府端群组管理-屏蔽话题列表查询 |
|||
* @Param tokenDto |
|||
* @Param ResiTopicPageFormDTO.class |
|||
* @return List<ResiTopicInfoResultDTO> |
|||
* @Author wangc |
|||
* @Date 2020.04.01 16:45 |
|||
**/ |
|||
Result<List<ResiTopicInfoResultDTO>> hiddenList(ResiTopicPageFormDTO topicPageFormDTO); |
|||
|
|||
/** |
|||
* @Description 政府端群组管理-查看历史话题(分页,允许状态筛选) |
|||
* @Param tokenDto |
|||
* @Param ResiTopicPageFormDTO.class |
|||
* @return Result<List<ResiTopicInfoResultDTO>> |
|||
* @Author wangc |
|||
* @Date 2020.04.01 10:36 |
|||
**/ |
|||
Result<List<ResiTopicInfoResultDTO>> allTopics(ResiTopicPageFormDTO topicPageFormDTO); |
|||
|
|||
/** |
|||
* @Description 政府端群组管理-获取话题详情 |
|||
* @Param tokenDto |
|||
* @Param String |
|||
* @return Result<ResiTopicDetailResultDTO> |
|||
* @Author wangc |
|||
* @Date 2020.04.01 23:48 |
|||
**/ |
|||
Result<ResiTopicDetailResultDTO> topicDetail(ResiTopicDetailFormDTO topicDetailFormDTO); |
|||
|
|||
/** |
|||
* @Description 政府端群组管理-获取某个话题的评论列表 |
|||
* @Param tokenDto |
|||
* @Param ResiQueryCommentFormDTO |
|||
* @return Result<List<ResiCommentResultDTO>> |
|||
* @Author wangc |
|||
* @Date 2020.04.01 23:49 |
|||
**/ |
|||
Result<List<ResiCommentResultDTO>> topicComments(ResiQueryCommentFormDTO queryCommentFormDTO); |
|||
|
|||
|
|||
} |
@ -0,0 +1,61 @@ |
|||
package com.epmet.service; |
|||
|
|||
import com.epmet.commons.tools.utils.Result; |
|||
import com.epmet.resi.partymember.dto.warmhearted.form.*; |
|||
import com.epmet.resi.partymember.dto.warmhearted.result.ResiWarmAuditResultDTO; |
|||
import com.epmet.resi.partymember.dto.warmhearted.result.ResiWarmheartedAuditedResultDTO; |
|||
import org.springframework.stereotype.Service; |
|||
|
|||
import java.util.List; |
|||
|
|||
/** |
|||
* @Description |
|||
* @IntefaceName ResiWarmheartedService |
|||
* @Author wangc |
|||
* @date 2020.04.16 15:37 |
|||
*/ |
|||
@Service |
|||
public interface ResiWarmheartedService { |
|||
/** |
|||
* 热心居民审核历史列表 |
|||
* @param formDTO 参数 |
|||
* @return ResiWarmheartedAuditedResultDTO |
|||
*/ |
|||
Result<List<ResiWarmheartedAuditedResultDTO>> audited(ResiWarmheartedAuditedFromDTO formDTO); |
|||
|
|||
/** |
|||
* 政府端-获取待审核的热心居民申请列表 |
|||
* |
|||
* @param |
|||
* @return void |
|||
* @author sun |
|||
*/ |
|||
Result<List<ResiWarmAuditResultDTO>> auditing(ResiWarmAuditFormDTO formDTO); |
|||
|
|||
/** |
|||
* 政府端-热心居民申请-审核通过 |
|||
* |
|||
* @param |
|||
* @return void |
|||
* @author sun |
|||
*/ |
|||
Result approve(ResiWarmAuditApproveFormDTO formDTO); |
|||
|
|||
/** |
|||
* 政府端-热心居民申请-审核驳回 |
|||
* |
|||
* @param |
|||
* @return void |
|||
* @author sun |
|||
*/ |
|||
Result reject(ResiWarmAuditRejectFormDTO formDTO); |
|||
|
|||
/** |
|||
* 政府端-热心居民申请详情信息 |
|||
* |
|||
* @param |
|||
* @return void |
|||
* @author sun |
|||
*/ |
|||
Result<ResiWarmAuditResultDTO> getDetail(ResiWarmGetDetailFormDTO formDTO); |
|||
} |
@ -0,0 +1,65 @@ |
|||
package com.epmet.service.impl; |
|||
|
|||
import com.epmet.commons.tools.utils.Result; |
|||
import com.epmet.feign.ResiGroupFeignClient; |
|||
import com.epmet.resi.group.dto.group.form.GovGroupSummarizeFromDTO; |
|||
import com.epmet.resi.group.dto.group.form.GroupAuditedFromDTO; |
|||
import com.epmet.resi.group.dto.group.result.GovGroupSummarizeResultDTO; |
|||
import com.epmet.resi.group.dto.group.form.*; |
|||
import com.epmet.resi.group.dto.group.result.ApplyingGroupDetailResultDTO; |
|||
import com.epmet.resi.group.dto.group.result.ApplyingGroupResultDTO; |
|||
import com.epmet.resi.group.dto.group.result.GroupAuditedResultDTO; |
|||
import com.epmet.resi.group.dto.group.result.GroupsInGridResultDTO; |
|||
import com.epmet.service.ResiGroupService; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.stereotype.Service; |
|||
|
|||
import java.util.List; |
|||
|
|||
/** |
|||
* @Description |
|||
* @ClassName ResiGroupServiceImpl |
|||
* @Author wangc |
|||
* @date 2020.04.16 15:38 |
|||
*/ |
|||
@Service |
|||
public class ResiGroupServiceImpl implements ResiGroupService{ |
|||
@Autowired |
|||
private ResiGroupFeignClient resiGroupFeignClient; |
|||
@Override |
|||
public Result<List<GroupAuditedResultDTO>> audited(GroupAuditedFromDTO formDTO) { |
|||
return resiGroupFeignClient.audited(formDTO); |
|||
} |
|||
|
|||
@Override |
|||
public Result<List<GroupsInGridResultDTO>> getGroupsInGrid(GroupAuditedFromDTO formDTO) { |
|||
return resiGroupFeignClient.getGroupsInGrid(formDTO); |
|||
} |
|||
|
|||
@Override |
|||
public Result<GovGroupSummarizeResultDTO> getGroupSummarize(GovGroupSummarizeFromDTO formDTO) { |
|||
return resiGroupFeignClient.getGovGroupSummarize(formDTO); |
|||
} |
|||
|
|||
@Override |
|||
public Result<List<ApplyingGroupResultDTO>> auditing(ApplyingGroupsFormDTO applyingGroupsFormDTO) { |
|||
return resiGroupFeignClient.getApplyingGroups(applyingGroupsFormDTO); |
|||
} |
|||
|
|||
@Override |
|||
public Result<ApplyingGroupDetailResultDTO> applyGroupDetail(CommonGroupIdFromDTO groupIdFromDTO) { |
|||
return resiGroupFeignClient.getApplyingGroupDetail(groupIdFromDTO); |
|||
} |
|||
|
|||
@Override |
|||
public Result agreeApplying(AgreeApplyGroupFormDTO agreeApplyGroupFormDTO) { |
|||
return resiGroupFeignClient.agreeApplying(agreeApplyGroupFormDTO); |
|||
} |
|||
|
|||
@Override |
|||
public Result disagreeApplying(DisAgreeApplyGroupFormDTO disAgreeApplyGroupFormDTO) { |
|||
return resiGroupFeignClient.disagreeApplying(disAgreeApplyGroupFormDTO); |
|||
} |
|||
|
|||
|
|||
} |
@ -0,0 +1,70 @@ |
|||
package com.epmet.service.impl; |
|||
|
|||
import com.epmet.commons.tools.exception.EpmetErrorCode; |
|||
import com.epmet.commons.tools.exception.RenException; |
|||
import com.epmet.commons.tools.utils.ConvertUtils; |
|||
import com.epmet.commons.tools.utils.Result; |
|||
import com.epmet.dto.form.AuditedPartyMemberFormDTO; |
|||
import com.epmet.dto.form.AuditingPartyMemberFormDTO; |
|||
import com.epmet.dto.result.AuditedPartyMemberResultDTO; |
|||
import com.epmet.dto.result.AuditingPartyMemberResultDTO; |
|||
import com.epmet.feign.ResiPartymemberFeignClient; |
|||
import com.epmet.resi.partymember.dto.partymember.form.ReviewedParyMemberFormDTO; |
|||
import com.epmet.resi.partymember.dto.partymember.form.UnderReviewParyMemberFormDTO; |
|||
import com.epmet.resi.partymember.dto.partymember.result.ReviewedParyMemberResultDTO; |
|||
import com.epmet.resi.partymember.dto.partymember.result.UnderReviewParyMemberResultDTO; |
|||
import com.epmet.service.ResiPartyMemberService; |
|||
import org.slf4j.Logger; |
|||
import org.slf4j.LoggerFactory; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.stereotype.Service; |
|||
|
|||
import java.util.ArrayList; |
|||
import java.util.List; |
|||
|
|||
/** |
|||
* @Description 基层治理-党员认证 |
|||
* @Author yinzuomei |
|||
* @Date 2020/4/26 16:02 |
|||
*/ |
|||
@Service |
|||
public class ResiPartyMemberServiceImpl implements ResiPartyMemberService { |
|||
protected final Logger logger = LoggerFactory.getLogger(getClass()); |
|||
@Autowired |
|||
private ResiPartymemberFeignClient resiPartymemberFeignClient; |
|||
|
|||
@Override |
|||
public Result<List<AuditingPartyMemberResultDTO>> auditing(AuditingPartyMemberFormDTO formDTO) { |
|||
UnderReviewParyMemberFormDTO underReviewParyMemberFormDTO = ConvertUtils.sourceToTarget(formDTO, UnderReviewParyMemberFormDTO.class); |
|||
List<AuditingPartyMemberResultDTO> list = new ArrayList<>(); |
|||
Result<List<UnderReviewParyMemberResultDTO>> result = resiPartymemberFeignClient.auditingPartyMember(underReviewParyMemberFormDTO); |
|||
if (!result.success()) { |
|||
logger.error(String.format("调用resi-partymember-server模块失败,错误提示%s", result.getMsg())); |
|||
throw new RenException(EpmetErrorCode.SERVER_ERROR.getCode()); |
|||
} |
|||
if (null == result.getData() || result.getData().isEmpty()) { |
|||
logger.info(String.format("网格id[%s],待审核党员列表查询为空", formDTO.getGridId())); |
|||
return new Result<List<AuditingPartyMemberResultDTO>>().ok(list); |
|||
} |
|||
list = ConvertUtils.sourceToTarget(result.getData(), AuditingPartyMemberResultDTO.class); |
|||
return new Result<List<AuditingPartyMemberResultDTO>>().ok(list); |
|||
} |
|||
|
|||
@Override |
|||
public Result<List<AuditedPartyMemberResultDTO>> audited(AuditedPartyMemberFormDTO formDTO) { |
|||
ReviewedParyMemberFormDTO reviewedParyMemberFormDTO = ConvertUtils.sourceToTarget(formDTO, ReviewedParyMemberFormDTO.class); |
|||
List<AuditedPartyMemberResultDTO> list = new ArrayList<>(); |
|||
Result<List<ReviewedParyMemberResultDTO>> result = resiPartymemberFeignClient.auditedPartyMember(reviewedParyMemberFormDTO); |
|||
if (!result.success()) { |
|||
logger.error(String.format("调用resi-partymember-server模块失败,错误提示%s", result.getMsg())); |
|||
throw new RenException(EpmetErrorCode.SERVER_ERROR.getCode()); |
|||
} |
|||
if (null == result.getData() || result.getData().isEmpty()) { |
|||
logger.info(String.format("网格id[%s],待审核党员列表查询为空", formDTO.getGridId())); |
|||
return new Result<List<AuditedPartyMemberResultDTO>>().ok(list); |
|||
} |
|||
list = ConvertUtils.sourceToTarget(result.getData(), AuditedPartyMemberResultDTO.class); |
|||
return new Result<List<AuditedPartyMemberResultDTO>>().ok(list); |
|||
} |
|||
} |
|||
|
@ -0,0 +1,79 @@ |
|||
package com.epmet.service.impl; |
|||
|
|||
import com.epmet.commons.tools.constant.NumConstant; |
|||
import com.epmet.commons.tools.utils.Result; |
|||
import com.epmet.feign.ResiGroupFeignClient; |
|||
import com.epmet.resi.group.dto.comment.form.ResiQueryCommentFormDTO; |
|||
import com.epmet.resi.group.dto.comment.result.ResiCommentResultDTO; |
|||
import com.epmet.resi.group.dto.topic.form.ResiTopicDetailFormDTO; |
|||
import com.epmet.resi.group.dto.topic.form.ResiTopicPageFormDTO; |
|||
import com.epmet.resi.group.dto.topic.result.ResiTopicDetailResultDTO; |
|||
import com.epmet.resi.group.dto.topic.result.ResiTopicInfoResultDTO; |
|||
import com.epmet.service.ResiTopicService; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.stereotype.Service; |
|||
|
|||
import java.util.List; |
|||
|
|||
@Service |
|||
public class ResiTopicServiceImpl implements ResiTopicService { |
|||
|
|||
@Autowired |
|||
private ResiGroupFeignClient resiGroupFeignClient; |
|||
|
|||
/** |
|||
* @Description 政府端群组管理-屏蔽话题列表查询 |
|||
* @Param tokenDto |
|||
* @Param ResiTopicPageFormDTO.class |
|||
* @return List<ResiTopicInfoResultDTO> |
|||
* @Author wangc |
|||
* @Date 2020.04.01 16:45 |
|||
**/ |
|||
@Override |
|||
public Result<List<ResiTopicInfoResultDTO>> hiddenList(ResiTopicPageFormDTO topicPageFormDTO) { |
|||
topicPageFormDTO.setPageNo(NumConstant.ONE); |
|||
topicPageFormDTO.setPageSize(NumConstant.MAX); |
|||
return resiGroupFeignClient.getHiddenTopicGov(topicPageFormDTO); |
|||
} |
|||
|
|||
/** |
|||
* @Description 政府端群组管理-查看历史话题(分页,允许状态筛选) |
|||
* @Param tokenDto |
|||
* @Param ResiTopicPageFormDTO.class |
|||
* @return Result<List<ResiTopicInfoResultDTO>> |
|||
* @Author wangc |
|||
* @Date 2020.04.01 10:36 |
|||
**/ |
|||
@Override |
|||
public Result<List<ResiTopicInfoResultDTO>> allTopics(ResiTopicPageFormDTO topicPageFormDTO) { |
|||
topicPageFormDTO.setPageNo(NumConstant.ONE); |
|||
topicPageFormDTO.setPageSize(NumConstant.MAX); |
|||
return resiGroupFeignClient.getPastTopicListGov(topicPageFormDTO); |
|||
} |
|||
|
|||
/** |
|||
* @Description 政府端群组管理-获取话题详情 |
|||
* @Param tokenDto |
|||
* @Param String |
|||
* @return Result<ResiTopicDetailResultDTO> |
|||
* @Author wangc |
|||
* @Date 2020.04.01 23:48 |
|||
**/ |
|||
@Override |
|||
public Result<ResiTopicDetailResultDTO> topicDetail(ResiTopicDetailFormDTO topicDetailFormDTO) { |
|||
return resiGroupFeignClient.getTopicDetailGov(topicDetailFormDTO); |
|||
} |
|||
|
|||
/** |
|||
* @Description 政府端群组管理-获取某个话题的评论列表 |
|||
* @Param tokenDto |
|||
* @Param ResiQueryCommentFormDTO |
|||
* @return Result<List<ResiCommentResultDTO>> |
|||
* @Author wangc |
|||
* @Date 2020.04.01 23:49 |
|||
**/ |
|||
@Override |
|||
public Result<List<ResiCommentResultDTO>> topicComments(ResiQueryCommentFormDTO queryCommentFormDTO) { |
|||
return resiGroupFeignClient.getCommentListOfTopicGov(queryCommentFormDTO); |
|||
} |
|||
} |
@ -0,0 +1,78 @@ |
|||
package com.epmet.service.impl; |
|||
|
|||
import com.epmet.commons.tools.utils.Result; |
|||
import com.epmet.feign.ResiPartymemberFeignClient; |
|||
import com.epmet.resi.partymember.dto.warmhearted.form.*; |
|||
import com.epmet.resi.partymember.dto.warmhearted.result.ResiWarmAuditResultDTO; |
|||
import com.epmet.resi.partymember.dto.warmhearted.result.ResiWarmheartedAuditedResultDTO; |
|||
import com.epmet.service.ResiWarmheartedService; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.stereotype.Service; |
|||
|
|||
import java.util.List; |
|||
|
|||
/** |
|||
* @Description |
|||
* @ClassName ResiWarmheartedServiceImpl |
|||
* @Author wangc |
|||
* @date 2020.04.16 15:41 |
|||
*/ |
|||
@Service |
|||
public class ResiWarmheartedServiceImpl implements ResiWarmheartedService { |
|||
@Autowired |
|||
private ResiPartymemberFeignClient resiPartymemberFeignClient; |
|||
|
|||
@Override |
|||
public Result<List<ResiWarmheartedAuditedResultDTO>> audited(ResiWarmheartedAuditedFromDTO formDTO) { |
|||
return resiPartymemberFeignClient.audited(formDTO); |
|||
} |
|||
|
|||
/** |
|||
* 政府端-获取待审核的热心居民申请列表 |
|||
* |
|||
* @param |
|||
* @return void |
|||
* @author sun |
|||
*/ |
|||
@Override |
|||
public Result<List<ResiWarmAuditResultDTO>> auditing(ResiWarmAuditFormDTO formDTO) { |
|||
return resiPartymemberFeignClient.auditing(formDTO); |
|||
} |
|||
|
|||
/** |
|||
* 政府端-热心居民申请-审核通过 |
|||
* |
|||
* @param |
|||
* @return void |
|||
* @author sun |
|||
*/ |
|||
@Override |
|||
public Result approve(ResiWarmAuditApproveFormDTO formDTO) { |
|||
return resiPartymemberFeignClient.approve(formDTO); |
|||
} |
|||
|
|||
/** |
|||
* 政府端-热心居民申请-审核驳回 |
|||
* |
|||
* @param |
|||
* @return void |
|||
* @author sun |
|||
*/ |
|||
@Override |
|||
public Result reject(ResiWarmAuditRejectFormDTO formDTO) { |
|||
return resiPartymemberFeignClient.reject(formDTO); |
|||
} |
|||
|
|||
/** |
|||
* 政府端-热心居民申请详情信息 |
|||
* |
|||
* @param |
|||
* @return void |
|||
* @author sun |
|||
*/ |
|||
@Override |
|||
public Result<ResiWarmAuditResultDTO> getDetail(ResiWarmGetDetailFormDTO formDTO) { |
|||
return resiPartymemberFeignClient.getDetail(formDTO); |
|||
} |
|||
|
|||
} |
@ -0,0 +1,10 @@ |
|||
package com.epmet.util; |
|||
|
|||
/** |
|||
* @Description 网格管理模块常量类 |
|||
* @IntefaceName ModuleConstant |
|||
* @Author wangc |
|||
* @date 2020.04.16 15:42 |
|||
*/ |
|||
public interface ModuleConstant { |
|||
} |
@ -0,0 +1,71 @@ |
|||
server: |
|||
port: @server.port@ |
|||
servlet: |
|||
context-path: /gov/grid |
|||
|
|||
spring: |
|||
main: |
|||
allow-bean-definition-overriding: true |
|||
application: |
|||
name: gov-grid-server |
|||
#环境 dev|test|prod |
|||
profiles: |
|||
active: dev |
|||
messages: |
|||
encoding: UTF-8 |
|||
basename: i18n/messages_common |
|||
jackson: |
|||
time-zone: GMT+8 |
|||
date-format: yyyy-MM-dd HH:mm:ss |
|||
redis: |
|||
database: @spring.redis.index@ |
|||
host: @spring.redis.host@ |
|||
port: @spring.redis.port@ |
|||
password: @spring.redis.password@ |
|||
timeout: 30s |
|||
cloud: |
|||
nacos: |
|||
discovery: |
|||
server-addr: @nacos.server-addr@ |
|||
#nacos的命名空间ID,默认是public |
|||
namespace: @nacos.discovery.namespace@ |
|||
#不把自己注册到注册中心的地址 |
|||
register-enabled: @nacos.register-enabled@ |
|||
ip: @nacos.ip@ |
|||
config: |
|||
enabled: @nacos.config-enabled@ |
|||
server-addr: @nacos.server-addr@ |
|||
namespace: @nacos.config.namespace@ |
|||
group: @nacos.config.group@ |
|||
file-extension: yaml |
|||
management: |
|||
endpoints: |
|||
web: |
|||
exposure: |
|||
include: "*" |
|||
endpoint: |
|||
health: |
|||
show-details: ALWAYS |
|||
|
|||
|
|||
feign: |
|||
hystrix: |
|||
enabled: true |
|||
client: |
|||
config: |
|||
default: |
|||
loggerLevel: BASIC |
|||
httpclient: |
|||
enabled: true |
|||
|
|||
hystrix: |
|||
command: |
|||
default: |
|||
execution: |
|||
isolation: |
|||
thread: |
|||
timeoutInMilliseconds: 60000 #缺省为1000 |
|||
|
|||
ribbon: |
|||
ReadTimeout: 300000 |
|||
ConnectTimeout: 300000 |
@ -0,0 +1,159 @@ |
|||
<?xml version="1.0" encoding="UTF-8"?> |
|||
<configuration> |
|||
<include resource="org/springframework/boot/logging/logback/base.xml"/> |
|||
|
|||
<property name="log.path" value="logs/gov-grid"/> |
|||
|
|||
<!-- 彩色日志格式 --> |
|||
<property name="CONSOLE_LOG_PATTERN" |
|||
value="${CONSOLE_LOG_PATTERN:-%clr(%d{yyyy-MM-dd HH:mm:ss.SSS}){faint} %clr(${LOG_LEVEL_PATTERN:-%5p}) %clr(${PID:- }){magenta} %clr(---){faint} %clr([%15.15t]){faint} %clr(%-40.40logger{39}){cyan} %clr(:){faint} %m%n${LOG_EXCEPTION_CONVERSION_WORD:-%wEx}}"/> |
|||
|
|||
<!--1. 输出到控制台--> |
|||
<appender name="CONSOLE" class="ch.qos.logback.core.ConsoleAppender"> |
|||
<!--此日志appender是为开发使用,只配置最底级别,控制台输出的日志级别是大于或等于此级别的日志信息--> |
|||
<filter class="ch.qos.logback.classic.filter.ThresholdFilter"> |
|||
<level>debug</level> |
|||
</filter> |
|||
<encoder> |
|||
<Pattern>${CONSOLE_LOG_PATTERN}</Pattern> |
|||
<!-- 设置字符集 --> |
|||
<charset>UTF-8</charset> |
|||
</encoder> |
|||
</appender> |
|||
|
|||
<!--2. 输出到文档--> |
|||
<!-- 2.1 level为 DEBUG 日志,时间滚动输出 --> |
|||
<appender name="DEBUG_FILE" class="ch.qos.logback.core.rolling.RollingFileAppender"> |
|||
<!-- 正在记录的日志文档的路径及文档名 --> |
|||
<file>${log.path}/debug.log</file> |
|||
<!--日志文档输出格式--> |
|||
<encoder> |
|||
<pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50} - %msg%n</pattern> |
|||
<charset>UTF-8</charset> <!-- 设置字符集 --> |
|||
</encoder> |
|||
<!-- 日志记录器的滚动策略,按日期,按大小记录 --> |
|||
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> |
|||
<!-- 日志归档 --> |
|||
<fileNamePattern>${log.path}/debug-%d{yyyy-MM-dd}.%i.log</fileNamePattern> |
|||
<timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP"> |
|||
<maxFileSize>100MB</maxFileSize> |
|||
</timeBasedFileNamingAndTriggeringPolicy> |
|||
<!--日志文档保留天数--> |
|||
<maxHistory>15</maxHistory> |
|||
</rollingPolicy> |
|||
<!-- 此日志文档只记录debug级别的 --> |
|||
<filter class="ch.qos.logback.classic.filter.LevelFilter"> |
|||
<level>debug</level> |
|||
<onMatch>ACCEPT</onMatch> |
|||
<onMismatch>DENY</onMismatch> |
|||
</filter> |
|||
</appender> |
|||
|
|||
<!-- 2.2 level为 INFO 日志,时间滚动输出 --> |
|||
<appender name="INFO_FILE" class="ch.qos.logback.core.rolling.RollingFileAppender"> |
|||
<!-- 正在记录的日志文档的路径及文档名 --> |
|||
<file>${log.path}/info.log</file> |
|||
<!--日志文档输出格式--> |
|||
<encoder> |
|||
<pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50} - %msg%n</pattern> |
|||
<charset>UTF-8</charset> |
|||
</encoder> |
|||
<!-- 日志记录器的滚动策略,按日期,按大小记录 --> |
|||
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> |
|||
<!-- 每天日志归档路径以及格式 --> |
|||
<fileNamePattern>${log.path}/info-%d{yyyy-MM-dd}.%i.log</fileNamePattern> |
|||
<timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP"> |
|||
<maxFileSize>100MB</maxFileSize> |
|||
</timeBasedFileNamingAndTriggeringPolicy> |
|||
<!--日志文档保留天数--> |
|||
<maxHistory>15</maxHistory> |
|||
</rollingPolicy> |
|||
<!-- 此日志文档只记录info级别的 --> |
|||
<filter class="ch.qos.logback.classic.filter.LevelFilter"> |
|||
<level>info</level> |
|||
<onMatch>ACCEPT</onMatch> |
|||
<onMismatch>DENY</onMismatch> |
|||
</filter> |
|||
</appender> |
|||
|
|||
<!-- 2.3 level为 WARN 日志,时间滚动输出 --> |
|||
<appender name="WARN_FILE" class="ch.qos.logback.core.rolling.RollingFileAppender"> |
|||
<!-- 正在记录的日志文档的路径及文档名 --> |
|||
<file>${log.path}/warn.log</file> |
|||
<!--日志文档输出格式--> |
|||
<encoder> |
|||
<pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50} - %msg%n</pattern> |
|||
<charset>UTF-8</charset> <!-- 此处设置字符集 --> |
|||
</encoder> |
|||
<!-- 日志记录器的滚动策略,按日期,按大小记录 --> |
|||
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> |
|||
<fileNamePattern>${log.path}/warn-%d{yyyy-MM-dd}.%i.log</fileNamePattern> |
|||
<timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP"> |
|||
<maxFileSize>100MB</maxFileSize> |
|||
</timeBasedFileNamingAndTriggeringPolicy> |
|||
<!--日志文档保留天数--> |
|||
<maxHistory>15</maxHistory> |
|||
</rollingPolicy> |
|||
<!-- 此日志文档只记录warn级别的 --> |
|||
<filter class="ch.qos.logback.classic.filter.LevelFilter"> |
|||
<level>warn</level> |
|||
<onMatch>ACCEPT</onMatch> |
|||
<onMismatch>DENY</onMismatch> |
|||
</filter> |
|||
</appender> |
|||
|
|||
<!-- 2.4 level为 ERROR 日志,时间滚动输出 --> |
|||
<appender name="ERROR_FILE" class="ch.qos.logback.core.rolling.RollingFileAppender"> |
|||
<!-- 正在记录的日志文档的路径及文档名 --> |
|||
<file>${log.path}/error.log</file> |
|||
<!--日志文档输出格式--> |
|||
<encoder> |
|||
<pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50} - %msg%n</pattern> |
|||
<charset>UTF-8</charset> <!-- 此处设置字符集 --> |
|||
</encoder> |
|||
<!-- 日志记录器的滚动策略,按日期,按大小记录 --> |
|||
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> |
|||
<fileNamePattern>${log.path}/error-%d{yyyy-MM-dd}.%i.log</fileNamePattern> |
|||
<timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP"> |
|||
<maxFileSize>100MB</maxFileSize> |
|||
</timeBasedFileNamingAndTriggeringPolicy> |
|||
<!--日志文档保留天数--> |
|||
<maxHistory>15</maxHistory> |
|||
</rollingPolicy> |
|||
<!-- 此日志文档只记录ERROR级别的 --> |
|||
<filter class="ch.qos.logback.classic.filter.LevelFilter"> |
|||
<level>ERROR</level> |
|||
<onMatch>ACCEPT</onMatch> |
|||
<onMismatch>DENY</onMismatch> |
|||
</filter> |
|||
</appender> |
|||
|
|||
<!-- 开发、测试环境 --> |
|||
<springProfile name="dev,test"> |
|||
<logger name="org.springframework.web" level="INFO"/> |
|||
<logger name="org.springboot.sample" level="INFO"/> |
|||
<logger name="com.epmet.dao" level="INFO"/> |
|||
<logger name="com.epmet.dao" level="DEBUG"/> |
|||
<root level="INFO"> |
|||
<appender-ref ref="DEBUG_FILE"/> |
|||
<appender-ref ref="INFO_FILE"/> |
|||
<appender-ref ref="WARN_FILE"/> |
|||
<appender-ref ref="ERROR_FILE"/> |
|||
</root> |
|||
</springProfile> |
|||
|
|||
<!-- 生产环境 --> |
|||
<springProfile name="prod"> |
|||
<logger name="org.springframework.web" level="INFO"/> |
|||
<logger name="org.springboot.sample" level="INFO"/> |
|||
<logger name="com.epmet.dao" level="INFO"/> |
|||
<root level="INFO"> |
|||
<appender-ref ref="CONSOLE"/> |
|||
<appender-ref ref="DEBUG_FILE"/> |
|||
<appender-ref ref="INFO_FILE"/> |
|||
<appender-ref ref="WARN_FILE"/> |
|||
<appender-ref ref="ERROR_FILE"/> |
|||
</root> |
|||
</springProfile> |
|||
|
|||
</configuration> |
@ -0,0 +1,20 @@ |
|||
<?xml version="1.0" encoding="UTF-8"?> |
|||
<project xmlns="http://maven.apache.org/POM/4.0.0" |
|||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
|||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> |
|||
<parent> |
|||
<artifactId>epmet-module</artifactId> |
|||
<groupId>com.epmet</groupId> |
|||
<version>2.0.0</version> |
|||
</parent> |
|||
<modelVersion>4.0.0</modelVersion> |
|||
|
|||
<artifactId>gov-grid</artifactId> |
|||
<packaging>pom</packaging> |
|||
<modules> |
|||
<module>gov-grid-client</module> |
|||
<module>gov-grid-server</module> |
|||
</modules> |
|||
|
|||
|
|||
</project> |
@ -0,0 +1,11 @@ |
|||
FROM java:8 |
|||
|
|||
RUN export LANG="zh_CN.UTF-8" |
|||
RUN ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime |
|||
RUN echo 'Asia/Shanghai' > /etc/timezone |
|||
|
|||
COPY ./target/*.jar ./app.jar |
|||
|
|||
EXPOSE 8098 |
|||
|
|||
ENTRYPOINT ["java","-Xms32m","-Xmx200m","-jar","./app.jar"] |
@ -0,0 +1,15 @@ |
|||
version: "3.7" |
|||
services: |
|||
gov-mine-server: |
|||
container_name: gov-mine-server-dev |
|||
image: registry-vpc.cn-qingdao.aliyuncs.com/epmet-cloud-dev/gov-mine-server:0.3.2 |
|||
ports: |
|||
- "8098:8098" |
|||
network_mode: host # 使用现有网络 |
|||
volumes: |
|||
- "/opt/epmet-cloud-logs/dev:/logs" |
|||
deploy: |
|||
resources: |
|||
limits: |
|||
cpus: '0.1' |
|||
memory: 250M |
Some files were not shown because too many files changed in this diff
Loading…
Reference in new issue