Browse Source
# Conflicts: # epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/exception/EpmetErrorCode.java # epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/feign/GovIssueOpenFeignClient.java # epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/feign/fallback/GovIssueOpenFeignClientFallBack.java # epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/controller/IssueController.java # epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/dao/IssueDao.java # epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/dao/IssueVoteDetailDao.java # epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/IssueService.java # epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueServiceImpl.java # epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueVoteDetailDao.xml # epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/dao/ResiTopicDao.java # epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/service/ResiTopicService.java # epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/service/impl/ResiTopicServiceImpl.java # epmet-module/resi-group/resi-group-server/src/main/resources/mapper/topic/ResiTopicDao.xml # epmet-user/epmet-user-client/src/main/java/com/epmet/feign/EpmetUserOpenFeignClient.java # epmet-user/epmet-user-client/src/main/java/com/epmet/feign/fallback/EpmetUserOpenFeignClientFallback.java # epmet-user/epmet-user-server/pom.xml # epmet-user/epmet-user-server/src/main/resources/bootstrap.ymldev_shibei_match
166 changed files with 3156 additions and 377 deletions
@ -0,0 +1,17 @@ |
|||||
|
package com.epmet.dto.form; |
||||
|
|
||||
|
import lombok.Data; |
||||
|
|
||||
|
import javax.validation.constraints.NotBlank; |
||||
|
import java.util.List; |
||||
|
|
||||
|
@Data |
||||
|
public class AccessConfigAdd4RoletFormDTO { |
||||
|
@NotBlank(message = "角色Key不能为空") |
||||
|
private String roleKey; |
||||
|
|
||||
|
@NotBlank(message = "操作Key不能为空") |
||||
|
private String operationKey; |
||||
|
|
||||
|
private List<String> scopeKeys; |
||||
|
} |
@ -0,0 +1,97 @@ |
|||||
|
/** |
||||
|
* Copyright 2018 人人开源 https://www.renren.io
|
||||
|
* <p> |
||||
|
* This program is free software: you can redistribute it and/or modify |
||||
|
* it under the terms of the GNU General Public License as published by |
||||
|
* the Free Software Foundation, either version 3 of the License, or |
||||
|
* (at your option) any later version. |
||||
|
* <p> |
||||
|
* This program is distributed in the hope that it will be useful, |
||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||
|
* GNU General Public License for more details. |
||||
|
* <p> |
||||
|
* You should have received a copy of the GNU General Public License |
||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
*/ |
||||
|
|
||||
|
package com.epmet.dto; |
||||
|
|
||||
|
import lombok.Data; |
||||
|
|
||||
|
import java.io.Serializable; |
||||
|
import java.util.Date; |
||||
|
|
||||
|
|
||||
|
/** |
||||
|
* 居民端用户对议题建议或意见表 |
||||
|
* |
||||
|
* @author generator generator@elink-cn.com |
||||
|
* @since v1.0.0 2020-11-18 |
||||
|
*/ |
||||
|
@Data |
||||
|
public class IssueSuggestionDTO implements Serializable { |
||||
|
|
||||
|
private static final long serialVersionUID = 1L; |
||||
|
|
||||
|
/** |
||||
|
* 主键 |
||||
|
*/ |
||||
|
private String id; |
||||
|
|
||||
|
/** |
||||
|
* 客户Id customer.id |
||||
|
*/ |
||||
|
private String customerId; |
||||
|
|
||||
|
/** |
||||
|
* 议题id |
||||
|
*/ |
||||
|
private String issueId; |
||||
|
|
||||
|
/** |
||||
|
* 议题所属网格id |
||||
|
*/ |
||||
|
private String gridId; |
||||
|
|
||||
|
/** |
||||
|
* 对议题的想法 |
||||
|
*/ |
||||
|
private String suggestion; |
||||
|
|
||||
|
/** |
||||
|
* 1公开; 0匿名 |
||||
|
*/ |
||||
|
private Integer publicFlag; |
||||
|
|
||||
|
/** |
||||
|
* 删除标识:0 未删除 1已删除 |
||||
|
*/ |
||||
|
private String delFlag; |
||||
|
|
||||
|
/** |
||||
|
* 乐观锁 |
||||
|
*/ |
||||
|
private Integer revision; |
||||
|
|
||||
|
/** |
||||
|
* 提建议的人 |
||||
|
*/ |
||||
|
private String createdBy; |
||||
|
|
||||
|
/** |
||||
|
* 创建时间 |
||||
|
*/ |
||||
|
private Date createdTime; |
||||
|
|
||||
|
/** |
||||
|
* 修改人ID |
||||
|
*/ |
||||
|
private String updatedBy; |
||||
|
|
||||
|
/** |
||||
|
* 修改时间 |
||||
|
*/ |
||||
|
private Date updatedTime; |
||||
|
|
||||
|
} |
@ -0,0 +1,33 @@ |
|||||
|
package com.epmet.dto.form; |
||||
|
|
||||
|
import lombok.Data; |
||||
|
|
||||
|
import javax.validation.constraints.NotBlank; |
||||
|
import java.io.Serializable; |
||||
|
|
||||
|
/** |
||||
|
* 查询用户对于某个议题的想法 返回一条记录 |
||||
|
* |
||||
|
* @author yinzuomei@elink-cn.com |
||||
|
* @date 2020/11/18 10:09 |
||||
|
*/ |
||||
|
@Data |
||||
|
public class UserIssueSuggestionFormDTO implements Serializable { |
||||
|
private static final long serialVersionUID = -8506264833919404944L; |
||||
|
/** |
||||
|
* 用户id |
||||
|
*/ |
||||
|
@NotBlank(message = "userId不能为空") |
||||
|
private String userId; |
||||
|
|
||||
|
/** |
||||
|
* 议题id |
||||
|
*/ |
||||
|
@NotBlank(message = "issueId不能为空") |
||||
|
private String issueId; |
||||
|
|
||||
|
public UserIssueSuggestionFormDTO( String userId, String issueId) { |
||||
|
this.userId = userId; |
||||
|
this.issueId = issueId; |
||||
|
} |
||||
|
} |
@ -0,0 +1,55 @@ |
|||||
|
package com.epmet.dto.result; |
||||
|
|
||||
|
import com.fasterxml.jackson.annotation.JsonIgnore; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
import java.io.Serializable; |
||||
|
|
||||
|
/** |
||||
|
* 议题建议列表 |
||||
|
* |
||||
|
* @author yinzuomei@elink-cn.com |
||||
|
* @date 2020/11/18 14:00 |
||||
|
*/ |
||||
|
@Data |
||||
|
public class IssueSuggestionResDTO implements Serializable { |
||||
|
private static final long serialVersionUID = -6217415454610258644L; |
||||
|
/** |
||||
|
* 建议id |
||||
|
*/ |
||||
|
private String suggestionId; |
||||
|
|
||||
|
/** |
||||
|
* 建议内容 |
||||
|
*/ |
||||
|
private String suggestion; |
||||
|
|
||||
|
/** |
||||
|
* 建议时间戳 |
||||
|
*/ |
||||
|
private Long publishTime; |
||||
|
|
||||
|
/** |
||||
|
* true 公开 false 匿名 |
||||
|
*/ |
||||
|
private Boolean publicFlag; |
||||
|
|
||||
|
/** |
||||
|
* 用户头像url |
||||
|
*/ |
||||
|
private String headPhoto; |
||||
|
|
||||
|
/** |
||||
|
* 用户显示名称 |
||||
|
*/ |
||||
|
private String userShowName; |
||||
|
|
||||
|
/** |
||||
|
* 态度 - opposition(反对)support(赞成) |
||||
|
*/ |
||||
|
private String aititude; |
||||
|
|
||||
|
@JsonIgnore |
||||
|
private String userId; |
||||
|
|
||||
|
} |
@ -0,0 +1,22 @@ |
|||||
|
package com.epmet.dto.result; |
||||
|
|
||||
|
import lombok.Data; |
||||
|
|
||||
|
import java.io.Serializable; |
||||
|
|
||||
|
/** |
||||
|
* 保存居民端用户对议题的建议或意见 返回议题id, 建议id |
||||
|
* |
||||
|
* @author yinzuomei@elink-cn.com |
||||
|
* @date 2020/11/18 13:14 |
||||
|
*/ |
||||
|
@Data |
||||
|
public class SaveIssueSuggestionResultDTO implements Serializable { |
||||
|
private static final long serialVersionUID = 8199657776260756910L; |
||||
|
private String issueId; |
||||
|
/** |
||||
|
* issue_suggestion表主键 |
||||
|
*/ |
||||
|
private String suggestionId; |
||||
|
|
||||
|
} |
@ -0,0 +1,87 @@ |
|||||
|
/** |
||||
|
* 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.controller; |
||||
|
|
||||
|
import com.epmet.commons.tools.utils.Result; |
||||
|
import com.epmet.commons.tools.validator.ValidatorUtils; |
||||
|
import com.epmet.dto.IssueSuggestionDTO; |
||||
|
import com.epmet.dto.form.EvaluationListFormDTO; |
||||
|
import com.epmet.dto.form.UserIssueSuggestionFormDTO; |
||||
|
import com.epmet.dto.result.IssueSuggestionResDTO; |
||||
|
import com.epmet.dto.result.SaveIssueSuggestionResultDTO; |
||||
|
import com.epmet.service.IssueSuggestionService; |
||||
|
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; |
||||
|
|
||||
|
|
||||
|
/** |
||||
|
* 居民端用户对议题建议或意见表 |
||||
|
* |
||||
|
* @author generator generator@elink-cn.com |
||||
|
* @since v1.0.0 2020-11-18 |
||||
|
*/ |
||||
|
@RestController |
||||
|
@RequestMapping("issuesuggestion") |
||||
|
public class IssueSuggestionController { |
||||
|
|
||||
|
@Autowired |
||||
|
private IssueSuggestionService issueSuggestionService; |
||||
|
|
||||
|
/** |
||||
|
* @param formDTO |
||||
|
* @author yinzuomei |
||||
|
* @description 查询用户对于某个议题的想法 返回一条记录 |
||||
|
* @Date 2020/11/18 10:12 |
||||
|
**/ |
||||
|
@PostMapping("queryuserissuesuggestion") |
||||
|
public Result<IssueSuggestionDTO> queryUserIssueSuggestion(@RequestBody UserIssueSuggestionFormDTO formDTO){ |
||||
|
ValidatorUtils.validateEntity(formDTO); |
||||
|
IssueSuggestionDTO issueSuggestionDTO=issueSuggestionService.queryUserIssueSuggestion(formDTO); |
||||
|
return new Result<IssueSuggestionDTO>().ok(issueSuggestionDTO); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* @param dto |
||||
|
* @author yinzuomei |
||||
|
* @description 保存居民端用户对议题的建议或意见 |
||||
|
* @Date 2020/11/18 13:15 |
||||
|
**/ |
||||
|
@PostMapping("save") |
||||
|
public Result<SaveIssueSuggestionResultDTO> saveIssueSuggestion(@RequestBody IssueSuggestionDTO dto) { |
||||
|
SaveIssueSuggestionResultDTO resultDTO = issueSuggestionService.saveIssueSuggestion(dto); |
||||
|
return new Result<SaveIssueSuggestionResultDTO>().ok(resultDTO); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* @param formDTO |
||||
|
* @author yinzuomei |
||||
|
* @description 议题建议列表 |
||||
|
* @Date 2020/11/18 14:15 |
||||
|
**/ |
||||
|
@PostMapping("list") |
||||
|
public Result<List<IssueSuggestionResDTO>> listIssueSug(@RequestBody EvaluationListFormDTO formDTO) { |
||||
|
ValidatorUtils.validateEntity(formDTO); |
||||
|
List<IssueSuggestionResDTO> list = issueSuggestionService.listIssueSug(formDTO); |
||||
|
return new Result<List<IssueSuggestionResDTO>>().ok(list); |
||||
|
} |
||||
|
} |
@ -0,0 +1,54 @@ |
|||||
|
/** |
||||
|
* 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.IssueSuggestionDTO; |
||||
|
import com.epmet.dto.form.UserIssueSuggestionFormDTO; |
||||
|
import com.epmet.dto.result.IssueSuggestionResDTO; |
||||
|
import com.epmet.entity.IssueSuggestionEntity; |
||||
|
import org.apache.ibatis.annotations.Mapper; |
||||
|
|
||||
|
import java.util.List; |
||||
|
|
||||
|
/** |
||||
|
* 居民端用户对议题建议或意见表 |
||||
|
* |
||||
|
* @author generator generator@elink-cn.com |
||||
|
* @since v1.0.0 2020-11-18 |
||||
|
*/ |
||||
|
@Mapper |
||||
|
public interface IssueSuggestionDao extends BaseDao<IssueSuggestionEntity> { |
||||
|
|
||||
|
/** |
||||
|
* @return com.epmet.dto.IssueSuggestionDTO |
||||
|
* @param formDTO |
||||
|
* @author yinzuomei |
||||
|
* @description 查询用户对于某个议题的想法 返回一条记录 |
||||
|
* @Date 2020/11/18 10:12 |
||||
|
**/ |
||||
|
IssueSuggestionDTO selectUserIssueSuggestion(UserIssueSuggestionFormDTO formDTO); |
||||
|
|
||||
|
/** |
||||
|
* @param issueId |
||||
|
* @author yinzuomei |
||||
|
* @description 查询议题建议 |
||||
|
* @Date 2020/11/18 14:27 |
||||
|
**/ |
||||
|
List<IssueSuggestionResDTO> selectListIssueSugByIssueId(String issueId); |
||||
|
} |
@ -0,0 +1,66 @@ |
|||||
|
/** |
||||
|
* Copyright 2018 人人开源 https://www.renren.io
|
||||
|
* <p> |
||||
|
* This program is free software: you can redistribute it and/or modify |
||||
|
* it under the terms of the GNU General Public License as published by |
||||
|
* the Free Software Foundation, either version 3 of the License, or |
||||
|
* (at your option) any later version. |
||||
|
* <p> |
||||
|
* This program is distributed in the hope that it will be useful, |
||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||
|
* GNU General Public License for more details. |
||||
|
* <p> |
||||
|
* You should have received a copy of the GNU General Public License |
||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
*/ |
||||
|
|
||||
|
package com.epmet.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-11-18 |
||||
|
*/ |
||||
|
@Data |
||||
|
@EqualsAndHashCode(callSuper=false) |
||||
|
@TableName("issue_suggestion") |
||||
|
public class IssueSuggestionEntity extends BaseEpmetEntity { |
||||
|
|
||||
|
private static final long serialVersionUID = 1L; |
||||
|
|
||||
|
/** |
||||
|
* 客户Id customer.id |
||||
|
*/ |
||||
|
private String customerId; |
||||
|
|
||||
|
/** |
||||
|
* 议题id |
||||
|
*/ |
||||
|
private String issueId; |
||||
|
|
||||
|
/** |
||||
|
* 议题所属网格id |
||||
|
*/ |
||||
|
private String gridId; |
||||
|
|
||||
|
/** |
||||
|
* 对议题的想法 |
||||
|
*/ |
||||
|
private String suggestion; |
||||
|
|
||||
|
/** |
||||
|
* 1公开; 0匿名 |
||||
|
*/ |
||||
|
private Integer publicFlag; |
||||
|
|
||||
|
} |
@ -0,0 +1,61 @@ |
|||||
|
/** |
||||
|
* 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 com.epmet.commons.mybatis.service.BaseService; |
||||
|
import com.epmet.dto.IssueSuggestionDTO; |
||||
|
import com.epmet.dto.form.EvaluationListFormDTO; |
||||
|
import com.epmet.dto.form.UserIssueSuggestionFormDTO; |
||||
|
import com.epmet.dto.result.IssueSuggestionResDTO; |
||||
|
import com.epmet.dto.result.SaveIssueSuggestionResultDTO; |
||||
|
import com.epmet.entity.IssueSuggestionEntity; |
||||
|
|
||||
|
import java.util.List; |
||||
|
|
||||
|
/** |
||||
|
* 居民端用户对议题建议或意见表 |
||||
|
* |
||||
|
* @author generator generator@elink-cn.com |
||||
|
* @since v1.0.0 2020-11-18 |
||||
|
*/ |
||||
|
public interface IssueSuggestionService extends BaseService<IssueSuggestionEntity> { |
||||
|
|
||||
|
/** |
||||
|
* @param formDTO |
||||
|
* @author yinzuomei |
||||
|
* @description 查询用户对于某个议题的想法 返回一条记录 |
||||
|
* @Date 2020/11/18 10:12 |
||||
|
**/ |
||||
|
IssueSuggestionDTO queryUserIssueSuggestion(UserIssueSuggestionFormDTO formDTO); |
||||
|
|
||||
|
/** |
||||
|
* @param dto |
||||
|
* @author yinzuomei |
||||
|
* @description 保存居民端用户对议题的建议或意见 |
||||
|
* @Date 2020/11/18 13:16 |
||||
|
**/ |
||||
|
SaveIssueSuggestionResultDTO saveIssueSuggestion(IssueSuggestionDTO dto); |
||||
|
|
||||
|
/** |
||||
|
* @param formDTO |
||||
|
* @author yinzuomei |
||||
|
* @description 议题建议列表 |
||||
|
* @Date 2020/11/18 14:16 |
||||
|
**/ |
||||
|
List<IssueSuggestionResDTO> listIssueSug(EvaluationListFormDTO formDTO); |
||||
|
} |
@ -0,0 +1,173 @@ |
|||||
|
/** |
||||
|
* 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.impl; |
||||
|
|
||||
|
import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; |
||||
|
import com.epmet.commons.tools.constant.StrConstant; |
||||
|
import com.epmet.commons.tools.exception.EpmetErrorCode; |
||||
|
import com.epmet.commons.tools.exception.RenException; |
||||
|
import com.epmet.commons.tools.scan.param.TextScanParamDTO; |
||||
|
import com.epmet.commons.tools.scan.param.TextTaskDTO; |
||||
|
import com.epmet.commons.tools.scan.result.SyncScanResult; |
||||
|
import com.epmet.commons.tools.utils.ConvertUtils; |
||||
|
import com.epmet.commons.tools.utils.Result; |
||||
|
import com.epmet.commons.tools.utils.ScanContentUtils; |
||||
|
import com.epmet.dao.IssueSuggestionDao; |
||||
|
import com.epmet.dao.IssueVoteDetailDao; |
||||
|
import com.epmet.dto.IssueDTO; |
||||
|
import com.epmet.dto.IssueSuggestionDTO; |
||||
|
import com.epmet.dto.IssueVoteDetailDTO; |
||||
|
import com.epmet.dto.form.EvaluationListFormDTO; |
||||
|
import com.epmet.dto.form.UserIssueSuggestionFormDTO; |
||||
|
import com.epmet.dto.form.UserResiInfoListFormDTO; |
||||
|
import com.epmet.dto.result.IssueSuggestionResDTO; |
||||
|
import com.epmet.dto.result.SaveIssueSuggestionResultDTO; |
||||
|
import com.epmet.dto.result.UserResiInfoResultDTO; |
||||
|
import com.epmet.entity.IssueSuggestionEntity; |
||||
|
import com.epmet.feign.EpmetUserFeignClient; |
||||
|
import com.epmet.service.IssueService; |
||||
|
import com.epmet.service.IssueSuggestionService; |
||||
|
import com.github.pagehelper.PageHelper; |
||||
|
import lombok.extern.slf4j.Slf4j; |
||||
|
import org.apache.commons.collections4.CollectionUtils; |
||||
|
import org.apache.commons.lang3.StringUtils; |
||||
|
import org.springframework.beans.factory.annotation.Autowired; |
||||
|
import org.springframework.beans.factory.annotation.Value; |
||||
|
import org.springframework.stereotype.Service; |
||||
|
|
||||
|
import java.util.*; |
||||
|
import java.util.function.Function; |
||||
|
import java.util.stream.Collectors; |
||||
|
|
||||
|
/** |
||||
|
* 居民端用户对议题建议或意见表 |
||||
|
* |
||||
|
* @author generator generator@elink-cn.com |
||||
|
* @since v1.0.0 2020-11-18 |
||||
|
*/ |
||||
|
@Slf4j |
||||
|
@Service |
||||
|
public class IssueSuggestionServiceImpl extends BaseServiceImpl<IssueSuggestionDao, IssueSuggestionEntity> implements IssueSuggestionService { |
||||
|
@Autowired |
||||
|
private IssueService issueService; |
||||
|
@Value("${openapi.scan.server.url}") |
||||
|
private String scanApiUrl; |
||||
|
@Value("${openapi.scan.method.textSyncScan}") |
||||
|
private String textSyncScanMethod; |
||||
|
@Autowired |
||||
|
private EpmetUserFeignClient epmetUserFeignClient; |
||||
|
@Autowired |
||||
|
private IssueVoteDetailDao issueVoteDetailDao; |
||||
|
|
||||
|
/** |
||||
|
* @param formDTO |
||||
|
* @author yinzuomei |
||||
|
* @description 查询用户对于某个议题的想法 返回一条记录 |
||||
|
* @Date 2020/11/18 10:12 |
||||
|
**/ |
||||
|
@Override |
||||
|
public IssueSuggestionDTO queryUserIssueSuggestion(UserIssueSuggestionFormDTO formDTO) { |
||||
|
return baseDao.selectUserIssueSuggestion(formDTO); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* @param dto |
||||
|
* @author yinzuomei |
||||
|
* @description 保存居民端用户对议题的建议或意见 |
||||
|
* @Date 2020/11/18 13:16 |
||||
|
**/ |
||||
|
@Override |
||||
|
public SaveIssueSuggestionResultDTO saveIssueSuggestion(IssueSuggestionDTO dto) { |
||||
|
//是否表决过
|
||||
|
IssueVoteDetailDTO issueVoteDetailDTO = issueVoteDetailDao.selectUserIssueDet(dto.getCreatedBy(), dto.getIssueId()); |
||||
|
if(null==issueVoteDetailDTO){ |
||||
|
throw new RenException(EpmetErrorCode.VOTE_ISSUE_PLEASE.getCode()); |
||||
|
} |
||||
|
//校验建议内容
|
||||
|
TextScanParamDTO textScanParamDTO = new TextScanParamDTO(); |
||||
|
TextTaskDTO taskDTO = new TextTaskDTO(); |
||||
|
taskDTO.setDataId(UUID.randomUUID().toString().replace("-", "")); |
||||
|
taskDTO.setContent(dto.getSuggestion()); |
||||
|
textScanParamDTO.getTasks().add(taskDTO); |
||||
|
Result<SyncScanResult> textSyncScanResult = ScanContentUtils.textSyncScan(scanApiUrl.concat(textSyncScanMethod), textScanParamDTO); |
||||
|
if (!textSyncScanResult.success()) { |
||||
|
log.warn("居民端用户对议题发表建议,内容审核服务返回失败"); |
||||
|
throw new RenException(EpmetErrorCode.SERVER_ERROR.getCode()); |
||||
|
} else { |
||||
|
if (!textSyncScanResult.getData().isAllPass()) { |
||||
|
throw new RenException(EpmetErrorCode.TEXT_SCAN_FAILED.getCode()); |
||||
|
} |
||||
|
} |
||||
|
//赋值网格id
|
||||
|
IssueDTO issueDTO = issueService.get(dto.getIssueId()); |
||||
|
if (null == issueDTO) { |
||||
|
throw new RenException(String.format("根据议题id%s,没有找到议题信息", dto.getIssueId())); |
||||
|
} |
||||
|
dto.setGridId(issueDTO.getGridId()); |
||||
|
dto.setCustomerId(issueDTO.getCustomerId()); |
||||
|
//插入
|
||||
|
IssueSuggestionEntity entity = ConvertUtils.sourceToTarget(dto, IssueSuggestionEntity.class); |
||||
|
insert(entity); |
||||
|
SaveIssueSuggestionResultDTO resultDTO = new SaveIssueSuggestionResultDTO(); |
||||
|
resultDTO.setIssueId(dto.getIssueId()); |
||||
|
resultDTO.setSuggestionId(entity.getId()); |
||||
|
return resultDTO; |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* @param formDTO |
||||
|
* @author yinzuomei |
||||
|
* @description 议题建议列表 |
||||
|
* @Date 2020/11/18 14:16 |
||||
|
**/ |
||||
|
@Override |
||||
|
public List<IssueSuggestionResDTO> listIssueSug(EvaluationListFormDTO formDTO) { |
||||
|
PageHelper.startPage(formDTO.getPageNo(), formDTO.getPageSize()); |
||||
|
List<IssueSuggestionResDTO> list = baseDao.selectListIssueSugByIssueId(formDTO.getIssueId()); |
||||
|
//用户信息公开的userId集合
|
||||
|
Set<String> userIds = new HashSet<>(); |
||||
|
list.forEach(issueSuggestion -> { |
||||
|
if (issueSuggestion.getPublicFlag()) { |
||||
|
userIds.add(issueSuggestion.getUserId()); |
||||
|
} |
||||
|
IssueVoteDetailDTO issueVoteDetailDTO = issueVoteDetailDao.selectUserIssueDet(issueSuggestion.getUserId(), formDTO.getIssueId()); |
||||
|
issueSuggestion.setAititude(null != issueVoteDetailDTO ? issueVoteDetailDTO.getAttitude() : StrConstant.EPMETY_STR); |
||||
|
}); |
||||
|
//查询这部分人的基本信息
|
||||
|
if (!CollectionUtils.isEmpty(userIds)) { |
||||
|
Result<List<UserResiInfoResultDTO>> userInfoRes = epmetUserFeignClient.getUserResiInfoList(new UserResiInfoListFormDTO(new ArrayList<>(userIds))); |
||||
|
if (userInfoRes.success() && !CollectionUtils.isEmpty(userInfoRes.getData())) { |
||||
|
Map<String, UserResiInfoResultDTO> userBaseInfoMap = userInfoRes.getData().stream().collect(Collectors.toMap(UserResiInfoResultDTO::getUserId, Function.identity())); |
||||
|
//赋值
|
||||
|
list.forEach(issueSuggestionInfo -> { |
||||
|
if (issueSuggestionInfo.getPublicFlag()) { |
||||
|
UserResiInfoResultDTO userInfo = userBaseInfoMap.get(issueSuggestionInfo.getUserId()); |
||||
|
if (null != userInfo && StringUtils.isNotBlank(userInfo.getHeadPhoto())) { |
||||
|
issueSuggestionInfo.setHeadPhoto(userInfo.getHeadPhoto()); |
||||
|
} |
||||
|
if (null != userInfo && StringUtils.isNotBlank(userInfo.getShowName())) { |
||||
|
issueSuggestionInfo.setUserShowName(userInfo.getShowName()); |
||||
|
} |
||||
|
} |
||||
|
}); |
||||
|
} |
||||
|
} |
||||
|
return list; |
||||
|
} |
||||
|
|
||||
|
} |
@ -0,0 +1,37 @@ |
|||||
|
drop table if exists issue_application; |
||||
|
CREATE TABLE `issue_application` ( |
||||
|
`ID` varchar(64) NOT NULL COMMENT '主键', |
||||
|
`CUSTOMER_ID` varchar(32) NOT NULL COMMENT '客户ID', |
||||
|
`ISSUE_TITLE` varchar(128) NOT NULL COMMENT '议题名称 ', |
||||
|
`SUGGESTION` varchar(1024) NOT NULL COMMENT '建议', |
||||
|
`APPLY_STATUS` varchar(32) NOT NULL COMMENT '审核状态:under_auditing:待审核;approved:通过;rejected:驳回', |
||||
|
`TOPIC_ID` varchar(32) NOT NULL COMMENT '话题id', |
||||
|
`GROUP_ID` varchar(64) NOT NULL COMMENT '小组id', |
||||
|
`GRID_ID` varchar(32) NOT NULL COMMENT '网格ID 居民端议题对应一个网格Id', |
||||
|
`ISSUE_ID` varchar(64) DEFAULT NULL COMMENT '审核通过后对应的 议题id', |
||||
|
`PASSED_REASON` varchar(1024) DEFAULT NULL COMMENT '审核通过时填写的理由', |
||||
|
`DEL_FLAG` varchar(1) NOT NULL DEFAULT '0' COMMENT '删除标识 0未删除、1已删除', |
||||
|
`REVISION` int(11) NOT NULL DEFAULT '0' COMMENT '乐观锁', |
||||
|
`CREATED_BY` varchar(32) NOT NULL COMMENT '创建人', |
||||
|
`CREATED_TIME` datetime NOT NULL COMMENT '创建时间:第一次提交审核的时间,注意和历史表的第一条记录时间一致', |
||||
|
`UPDATED_BY` varchar(32) NOT NULL COMMENT '更新人', |
||||
|
`UPDATED_TIME` datetime NOT NULL COMMENT '更新时间', |
||||
|
PRIMARY KEY (`ID`) |
||||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='话题转议题申请表'; |
||||
|
|
||||
|
drop table if exists issue_application_history; |
||||
|
CREATE TABLE `issue_application_history` ( |
||||
|
`ID` varchar(64) NOT NULL COMMENT '主键', |
||||
|
`CUSTOMER_ID` varchar(32) NOT NULL COMMENT '客户ID', |
||||
|
`ISSUE_APPLICATION_ID` varchar(64) NOT NULL COMMENT '话题转议题申请表 issue_application.id', |
||||
|
`ACTION_TYPE` varchar(32) NOT NULL COMMENT 'under_auditing:提交审核;\r\napproved:审核通过,\r\nrejected:驳回', |
||||
|
`REASON` varchar(1024) DEFAULT NULL COMMENT '审核时的说明', |
||||
|
`STAFF_NAME` varchar(255) DEFAULT NULL COMMENT '工作端人员姓名', |
||||
|
`DEL_FLAG` varchar(1) NOT NULL DEFAULT '0' COMMENT '删除标识:0 未删除 1已删除', |
||||
|
`REVISION` int(11) NOT NULL DEFAULT '0' COMMENT '乐观锁', |
||||
|
`CREATED_BY` varchar(64) NOT NULL COMMENT '创建人 提交人', |
||||
|
`CREATED_TIME` datetime NOT NULL COMMENT '创建时间', |
||||
|
`UPDATED_BY` varchar(64) NOT NULL COMMENT '修改人ID', |
||||
|
`UPDATED_TIME` datetime NOT NULL COMMENT '修改时间', |
||||
|
PRIMARY KEY (`ID`) |
||||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='话题转议题审核历史表'; |
@ -0,0 +1,16 @@ |
|||||
|
drop table if exists issue_suggestion; |
||||
|
CREATE TABLE `issue_suggestion` ( |
||||
|
`ID` varchar(64) NOT NULL COMMENT '主键', |
||||
|
`CUSTOMER_ID` varchar(64) NOT NULL COMMENT '客户Id customer.id', |
||||
|
`ISSUE_ID` varchar(64) NOT NULL COMMENT '议题id', |
||||
|
`GRID_ID` varchar(64) NOT NULL COMMENT '议题所属网格id', |
||||
|
`SUGGESTION` varchar(512) NOT NULL COMMENT '对议题的想法', |
||||
|
`PUBLIC_FLAG` tinyint(1) NOT NULL COMMENT '1公开; 0匿名', |
||||
|
`DEL_FLAG` varchar(1) NOT NULL DEFAULT '0' COMMENT '删除标识:0 未删除 1已删除', |
||||
|
`REVISION` int(11) NOT NULL DEFAULT '0' COMMENT '乐观锁', |
||||
|
`CREATED_BY` varchar(64) NOT NULL COMMENT '提建议的人', |
||||
|
`CREATED_TIME` datetime NOT NULL COMMENT '创建时间', |
||||
|
`UPDATED_BY` varchar(64) NOT NULL COMMENT '修改人ID', |
||||
|
`UPDATED_TIME` datetime NOT NULL COMMENT '修改时间', |
||||
|
PRIMARY KEY (`ID`) |
||||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='居民端用户对议题建议或意见表'; |
@ -0,0 +1,36 @@ |
|||||
|
<?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.IssueSuggestionDao"> |
||||
|
<!-- 查询用户对于某个议题的想法 返回一条记录 --> |
||||
|
<select id="selectUserIssueSuggestion" parameterType="com.epmet.dto.form.UserIssueSuggestionFormDTO" resultType="com.epmet.dto.IssueSuggestionDTO"> |
||||
|
SELECT |
||||
|
* |
||||
|
FROM |
||||
|
issue_suggestion i |
||||
|
WHERE |
||||
|
i.DEL_FLAG = '0' |
||||
|
AND i.ISSUE_ID = #{issueId} |
||||
|
AND i.CREATED_BY=#{userId} |
||||
|
</select> |
||||
|
|
||||
|
<!-- 查询议题建议 --> |
||||
|
<select id="selectListIssueSugByIssueId" resultType="com.epmet.dto.result.IssueSuggestionResDTO"> |
||||
|
SELECT |
||||
|
ig.id AS suggestionId, |
||||
|
ig.SUGGESTION, |
||||
|
ig.CREATED_TIME AS publishTime, |
||||
|
ig.PUBLIC_FLAG AS publicFlag, |
||||
|
'' AS headPhoto, |
||||
|
'' AS userShowName, |
||||
|
'' AS aititude, |
||||
|
ig.CREATED_BY AS userId |
||||
|
FROM |
||||
|
issue_suggestion ig |
||||
|
WHERE |
||||
|
ig.DEL_FLAG = '0' |
||||
|
AND ig.ISSUE_ID =#{issueId} |
||||
|
ORDER BY |
||||
|
ig.CREATED_TIME DESC |
||||
|
</select> |
||||
|
</mapper> |
@ -0,0 +1,56 @@ |
|||||
|
package com.epmet.dto.form; |
||||
|
|
||||
|
import com.epmet.commons.tools.validator.group.AddGroup; |
||||
|
import com.epmet.commons.tools.validator.group.DefaultGroup; |
||||
|
import lombok.Data; |
||||
|
import lombok.NoArgsConstructor; |
||||
|
|
||||
|
import javax.validation.constraints.NotBlank; |
||||
|
import java.io.Serializable; |
||||
|
|
||||
|
/** |
||||
|
* @author zhaoqifeng |
||||
|
* @dscription |
||||
|
* @date 2020/11/18 15:00 |
||||
|
*/ |
||||
|
@NoArgsConstructor |
||||
|
@Data |
||||
|
public class ParameterFormDTO implements Serializable { |
||||
|
|
||||
|
private static final long serialVersionUID = 6943367994919967821L; |
||||
|
/** |
||||
|
* 客户ID |
||||
|
*/ |
||||
|
@NotBlank(message = "客户ID不能为空", groups = DefaultGroup.class) |
||||
|
private String customerId; |
||||
|
/** |
||||
|
* 可滞留天数 |
||||
|
*/ |
||||
|
@NotBlank(message = "可滞留天数不能为空", groups = AddGroup.class) |
||||
|
private String detentionDays; |
||||
|
/** |
||||
|
* 计算方式 工作日work 日历天calendar |
||||
|
*/ |
||||
|
@NotBlank(message = "计算方式 不能为空", groups = AddGroup.class) |
||||
|
private String calculation; |
||||
|
/** |
||||
|
* 即将超期提醒时间 |
||||
|
*/ |
||||
|
@NotBlank(message = "即将超期提醒时间不能为空", groups = AddGroup.class) |
||||
|
private String remindTime; |
||||
|
/** |
||||
|
* 推送时间 默认 上午8点 |
||||
|
*/ |
||||
|
@NotBlank(message = "推送时间不能为空", groups = AddGroup.class) |
||||
|
private String pushTime; |
||||
|
/** |
||||
|
* 设定核算单位天开始时间 |
||||
|
*/ |
||||
|
@NotBlank(message = "设定核算单位天开始时间不能为空", groups = AddGroup.class) |
||||
|
private String startTime; |
||||
|
/** |
||||
|
* 设定核算单位天结束时间 |
||||
|
*/ |
||||
|
@NotBlank(message = "设定核算单位天结束时间不能为空", groups = AddGroup.class) |
||||
|
private String endTime; |
||||
|
} |
@ -0,0 +1,39 @@ |
|||||
|
package com.epmet.dto.result; |
||||
|
|
||||
|
import lombok.Data; |
||||
|
|
||||
|
import java.io.Serializable; |
||||
|
|
||||
|
/** |
||||
|
* @author zhaoqifeng |
||||
|
* @dscription |
||||
|
* @date 2020/11/18 15:19 |
||||
|
*/ |
||||
|
@Data |
||||
|
public class ParameterResultDTO implements Serializable { |
||||
|
private static final long serialVersionUID = -2066374948905858262L; |
||||
|
/** |
||||
|
* 可滞留天数 |
||||
|
*/ |
||||
|
private String detentionDays; |
||||
|
/** |
||||
|
* 计算方式 工作日work 日历天calendar |
||||
|
*/ |
||||
|
private String calculation; |
||||
|
/** |
||||
|
* 即将超期提醒时间 |
||||
|
*/ |
||||
|
private String remindTime; |
||||
|
/** |
||||
|
* 推送时间 默认 上午8点 |
||||
|
*/ |
||||
|
private String pushTime; |
||||
|
/** |
||||
|
* 设定核算单位天开始时间 |
||||
|
*/ |
||||
|
private String startTime; |
||||
|
/** |
||||
|
* 设定核算单位天结束时间 |
||||
|
*/ |
||||
|
private String endTime; |
||||
|
} |
Some files were not shown because too many files changed in this diff
Loading…
Reference in new issue