diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/feign/GovOrgSelfFeignClient.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/feign/GovOrgSelfFeignClient.java new file mode 100644 index 0000000000..1388593063 --- /dev/null +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/feign/GovOrgSelfFeignClient.java @@ -0,0 +1,28 @@ +package com.epmet.dto.feign; + +import com.epmet.commons.tools.constant.ServiceConstant; +import com.epmet.commons.tools.utils.Result; +import com.epmet.dto.feign.fallback.GovOrgSelfFeignClientFallBack; +import com.epmet.dto.result.ArticleGridResultDTO; +import org.springframework.cloud.openfeign.FeignClient; +import org.springframework.http.MediaType; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.PostMapping; + +/** + * @Description gov-org服务 + * @Author sun + */ +@FeignClient(name = ServiceConstant.GOV_ORG_SERVER, fallback = GovOrgSelfFeignClientFallBack.class) +public interface GovOrgSelfFeignClient { + + /** + * @param staffId + * @return + * @Author sun + * @Description 党建声音-政府端-可选发布范围接口调用 + **/ + @PostMapping(value = "gov/org/customeragency/getagencygridlist/{staffId}", consumes = MediaType.APPLICATION_JSON_UTF8_VALUE) + Result getAgencyGridList(@PathVariable("staffId") String staffId); + +} diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/feign/fallback/GovOrgSelfFeignClientFallBack.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/feign/fallback/GovOrgSelfFeignClientFallBack.java new file mode 100644 index 0000000000..d1210a4f23 --- /dev/null +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/feign/fallback/GovOrgSelfFeignClientFallBack.java @@ -0,0 +1,21 @@ +package com.epmet.dto.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.dto.feign.GovOrgSelfFeignClient; +import com.epmet.dto.result.ArticleGridResultDTO; +import org.springframework.stereotype.Component; + +/** + * @Description gov-org服务 + * @Author sun + */ +@Component +public class GovOrgSelfFeignClientFallBack implements GovOrgSelfFeignClient { + + @Override + public Result getAgencyGridList(String staffId) { + return ModuleUtils.feignConError(ServiceConstant.GOV_ORG_SERVER, "getAgencyGridList", staffId); + } +} diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/AgencyGridListResultDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/AgencyGridListResultDTO.java new file mode 100644 index 0000000000..5474009956 --- /dev/null +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/AgencyGridListResultDTO.java @@ -0,0 +1,41 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.dto.result; + +import lombok.Data; + +import java.io.Serializable; + + +/** + * 党建声音-可选发布范围-接口返参 + * + * @author sun + */ +@Data +public class AgencyGridListResultDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 机关组织Id + */ + private String gridId = ""; + private String gridName = ""; + +} \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/ArticleGridResultDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/ArticleGridResultDTO.java new file mode 100644 index 0000000000..2e83e432c3 --- /dev/null +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/ArticleGridResultDTO.java @@ -0,0 +1,57 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.dto.result; + +import lombok.Data; + +import java.io.Serializable; +import java.util.List; + + +/** + * 党建声音-可选发布范围-接口返参 + * + * @author sun + */ +@Data +public class ArticleGridResultDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 机关组织Id + */ + private String agencyId = ""; + /** + * 机关组织名称 + */ + private String agencyName = ""; + /** + * 当前机关的下属网格列表 + */ + private List gridList; + /** + * 当前组织的所有下级组织信息(递归) + */ + private List subAgencyGridList; + /** + * 所有上级机关Ids + */ + private String pids = ""; + +} \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/constant/CustomerAgencyConstant.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/constant/CustomerAgencyConstant.java index c4d48ee458..b1a42c4209 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/constant/CustomerAgencyConstant.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/constant/CustomerAgencyConstant.java @@ -55,4 +55,16 @@ public interface CustomerAgencyConstant { * 调用epmet-user服务查询用户基础信息失败 */ String SELECT_USER_EXCEPTION = "获取用户基本信息失败"; + /** + * 获取组织人员关系表数据失败 + */ + String SELECT_AGENCY_STAFF_EXCEPTION = "获取机关下人员信息失败"; + /** + * 党建负责人角色 + */ + String PARTY_PRINCIPALS = "party_principals"; + /** + * 网格党建指导员角色 + */ + String GRID_PARTY_DIRECTOR = "grid_party_director"; } diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/CustomerAgencyController.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/CustomerAgencyController.java index 2bc9b1e136..5c6d37a701 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/CustomerAgencyController.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/CustomerAgencyController.java @@ -163,4 +163,15 @@ public class CustomerAgencyController { return new Result().ok(customerAgencyService.getProcessorList(agencyId)); } + /** + * @param staffId + * @return + * @Author sun + * @Description 党建声音-政府端-可选发布范围接口调用-根据人员角色查询对应的不同发布范围 + **/ + @PostMapping("getagencygridlist/{agencyId}") + public Result getAgencyGridList(@PathVariable("staffId") String staffId) { + return new Result().ok(customerAgencyService.getAgencyGridList(staffId)); + } + } \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/CustomerAgencyDao.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/CustomerAgencyDao.java index ec559ccaa6..8a51d3ad19 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/CustomerAgencyDao.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/CustomerAgencyDao.java @@ -116,4 +116,12 @@ public interface CustomerAgencyDao extends BaseDao { * @return java.lang.String */ String selectAgencyName(@Param("agencyId") String agencyId); + + /** + * @param subAgencyPids + * @return + * @Author sun + * @Description 递归查询当前机关的下一级机关列表 + **/ + List selectAllSubAgency(@Param("subAgencyPids") String subAgencyPids); } \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/CustomerGridDao.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/CustomerGridDao.java index 2256263cd0..2f2fd75797 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/CustomerGridDao.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/CustomerGridDao.java @@ -184,4 +184,12 @@ public interface CustomerGridDao extends BaseDao { * @date 2020.05.13 11:01 **/ CommonDataFilterResultDTO getGridDataFilterMsg(@Param("gridId")String gridId); + + /** + * @param agencyId + * @return + * @Author sun + * @Description 查询组织下网格列表 + **/ + List selectAgencyGridList(@Param("agencyId") String agencyId); } \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/CustomerStaffAgencyDao.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/CustomerStaffAgencyDao.java index 767b073359..7f980cb8c8 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/CustomerStaffAgencyDao.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/CustomerStaffAgencyDao.java @@ -72,4 +72,12 @@ public interface CustomerStaffAgencyDao extends BaseDao selectAgencyStaffList(@Param("agencyId") String agencyId); + + /** + * @param dto + * @return + * @Author sun + * @Description 根据staffId查询数据 + **/ + CustomerStaffAgencyDTO selectByStaffId(CustomerStaffAgencyDTO dto); } \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/CustomerStaffGridDao.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/CustomerStaffGridDao.java index 2a160f8a90..54cad95662 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/CustomerStaffGridDao.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/CustomerStaffGridDao.java @@ -90,4 +90,11 @@ public interface CustomerStaffGridDao extends BaseDao { * @Description 遍历查询每个部门下人员 */ List selectGridStaffs(@Param("gridIdList") List gridIdList); + + /** + * + * @Author sun + * @Description 查询人员在客户下参与的网格列表 + */ + List selectStaffGridList(CustomerStaffGridDTO staffGridDTO); } \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/CustomerAgencyService.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/CustomerAgencyService.java index e29bff8bf1..bbd40017b2 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/CustomerAgencyService.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/CustomerAgencyService.java @@ -156,4 +156,12 @@ public interface CustomerAgencyService extends BaseService * @return java.lang.String */ String getAgencyName(String agencyId); + + /** + * @param staffId + * @return + * @Author sun + * @Description 党建声音-政府端-可选发布范围接口调用-根据人员角色查询对应的不同发布范围 + **/ + ArticleGridResultDTO getAgencyGridList(String staffId); } \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerAgencyServiceImpl.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerAgencyServiceImpl.java index bf01b2e618..45f234258d 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerAgencyServiceImpl.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerAgencyServiceImpl.java @@ -35,6 +35,7 @@ import com.epmet.dto.result.*; import com.epmet.entity.CustomerAgencyEntity; import com.epmet.entity.CustomerGridEntity; import com.epmet.feign.EpmetUserFeignClient; +import com.epmet.feign.EpmetUserSelfFeignClient; import com.epmet.feign.OperCrmFeignClient; import com.epmet.redis.CustomerAgencyRedis; import com.epmet.service.CustomerAgencyService; @@ -75,6 +76,8 @@ public class CustomerAgencyServiceImpl extends BaseServiceImpl page(Map params) { @@ -628,4 +631,96 @@ public class CustomerAgencyServiceImpl extends BaseServiceImpl> listResult = epmetUserSelfFeignClient.getCustomerStaffRoleList(formDTO); + if(null==listResult.getData()||listResult.getData().size() RoleList = listResult.getData(); + + //3:判断用户是否具有机关党建负责人或网格指导员角色 + boolean party = false;//机关党建负责人角色 + boolean gridParty = false;//网格指导员角色 + for(CustomerStaffRoleListResultDTO role : RoleList){ + if(CustomerAgencyConstant.PARTY_PRINCIPALS.equals(role.getRoleKey())){ + party = true; + } + if(CustomerAgencyConstant.GRID_PARTY_DIRECTOR.equals(role.getRoleKey())){ + gridParty = true; + } + } + if(!party&&!gridParty){ + return returnDTO; + } + + //4:根据不同角色查询不同数据 + if(party){ + //4.1:查询当前机关的网格列表以及所有下级机关的网格列表 + //当前机关下网格列表 + List gridList = customerGridDao.selectAgencyGridList(agencyEntity.getId()); + returnDTO.setGridList(gridList); + //递归查询当前组织的下级组织以及每个下级组织对应的网格列表 + List subAgencyGridList = getGridList(agencyEntity.getPids() + ":" + agencyEntity.getId()); + returnDTO.setSubAgencyGridList(subAgencyGridList); + }else if(gridParty){ + //4.2:查询人员在当前机关下参与的网格列表 + //查询当前组织下的网格列表 + List gridList = customerGridDao.selectAgencyGridList(agencyEntity.getId()); + //查询该工作人员在该客户下参与的网格列表 + CustomerStaffGridDTO staffGridDTO = new CustomerStaffGridDTO(); + staffGridDTO.setCustomerId(staffAgencyDTO.getCustomerId()); + staffGridDTO.setUserId(staffId); + List gridDTOList = customerStaffGridDao.selectStaffGridList(staffGridDTO); + //遍历取出该人员在该组织下参与的网格列表 + List resultList = gridList.stream().flatMap(agencyGrid -> gridDTOList.stream().filter(staffGrid -> + agencyGrid.getGridId().equals(staffGrid.getGridId())).map(grid -> { + AgencyGridListResultDTO resultDTO = ConvertUtils.sourceToTarget(agencyGrid, AgencyGridListResultDTO.class); + return resultDTO; + })).collect(Collectors.toList()); + + returnDTO.setGridList(resultList); + } + return returnDTO; + } + /** + * @Author sun + * @Description 递归查询当前机关的下一级机关列表 + **/ + private List getGridList(String subAgencyPids) { + List subAgencyList = baseDao.selectAllSubAgency(subAgencyPids); + if (subAgencyList.size() > NumConstant.ZERO) { + for (ArticleGridResultDTO sub : subAgencyList) { + List gridList = customerGridDao.selectAgencyGridList(sub.getAgencyId()); + sub.setGridList(gridList); + List subAgency = getGridList(sub.getPids() + ":" + sub.getAgencyId()); + sub.setSubAgencyGridList(subAgency); + } + } + return subAgencyList; + } + + } \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerAgencyDao.xml b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerAgencyDao.xml index 6b7afa1455..2f9ea62ff0 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerAgencyDao.xml +++ b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerAgencyDao.xml @@ -156,4 +156,15 @@ WHERE a.ID = #{agencyId} + + \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerGridDao.xml b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerGridDao.xml index c82576b64b..cbced7f6d6 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerGridDao.xml +++ b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerGridDao.xml @@ -320,4 +320,13 @@ AND agency.DEL_FLAG = '0' AND grid.ID = #{gridId} + + \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerStaffAgencyDao.xml b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerStaffAgencyDao.xml index cd4f40f9fb..21d9cf139c 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerStaffAgencyDao.xml +++ b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerStaffAgencyDao.xml @@ -105,4 +105,16 @@ AND agency_id =#{agencyId} + + \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerStaffGridDao.xml b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerStaffGridDao.xml index 1e6501c6bb..7f1a8d3220 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerStaffGridDao.xml +++ b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerStaffGridDao.xml @@ -77,6 +77,17 @@ + + insert into customer_staff_grid diff --git a/epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/ArticleDTO.java b/epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/ArticleDTO.java index 79cb1bb2bd..4c72866e27 100644 --- a/epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/ArticleDTO.java +++ b/epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/ArticleDTO.java @@ -17,9 +17,10 @@ package com.epmet.dto; +import lombok.Data; + import java.io.Serializable; import java.util.Date; -import lombok.Data; /** @@ -81,7 +82,7 @@ public class ArticleDTO implements Serializable { /** * 发布单位类型 机关:agency;部门:department;网格:grid */ - private Integer publisherType; + private String publisherType; /** * 发布时间 diff --git a/epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/DraftDTO.java b/epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/DraftDTO.java index 0e4ebd954b..c7a383a56d 100644 --- a/epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/DraftDTO.java +++ b/epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/DraftDTO.java @@ -17,9 +17,10 @@ package com.epmet.dto; +import lombok.Data; + import java.io.Serializable; import java.util.Date; -import lombok.Data; /** @@ -76,7 +77,7 @@ public class DraftDTO implements Serializable { /** * 发布单位类型 机关:agency;部门:department;网格:grid */ - private Integer publisherType; + private String publisherType; /** * 发布时间 diff --git a/epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/form/DraftContentFromDTO.java b/epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/form/DraftContentFromDTO.java new file mode 100644 index 0000000000..81d39fa698 --- /dev/null +++ b/epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/form/DraftContentFromDTO.java @@ -0,0 +1,98 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.dto.form; + +import lombok.Data; + +import javax.validation.constraints.NotBlank; +import java.io.Serializable; +import java.util.List; + + +/** + * 保存文章内容form + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-06-02 + */ +@Data +public class DraftContentFromDTO implements Serializable { + + + private static final long serialVersionUID = -4206020151361420221L; + /** + * 文章ID 重新编辑时必填 + */ + private String articleId; + + /** + * 客户ID + */ + private String customerId; + + /** + * 草稿ID + */ + private String draftId; + + /** + * 文章标题 + */ + @NotBlank(message = "文章标题不能为空") + private String title; + + /** + * 内容列表 + */ + private List contentList; + + @Data + public static class DraftContentDTO { + public DraftContentDTO() { + } + + /** + * 内容Id + */ + private String draftId; + /** + * 内容 + */ + private String content; + + /** + * 内容类型 图片:img;文字:text + */ + private String contentType; + + /** + * 审核状态 通过:pass;失败:fail; + */ + private String auditStatus; + + /** + * 审核理由 + */ + private String auditReason; + + /** + * 内容顺序 从1开始 + */ + private Integer orderNum; + } +} \ No newline at end of file diff --git a/epmet-module/gov-voice/gov-voice-server/pom.xml b/epmet-module/gov-voice/gov-voice-server/pom.xml index f546dac50a..09030c6c9b 100644 --- a/epmet-module/gov-voice/gov-voice-server/pom.xml +++ b/epmet-module/gov-voice/gov-voice-server/pom.xml @@ -60,6 +60,12 @@ feign-httpclient 10.3.0 + + com.epmet + gov-org-client + 2.0.0 + compile + diff --git a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/controller/ArticleController.java b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/controller/ArticleController.java index e1f69c6a2e..e72213a34d 100644 --- a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/controller/ArticleController.java +++ b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/controller/ArticleController.java @@ -17,15 +17,21 @@ package com.epmet.controller; +import com.epmet.commons.tools.annotation.LoginUser; import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.security.dto.TokenDto; import com.epmet.commons.tools.utils.ExcelUtils; import com.epmet.commons.tools.utils.Result; import com.epmet.commons.tools.validator.AssertUtils; import com.epmet.commons.tools.validator.ValidatorUtils; import com.epmet.commons.tools.validator.group.AddGroup; -import com.epmet.commons.tools.validator.group.UpdateGroup; import com.epmet.commons.tools.validator.group.DefaultGroup; +import com.epmet.commons.tools.validator.group.UpdateGroup; import com.epmet.dto.ArticleDTO; +import com.epmet.dto.form.LatestListFormDTO; +import com.epmet.dto.result.ArticleGridResultDTO; +import com.epmet.dto.result.LatestListResultDTO; +import com.epmet.dto.form.DraftContentFromDTO; import com.epmet.excel.ArticleExcel; import com.epmet.service.ArticleService; import org.springframework.beans.factory.annotation.Autowired; @@ -91,4 +97,26 @@ public class ArticleController { ExcelUtils.exportExcelToTarget(response, null, list, ArticleExcel.class); } + /** + * @param tokenDTO + * @return + * @Author sun + * @Description 党建声音-政府端-可选发布范围 + **/ + @PostMapping("agencygridlist") + public Result agencyGridList(@LoginUser TokenDto tokenDTO) { + return new Result().ok(articleService.agencyGridList(tokenDTO)); + } + + /** + * desc:保存或修改文章内容 + * @param fromDTO + * @throws Exception + */ + @GetMapping("savecontent") + public Result savecontent(@RequestBody DraftContentFromDTO fromDTO) throws Exception { + String draftId = articleService.saveOrUpdateContent(fromDTO); + return new Result().ok(draftId); + } + } \ No newline at end of file diff --git a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/controller/DraftContentController.java b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/controller/DraftContentController.java index c05fda4cc7..82243e0e48 100644 --- a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/controller/DraftContentController.java +++ b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/controller/DraftContentController.java @@ -23,8 +23,8 @@ import com.epmet.commons.tools.utils.Result; import com.epmet.commons.tools.validator.AssertUtils; import com.epmet.commons.tools.validator.ValidatorUtils; import com.epmet.commons.tools.validator.group.AddGroup; -import com.epmet.commons.tools.validator.group.UpdateGroup; import com.epmet.commons.tools.validator.group.DefaultGroup; +import com.epmet.commons.tools.validator.group.UpdateGroup; import com.epmet.dto.DraftContentDTO; import com.epmet.excel.DraftContentExcel; import com.epmet.service.DraftContentService; diff --git a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/entity/ArticleEntity.java b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/entity/ArticleEntity.java index 5768366568..eb2b026fb7 100644 --- a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/entity/ArticleEntity.java +++ b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/entity/ArticleEntity.java @@ -81,7 +81,7 @@ public class ArticleEntity extends BaseEpmetEntity { /** * 发布单位类型 机关:agency;部门:department;网格:grid */ - private Integer publisherType; + private String publisherType; /** * 发布时间 diff --git a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/entity/DraftEntity.java b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/entity/DraftEntity.java index d7fd299501..b3c7fd96b6 100644 --- a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/entity/DraftEntity.java +++ b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/entity/DraftEntity.java @@ -76,7 +76,7 @@ public class DraftEntity extends BaseEpmetEntity { /** * 发布单位类型 机关:agency;部门:department;网格:grid */ - private Integer publisherType; + private String publisherType; /** * 发布时间 diff --git a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/excel/ArticleExcel.java b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/excel/ArticleExcel.java index d1c47ccefb..a5f28f84a3 100644 --- a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/excel/ArticleExcel.java +++ b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/excel/ArticleExcel.java @@ -59,7 +59,7 @@ public class ArticleExcel { private String publisherName; @Excel(name = "发布单位类型 机关:agency;部门:department;网格:grid") - private Integer publisherType; + private String publisherType; @Excel(name = "发布时间") private Date publishDate; diff --git a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/excel/DraftExcel.java b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/excel/DraftExcel.java index 55cc07b78c..6f913525d7 100644 --- a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/excel/DraftExcel.java +++ b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/excel/DraftExcel.java @@ -56,7 +56,7 @@ public class DraftExcel { private String publisherName; @Excel(name = "发布单位类型 机关:agency;部门:department;网格:grid") - private Integer publisherType; + private String publisherType; @Excel(name = "发布时间") private Date publishDate; diff --git a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/ArticleService.java b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/ArticleService.java index ce2f27cfbc..9cae7ed196 100644 --- a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/ArticleService.java +++ b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/ArticleService.java @@ -19,7 +19,10 @@ package com.epmet.service; import com.epmet.commons.mybatis.service.BaseService; import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.security.dto.TokenDto; import com.epmet.dto.ArticleDTO; +import com.epmet.dto.result.ArticleGridResultDTO; +import com.epmet.dto.form.DraftContentFromDTO; import com.epmet.entity.ArticleEntity; import java.util.List; @@ -92,4 +95,19 @@ public interface ArticleService extends BaseService { * @date 2020-06-02 */ void delete(String[] ids); + + /** + * @param tokenDTO + * @return + * @Author sun + * @Description 党建声音-政府端-可选发布范围 + **/ + ArticleGridResultDTO agencyGridList(TokenDto tokenDTO); + + /** + * desc:保存或修改文章内容 + * @param fromDTO + * @return + */ + String saveOrUpdateContent(DraftContentFromDTO fromDTO); } \ No newline at end of file diff --git a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/ArticleServiceImpl.java b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/ArticleServiceImpl.java index 682df1669e..3b082d2776 100644 --- a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/ArticleServiceImpl.java +++ b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/ArticleServiceImpl.java @@ -17,25 +17,43 @@ package com.epmet.service.impl; +import com.alibaba.fastjson.JSON; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.commons.tools.constant.FieldConstant; +import com.epmet.commons.tools.exception.RenException; import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.security.dto.TokenDto; import com.epmet.commons.tools.utils.ConvertUtils; import com.epmet.commons.tools.constant.FieldConstant; +import com.epmet.commons.tools.utils.Result; +import com.epmet.commons.tools.validator.ValidatorUtils; +import com.epmet.commons.tools.validator.group.AddGroup; +import com.epmet.commons.tools.validator.group.DefaultGroup; import com.epmet.dao.ArticleDao; +import com.epmet.dao.DraftContentDao; +import com.epmet.dao.DraftDao; import com.epmet.dto.ArticleDTO; +import com.epmet.dto.feign.GovOrgSelfFeignClient; +import com.epmet.dto.result.ArticleGridResultDTO; +import com.epmet.dto.form.DraftContentFromDTO; import com.epmet.entity.ArticleEntity; +import com.epmet.entity.DraftContentEntity; +import com.epmet.entity.DraftEntity; import com.epmet.redis.ArticleRedis; import com.epmet.service.ArticleService; import org.apache.commons.lang3.StringUtils; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.util.CollectionUtils; -import java.util.Arrays; -import java.util.List; -import java.util.Map; +import java.util.*; +import java.util.stream.Collectors; /** * 文章表 @@ -48,57 +66,174 @@ public class ArticleServiceImpl extends BaseServiceImpl page(Map params) { - IPage page = baseDao.selectPage( - getPage(params, FieldConstant.CREATED_TIME, false), - getWrapper(params) - ); - return getPageData(page, ArticleDTO.class); - } - - @Override - public List list(Map params) { - List entityList = baseDao.selectList(getWrapper(params)); - - return ConvertUtils.sourceToTarget(entityList, ArticleDTO.class); - } - - private QueryWrapper getWrapper(Map params){ - String id = (String)params.get(FieldConstant.ID_HUMP); - - QueryWrapper wrapper = new QueryWrapper<>(); - wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); - - return wrapper; - } - - @Override - public ArticleDTO get(String id) { - ArticleEntity entity = baseDao.selectById(id); - return ConvertUtils.sourceToTarget(entity, ArticleDTO.class); - } - - @Override - @Transactional(rollbackFor = Exception.class) - public void save(ArticleDTO dto) { - ArticleEntity entity = ConvertUtils.sourceToTarget(dto, ArticleEntity.class); - insert(entity); - } - + @Autowired + private GovOrgSelfFeignClient govOrgSelfFeignClient; + private final Log logger = LogFactory.getLog(getClass()); + @Autowired + private ArticleRedis articleRedis; + + @Autowired + private DraftDao draftDao; + @Autowired + private DraftContentDao draftContentDao; + @Autowired + private ArticleDao articleDao; + + @Override + public PageData page(Map params) { + IPage page = baseDao.selectPage( + getPage(params, FieldConstant.CREATED_TIME, false), + getWrapper(params) + ); + return getPageData(page, ArticleDTO.class); + } + + @Override + public List list(Map params) { + List entityList = baseDao.selectList(getWrapper(params)); + + return ConvertUtils.sourceToTarget(entityList, ArticleDTO.class); + } + + private QueryWrapper getWrapper(Map params) { + String id = (String) params.get(FieldConstant.ID_HUMP); + + QueryWrapper wrapper = new QueryWrapper<>(); + wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); + + return wrapper; + } + + @Override + public ArticleDTO get(String id) { + ArticleEntity entity = baseDao.selectById(id); + return ConvertUtils.sourceToTarget(entity, ArticleDTO.class); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void save(ArticleDTO dto) { + ArticleEntity entity = ConvertUtils.sourceToTarget(dto, ArticleEntity.class); + insert(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(ArticleDTO dto) { + ArticleEntity entity = ConvertUtils.sourceToTarget(dto, ArticleEntity.class); + updateById(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void delete(String[] ids) { + // 逻辑删除(@TableLogic 注解) + baseDao.deleteBatchIds(Arrays.asList(ids)); + } + + /** + * @param tokenDTO + * @return + * @Author sun + * @Description 党建声音-政府端-可选发布范围 + **/ @Override - @Transactional(rollbackFor = Exception.class) - public void update(ArticleDTO dto) { - ArticleEntity entity = ConvertUtils.sourceToTarget(dto, ArticleEntity.class); - updateById(entity); + public ArticleGridResultDTO agencyGridList(TokenDto tokenDTO) { + Result result = govOrgSelfFeignClient.getAgencyGridList(tokenDTO.getUserId()); + return result.getData(); } - @Override - @Transactional(rollbackFor = Exception.class) - public void delete(String[] ids) { - // 逻辑删除(@TableLogic 注解) - baseDao.deleteBatchIds(Arrays.asList(ids)); - } + @Override + @Transactional(rollbackFor = Exception.class) + public String saveOrUpdateContent(DraftContentFromDTO fromDTO) { + logger.debug("saveOrUpdateContent param:" + JSON.toJSONString(fromDTO)); + ValidatorUtils.validateEntity(fromDTO, AddGroup.class, DefaultGroup.class); + boolean havePublished = StringUtils.isBlank(fromDTO.getArticleId()) ? false : true; + + if (havePublished) { + //TODO 校验文章是否已下线 + //.... + Map articleParamMap = new HashMap<>(); + articleParamMap.put("ARTICLE_ID", fromDTO.getArticleId()); + articleParamMap.put("ARTICLE_ID", fromDTO.getArticleId()); + articleDao.selectByMap(articleParamMap); + } + + DraftEntity draftEntity = null; + List draftContentList = null; + if (StringUtils.isNotBlank(fromDTO.getDraftId())) { + //TODO + + draftEntity = draftDao.selectById(fromDTO.getDraftId()); + if (draftEntity == null) { + logger.warn("saveOrUpdateContent draftId is not exist in db"); + throw new RenException("参数错误"); + } + draftEntity.setTitle(draftEntity.getTitle()); + draftEntity.setUpdatedTime(new Date()); + draftDao.updateById(draftEntity); + + } else { + draftEntity = new DraftEntity(); + draftEntity.setTitle(fromDTO.getTitle()); + draftDao.insert(draftEntity); + } + + if (CollectionUtils.isEmpty(draftContentList)) { + logger.warn("saveOrUpdateContent contentList is empty"); + throw new RenException("参数错误"); + } + draftContentList = buildDraftContent(fromDTO, havePublished); + //TODO 改为批量插入 + draftContentList.forEach(content -> draftContentDao.insert(content)); + + String draftId = draftEntity.getId(); + + + return null; + } + + /** + * desc:构建 内容对象 + * + * @param fromDTO + * @param havePublished + * @return + */ + private List buildDraftContent(DraftContentFromDTO fromDTO, boolean havePublished) { + //如果已发布 则需要校验内容是否更改过 没有更改则 不对审核状态进行重置 + List newContentList = new ArrayList<>(); + Map oldContentMap = null; + Map draftIdMap = new HashMap<>(); + draftIdMap.put("DRAFT_ID", fromDTO.getDraftId()); + if (havePublished) { + List oldContentEntities = draftContentDao.selectByMap(draftIdMap); + oldContentMap = oldContentEntities.stream().collect(Collectors.toMap(DraftContentEntity::getId, content -> content)); + //删掉所有 + draftContentDao.deleteByMap(draftIdMap); + } + List contentList = fromDTO.getContentList(); + + Map finalOldContentMap = oldContentMap; + Set orderNumSet = new HashSet<>(); + contentList.forEach(content -> { + if (finalOldContentMap != null && finalOldContentMap.get(content.getDraftId()) != null) { + DraftContentEntity oldContent = finalOldContentMap.get(content.getDraftId()); + if (oldContent.getContent().equals(content.getContent())) { + content.setAuditReason(oldContent.getAuditReason()); + content.setAuditStatus(oldContent.getAuditStatus()); + } + } + DraftContentEntity entity = ConvertUtils.sourceToTarget(content, DraftContentEntity.class); + entity.setId(content.getDraftId()); + orderNumSet.add(content.getOrderNum()); + newContentList.add(entity); + }); + if (orderNumSet.size() != newContentList.size()) { + logger.warn("saveOrUpdateContent contentList orderNum is repeat"); + throw new RenException("参数错误"); + } + return newContentList; + } } \ No newline at end of file diff --git a/epmet-module/gov-voice/gov-voice-server/src/main/resources/migration/epmet_gov_voice.sql b/epmet-module/gov-voice/gov-voice-server/src/main/resources/migration/epmet_gov_voice.sql new file mode 100644 index 0000000000..d616dd51e2 --- /dev/null +++ b/epmet-module/gov-voice/gov-voice-server/src/main/resources/migration/epmet_gov_voice.sql @@ -0,0 +1,269 @@ +/* + Date: 2/06/2020 16:13:38 +*/ + +-- SET NAMES utf8mb4; +-- #SET FOREIGN_KEY_CHECKS = 0; + +CREATE DATABASE `epmet_gov_access` DEFAULT CHARACTER SET utf8mb4; +CREATE TABLE tag_default( + ID VARCHAR(64) NOT NULL COMMENT '主键ID' , + TAG_NAME VARCHAR(32) NOT NULL COMMENT '标签名称' , + DEL_FLAG INT NOT NULL DEFAULT 0 COMMENT '删除标识 0.未删除 1.已删除' , + REVISION INT NOT NULL 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) +) COMMENT = '默认标签表 默认标签表'; + +ALTER TABLE tag_default COMMENT '默认标签表'; +CREATE TABLE tag_customer( + ID VARCHAR(64) NOT NULL COMMENT '主键ID' , + CUSTOMER_ID VARCHAR(64) NOT NULL COMMENT '客户ID' , + TAG_NAME VARCHAR(32) NOT NULL COMMENT '标签名称' , + USE_COUNT INT NOT NULL DEFAULT 0 COMMENT '使用计数' , + DEL_FLAG INT NOT NULL DEFAULT 0 COMMENT '删除标识 0.未删除 1.已删除' , + REVISION INT NOT NULL 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) +) COMMENT = '客户标签表 客户标签表'; + +ALTER TABLE tag_customer ADD INDEX INX_TAG_NAME(TAG_NAME); +ALTER TABLE tag_customer COMMENT '客户标签表'; +CREATE TABLE tag_grid( + ID VARCHAR(64) NOT NULL COMMENT '主键ID' , + CUSTOMER_ID VARCHAR(64) NOT NULL COMMENT '客户ID' , + GRID_ID VARCHAR(64) NOT NULL COMMENT '网格ID' , + TAG_ID VARCHAR(64) NOT NULL COMMENT '标签ID' , + TAG_NAME VARCHAR(32) NOT NULL COMMENT '标签名称' , + USE_COUNT INT NOT NULL DEFAULT 0 COMMENT '使用计数' , + DEL_FLAG INT NOT NULL DEFAULT 0 COMMENT '删除标识 0.未删除 1.已删除' , + REVISION INT NOT NULL 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) +) COMMENT = '网格标签表 网格标签表'; + +ALTER TABLE tag_grid COMMENT '网格标签表'; +CREATE TABLE article_tags( + ID VARCHAR(64) NOT NULL COMMENT '主键ID' , + CUSTOMER_ID VARCHAR(64) NOT NULL COMMENT '客户ID' , + ARTICLE_ID VARCHAR(64) NOT NULL COMMENT '文章ID' , + TAG_ID VARCHAR(64) NOT NULL COMMENT '标签ID' , + TAG_NAME VARCHAR(32) NOT NULL COMMENT '标签名称' , + DEL_FLAG INT NOT NULL DEFAULT 0 COMMENT '删除标识 0.未删除 1.已删除' , + REVISION INT NOT NULL 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) +) COMMENT = '文章标签表 文章标签表'; + +ALTER TABLE article_tags ADD INDEX IDX_ARTICLE_ID(ARTICLE_ID); +ALTER TABLE article_tags COMMENT '文章标签表'; +CREATE TABLE draft( + ID VARCHAR(64) NOT NULL COMMENT '主键ID' , + CUSTOMER_ID VARCHAR(64) NOT NULL COMMENT '客户ID' , + TITLE VARCHAR(128) NOT NULL COMMENT '文章标题' , + PREVIEW_CONTENT VARCHAR(512) NOT NULL COMMENT '文章内容 精简内容' , + IS_TOP INT NOT NULL COMMENT '是否置顶' , + PUBLISH_RANGE_DESC VARCHAR(512) NOT NULL COMMENT '发布范围描述 所有发布范围集合' , + PUBLISHER_ID VARCHAR(64) NOT NULL COMMENT '发布单位ID' , + PUBLISHER_NAME VARCHAR(128) NOT NULL COMMENT '发布单位名称' , + PUBLISHER_TYPE VARCHAR(32) NOT NULL COMMENT '发布单位类型 机关:agency;部门:department;网格:grid' , + PUBLISH_DATE DATE NOT NULL COMMENT '发布时间' , + STATUS_FLAG VARCHAR(32) NOT NULL COMMENT '发布状态 未发布:unpublish ;已发布:published,审核中:auditing,审核失败:auditfail' , + TAGS VARCHAR(512) NOT NULL COMMENT '文章标签串 竖杠分割的标签名称' , + ORG_ID VARCHAR(64) COMMENT '组织ID' , + ORG_ID_PATH VARCHAR(512) COMMENT '组织ID路径 eg:字段为def:abc' , + GRID_ID VARCHAR(64) COMMENT '网格ID 数据权限使用' , + DEPARTMENT_ID VARCHAR(32) COMMENT '部门ID 数据权限使用' , + DEL_FLAG INT NOT NULL DEFAULT 0 COMMENT '删除标识 0.未删除 1.已删除' , + REVISION INT NOT NULL 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) +) COMMENT = '草稿表 草稿表'; + +ALTER TABLE draft COMMENT '草稿表'; +CREATE TABLE draft_content( + ID VARCHAR(64) NOT NULL COMMENT '主键ID 主键ID' , + CUSTOMER_ID VARCHAR(64) NOT NULL COMMENT '客户ID' , + DRAFT_ID VARCHAR(64) NOT NULL COMMENT '草稿ID' , + CONTENT VARCHAR(1024) NOT NULL COMMENT '内容' , + CONTENT_TYPE VARCHAR(32) NOT NULL COMMENT '内容类型 图片:img;文字:text' , + AUDIT_STATUS VARCHAR(32) NOT NULL COMMENT '审核状态 通过:pass;失败:fail;' , + AUDIT_REASON VARCHAR(128) NOT NULL COMMENT '审核理由' , + ORDER_NUM INT NOT NULL COMMENT '内容顺序 从1开始' , + DEL_FLAG INT NOT NULL DEFAULT 0 COMMENT '删除标识 0.未删除 1.已删除' , + REVISION INT NOT NULL 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) +) COMMENT = '草稿内容表 草稿内容表'; + +ALTER TABLE draft_content COMMENT '草稿内容表'; +CREATE TABLE draft_publish_range( + ID VARCHAR(64) NOT NULL COMMENT '主键ID' , + CUSTOMER_ID VARCHAR(64) NOT NULL COMMENT '客户ID' , + DRAFT_ID VARCHAR(64) NOT NULL COMMENT 'ID草稿' , + GRID_ID VARCHAR(64) NOT NULL COMMENT '网格ID' , + OFF_LINE_TIME DATETIME COMMENT '下线时间' , + PUBLISH_STATUS VARCHAR(32) NOT NULL COMMENT '发布状态 未发布:unpublish ;已发布:published' , + DEL_FLAG INT NOT NULL DEFAULT 0 COMMENT '删除标识 0.未删除 1.已删除' , + REVISION INT NOT NULL 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) +) COMMENT = '草稿发布范围表 草稿发布范围表'; + +ALTER TABLE draft_publish_range COMMENT '草稿发布范围表'; +CREATE TABLE draft_cover( + ID VARCHAR(64) NOT NULL COMMENT '主键ID' , + CUSTOMER_ID VARCHAR(64) NOT NULL COMMENT '客户ID' , + DRAFT_ID VARCHAR(64) NOT NULL COMMENT '草稿ID' , + IMG_URL VARCHAR(512) NOT NULL COMMENT '封面图片地址 url地址' , + AUDIT_STATUS VARCHAR(32) NOT NULL COMMENT '审核状态 通过:pass;失败:fail;' , + AUDIT_REASON VARCHAR(128) NOT NULL COMMENT '审核理由' , + DEL_FLAG INT NOT NULL DEFAULT 0 COMMENT '删除标识 0.未删除 1.已删除' , + REVISION INT NOT NULL 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) +) COMMENT = '草稿封面表 草稿封面表'; + +ALTER TABLE draft_cover COMMENT '草稿封面表'; +CREATE TABLE article( + ID VARCHAR(64) NOT NULL COMMENT '主键ID' , + CUSTOMER_ID VARCHAR(64) NOT NULL COMMENT '客户ID' , + DRAFT_ID VARCHAR(64) NOT NULL COMMENT '草稿ID' , + TITLE VARCHAR(128) NOT NULL COMMENT '文章标题' , + PREVIEW_CONTENT VARCHAR(512) NOT NULL COMMENT '文章内容 精简内容' , + IS_TOP INT NOT NULL COMMENT '是否置顶' , + PUBLISH_RANGE_DESC VARCHAR(512) NOT NULL COMMENT '发布范围描述 所有发布范围集合' , + PUBLISHER_ID VARCHAR(64) NOT NULL COMMENT '发布单位ID' , + PUBLISHER_NAME VARCHAR(128) NOT NULL COMMENT '发布单位名称' , + PUBLISHER_TYPE VARCHAR(32) NOT NULL COMMENT '发布单位类型 机关:agency;部门:department;网格:grid' , + PUBLISH_DATE DATE NOT NULL COMMENT '发布时间' , + STATUS_FLAG VARCHAR(32) NOT NULL DEFAULT 0 COMMENT '发布状态 已发布:published;已下线:offline' , + OFF_LINE_TIME DATETIME COMMENT '下线时间' , + TAGS VARCHAR(512) COMMENT '文章标签串 竖杠分割的标签名称' , + ORG_ID VARCHAR(64) COMMENT '组织ID' , + ORG_ID_PATH VARCHAR(512) COMMENT '组织ID路径 eg:字段为def:abc' , + GRID_ID VARCHAR(64) COMMENT '网格ID 数据权限使用' , + DEPARTMENT_ID VARCHAR(32) COMMENT '部门ID 数据权限使用' , + DEL_FLAG INT NOT NULL DEFAULT 0 COMMENT '删除标识 0.未删除 1.已删除' , + REVISION INT NOT NULL 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) +) COMMENT = '文章表 正式文章表'; + +ALTER TABLE article COMMENT '文章表'; +CREATE TABLE article_content( + ID VARCHAR(64) NOT NULL COMMENT '主键ID 主键ID' , + CUSTOMER_ID VARCHAR(64) NOT NULL COMMENT '客户ID' , + ARTICLE_ID VARCHAR(64) NOT NULL COMMENT '文章ID' , + CONTENT VARCHAR(1024) NOT NULL COMMENT '内容' , + CONTENT_TYPE VARCHAR(32) NOT NULL COMMENT '内容类型 图片:img;文字:text' , + AUDIT_STATUS VARCHAR(32) NOT NULL COMMENT '审核状态 通过:pass;失败:fail;审核中:auditing' , + AUDIT_REASON VARCHAR(128) NOT NULL COMMENT '审核理由' , + ORDER_NUM INT NOT NULL COMMENT '内容顺序 从1开始' , + DEL_FLAG INT NOT NULL DEFAULT 0 COMMENT '删除标识 0.未删除 1.已删除' , + REVISION INT NOT NULL 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) +) COMMENT = '文章内容表 文章内容表'; + +ALTER TABLE article_content COMMENT '文章内容表'; +CREATE TABLE article_cover( + ID VARCHAR(64) NOT NULL COMMENT '主键ID' , + CUSTOMER_ID VARCHAR(64) NOT NULL COMMENT '客户ID' , + ARTICLE_ID VARCHAR(64) NOT NULL COMMENT '文章ID' , + IMG_URL VARCHAR(512) NOT NULL COMMENT '封面图片地址 url地址' , + AUDIT_STATUS VARCHAR(32) NOT NULL COMMENT '审核状态 通过:pass;失败:fail;审核中:auditing' , + AUDIT_REASON VARCHAR(128) NOT NULL COMMENT '审核理由' , + DEL_FLAG INT NOT NULL DEFAULT 0 COMMENT '删除标识 0.未删除 1.已删除' , + REVISION INT NOT NULL 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) +) COMMENT = '文章封面表 文章封面表'; + +ALTER TABLE article_cover COMMENT '文章封面表'; +CREATE TABLE article_publish_range( + ID VARCHAR(64) NOT NULL COMMENT '主键ID' , + CUSTOMER_ID VARCHAR(64) NOT NULL COMMENT '客户ID' , + ARTICLE_ID VARCHAR(64) NOT NULL COMMENT '文章ID' , + GRID_ID VARCHAR(64) NOT NULL COMMENT '网格ID' , + OFF_LINE_TIME DATETIME COMMENT '下线时间' , + PUBLISH_STATUS VARCHAR(32) NOT NULL COMMENT '发布状态' , + DEL_FLAG INT NOT NULL DEFAULT 0 COMMENT '删除标识 0.未删除 1.已删除' , + REVISION INT NOT NULL 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) +) COMMENT = '文章发布范围表 文章发布范围表'; + +ALTER TABLE article_publish_range ADD INDEX IDX_ARTICLE_ID(ARTICLE_ID); +ALTER TABLE article_publish_range COMMENT '文章发布范围表'; +CREATE TABLE article_operate_record( + ID VARCHAR(64) NOT NULL COMMENT '主键ID 主键ID' , + CUSTOMER_ID VARCHAR(64) NOT NULL COMMENT '客户ID' , + ARTICLE_ID VARCHAR(64) NOT NULL COMMENT '文章ID' , + OP_USER VARCHAR(128) NOT NULL COMMENT '执行人 xx街道-xx中心-姓名' , + CONTENT VARCHAR(512) NOT NULL COMMENT '操作内容 操作内容,eg:重新编辑文章;' , + OP_TYPE VARCHAR(32) NOT NULL COMMENT '操作类型 发布文章:publish;取消文章置顶:canceltop;设置置顶:settom;下线文章:offline;修改文章发布范围:updatepublishrange' , + OP_TIME DATETIME NOT NULL COMMENT '操作时间' , + DEL_FLAG INT NOT NULL DEFAULT 0 COMMENT '删除标识 0.未删除 1.已删除' , + REVISION INT NOT NULL 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) +) COMMENT = '文章操作记录表 文章操作记录表'; + +ALTER TABLE article_operate_record COMMENT '文章操作记录表'; +CREATE TABLE article_visit_record( + ID VARCHAR(64) NOT NULL COMMENT '主键ID' , + CUSTOMER_ID VARCHAR(64) NOT NULL COMMENT '客户ID' , + GRID_ID VARCHAR(64) NOT NULL COMMENT '网格ID' , + ARTICLE_ID VARCHAR(64) NOT NULL COMMENT '文章ID' , + USER_ID VARCHAR(64) NOT NULL COMMENT '用户ID' , + DEL_FLAG INT NOT NULL DEFAULT 0 COMMENT '删除标识 0.未删除 1.已删除' , + REVISION INT NOT NULL 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) +) COMMENT = '文章访问记录表 文章访问记录表'; + +ALTER TABLE article_visit_record ADD UNIQUE UNX_INDEX(ARTICLE_ID,GRID_ID,USER_ID); +ALTER TABLE article_visit_record COMMENT '文章访问记录表'; diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/CustomerStaffRoleListFormDTO.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/CustomerStaffRoleListFormDTO.java new file mode 100644 index 0000000000..050dc62091 --- /dev/null +++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/CustomerStaffRoleListFormDTO.java @@ -0,0 +1,26 @@ +package com.epmet.dto.form; + +import lombok.Data; + +import javax.validation.constraints.NotBlank; +import java.io.Serializable; + +/** + * @Description 查询客户下人员拥有的角色列表-接口入参 + * @Author sun + */ +@Data +public class CustomerStaffRoleListFormDTO implements Serializable{ + private static final long serialVersionUID = -7994579456530273809L; + + /** + * 客户Id + * */ + private String customerId; + /** + * 用户Id + * */ + @NotBlank(message = "用户Id不能为空") + private String staffId; + +} diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/CustomerStaffRoleListResultDTO.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/CustomerStaffRoleListResultDTO.java new file mode 100644 index 0000000000..66b843e924 --- /dev/null +++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/CustomerStaffRoleListResultDTO.java @@ -0,0 +1,41 @@ +package com.epmet.dto.result; + +import lombok.Data; + +import java.io.Serializable; +import java.util.List; + +/** + * @Description 根据客户Id staffId查询人员在客户下的角色列表-接口返参 + * @Author sun + */ +@Data +public class CustomerStaffRoleListResultDTO implements Serializable { + private static final long serialVersionUID = -2049883620062097446L; + + /** + * 客户Id + * */ + private String customerId; + /** + * 员工Id + * */ + private String staffId; + /** + * 员工姓名 + * */ + private String staffName; + /** + * 角色Id + * */ + private String roleId; + /** + * 角色Key + * */ + private String roleKey; + /** + * 角色名称 + * */ + private String roleName; + +} diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/feign/EpmetUserSelfFeignClient.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/feign/EpmetUserSelfFeignClient.java new file mode 100644 index 0000000000..1a944da826 --- /dev/null +++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/feign/EpmetUserSelfFeignClient.java @@ -0,0 +1,29 @@ +package com.epmet.feign; + +import com.epmet.commons.tools.constant.ServiceConstant; +import com.epmet.commons.tools.utils.Result; +import com.epmet.dto.form.CustomerStaffRoleListFormDTO; +import com.epmet.dto.result.CustomerStaffRoleListResultDTO; +import com.epmet.feign.fallback.EpmetUserSelfFeignClientFallBack; +import org.springframework.cloud.openfeign.FeignClient; +import org.springframework.web.bind.annotation.PostMapping; + +import java.util.List; + +/** + * @dscription epmet-user服务 + * @author sun + */ +@FeignClient(name = ServiceConstant.EPMET_USER_SERVER, fallback = EpmetUserSelfFeignClientFallBack.class) +public interface EpmetUserSelfFeignClient { + + /** + * @param formDTO + * @return + * @Author sun + * @Description 根据客户Id和staffId查询一个员工在指定客户下的角色列表 + **/ + @PostMapping("/epmetuser/staffrole/getcustomerstaffrolelist") + Result> getCustomerStaffRoleList(CustomerStaffRoleListFormDTO formDTO); + +} diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/feign/fallback/EpmetUserSelfFeignClientFallBack.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/feign/fallback/EpmetUserSelfFeignClientFallBack.java new file mode 100644 index 0000000000..4f14d7eac4 --- /dev/null +++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/feign/fallback/EpmetUserSelfFeignClientFallBack.java @@ -0,0 +1,24 @@ +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.dto.form.CustomerStaffRoleListFormDTO; +import com.epmet.dto.result.CustomerStaffRoleListResultDTO; +import com.epmet.feign.EpmetUserSelfFeignClient; +import org.springframework.stereotype.Component; + +import java.util.List; + +/** + * @dscription epmet-user服务 + * @author sun + */ +@Component +public class EpmetUserSelfFeignClientFallBack implements EpmetUserSelfFeignClient { + + @Override + public Result> getCustomerStaffRoleList(CustomerStaffRoleListFormDTO formDTO) { + return ModuleUtils.feignConError(ServiceConstant.EPMET_USER_SERVER, "getCustomerStaffRoleList", formDTO); + } +} diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/StaffRoleController.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/StaffRoleController.java index 7b9424076f..5e86a9a74c 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/StaffRoleController.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/StaffRoleController.java @@ -5,10 +5,8 @@ import com.epmet.commons.mybatis.entity.DataScope; import com.epmet.commons.tools.utils.Result; import com.epmet.commons.tools.validator.ValidatorUtils; import com.epmet.dto.GovStaffRoleDTO; -import com.epmet.dto.form.CommonUserFormDTO; -import com.epmet.dto.form.CustomerRoleFormDTO; -import com.epmet.dto.form.RolesUsersListFormDTO; -import com.epmet.dto.form.StaffRoleFormDTO; +import com.epmet.dto.form.*; +import com.epmet.dto.result.CustomerStaffRoleListResultDTO; import com.epmet.dto.result.GovStaffRoleResultDTO; import com.epmet.dto.result.StaffRolesResultDTO; import com.epmet.entity.GovStaffRoleEntity; @@ -142,4 +140,14 @@ public class StaffRoleController { GovStaffRoleDTO role = govStaffRoleService.getRoleByCustomerIdAndRoleKey(form.getCustomerId(), form.getRoleKey()); return new Result().ok(role); } + + /** + * @Description 根据客户Id和staffId查询一个员工在指定客户下的角色列表 + * @Author sun + **/ + @PostMapping("getcustomerstaffrolelist") + public Result> getCustomerStaffRoleList(@RequestBody CustomerStaffRoleListFormDTO formDTO) { + ValidatorUtils.validateEntity(formDTO); + return new Result>().ok(staffRoleService.getCustomerStaffRoleList(formDTO)); + } } diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/StaffRoleDao.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/StaffRoleDao.java index c7e1be6e9c..c376850ac1 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/StaffRoleDao.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/StaffRoleDao.java @@ -22,10 +22,8 @@ import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.commons.mybatis.entity.DataScope; import com.epmet.dto.StaffRoleDTO; import com.epmet.dto.form.CommonUserFormDTO; -import com.epmet.dto.result.CustomerStaffRoleResultDTO; -import com.epmet.dto.result.GovStaffRoleResultDTO; -import com.epmet.dto.result.StaffListResultDTO; -import com.epmet.dto.result.StaffRolesResultDTO; +import com.epmet.dto.form.CustomerStaffRoleListFormDTO; +import com.epmet.dto.result.*; import com.epmet.entity.StaffRoleEntity; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; @@ -85,4 +83,10 @@ public interface StaffRoleDao extends BaseDao { * @Description 根据staffId集合查询人员拥有的所有角色信息 **/ List selectStaffRoleList(@Param("staffIdList") List staffIdList); + + /** + * @Description 根据客户Id和staffId查询一个员工在指定客户下的角色列表 + * @Author sun + **/ + List selectCustomerStaffRoleList(CustomerStaffRoleListFormDTO formDTO); } \ No newline at end of file diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/StaffRoleService.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/StaffRoleService.java index 04dfb2d94f..d8de0777d0 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/StaffRoleService.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/StaffRoleService.java @@ -23,7 +23,9 @@ import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.utils.Result; import com.epmet.dto.StaffRoleDTO; import com.epmet.dto.form.CommonUserFormDTO; +import com.epmet.dto.form.CustomerStaffRoleListFormDTO; import com.epmet.dto.form.RolesUsersListFormDTO; +import com.epmet.dto.result.CustomerStaffRoleListResultDTO; import com.epmet.dto.result.GovStaffRoleResultDTO; import com.epmet.dto.result.StaffRolesResultDTO; import com.epmet.entity.StaffRoleEntity; @@ -130,4 +132,10 @@ public interface StaffRoleService extends BaseService { * @date 2020.04.29 23:44 **/ Result> getSpecificRolesStaffs(RolesUsersListFormDTO rolesUsersListFormDTO); + + /** + * @Description 根据客户Id和staffId查询一个员工在指定客户下的角色列表 + * @Author sun + **/ + List getCustomerStaffRoleList(CustomerStaffRoleListFormDTO formDTO); } \ No newline at end of file diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/StaffRoleServiceImpl.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/StaffRoleServiceImpl.java index a38188f700..07181e174e 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/StaffRoleServiceImpl.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/StaffRoleServiceImpl.java @@ -31,7 +31,9 @@ import com.epmet.dao.GovStaffRoleTemplateDao; import com.epmet.dao.StaffRoleDao; import com.epmet.dto.StaffRoleDTO; import com.epmet.dto.form.CommonUserFormDTO; +import com.epmet.dto.form.CustomerStaffRoleListFormDTO; import com.epmet.dto.form.RolesUsersListFormDTO; +import com.epmet.dto.result.CustomerStaffRoleListResultDTO; import com.epmet.dto.result.GovStaffRoleResultDTO; import com.epmet.dto.result.GovStaffRoleTemplateDTO; import com.epmet.dto.result.StaffRolesResultDTO; @@ -163,4 +165,13 @@ public class StaffRoleServiceImpl extends BaseServiceImpl>().ok(new ArrayList<>()); } + /** + * @Description 根据客户Id和staffId查询一个员工在指定客户下的角色列表 + * @Author sun + **/ + @Override + public List getCustomerStaffRoleList(CustomerStaffRoleListFormDTO formDTO) { + return baseDao.selectCustomerStaffRoleList(formDTO); + } + } \ No newline at end of file diff --git a/epmet-user/epmet-user-server/src/main/resources/mapper/StaffRoleDao.xml b/epmet-user/epmet-user-server/src/main/resources/mapper/StaffRoleDao.xml index 1f570a073d..a90bdc4938 100644 --- a/epmet-user/epmet-user-server/src/main/resources/mapper/StaffRoleDao.xml +++ b/epmet-user/epmet-user-server/src/main/resources/mapper/StaffRoleDao.xml @@ -119,4 +119,27 @@ sr.staff_id = #{staffId} + \ No newline at end of file