Browse Source

Merge remote-tracking branch 'origin/feature/phaseOne'

# Conflicts:
#	epdc-cloud-client-yushan
#	epdc-cloud-commons-yushan
feature/test
liuchuang 5 years ago
parent
commit
4e129ce4ed
  1. 88
      epdc-cloud-admin/src/main/java/com/elink/esua/epdc/controller/AdminImgController.java
  2. 94
      epdc-cloud-admin/src/main/java/com/elink/esua/epdc/controller/PartyOrgController.java
  3. 106
      epdc-cloud-admin/src/main/java/com/elink/esua/epdc/controller/PartyOrgTypeController.java
  4. 88
      epdc-cloud-admin/src/main/java/com/elink/esua/epdc/controller/SysDeptInfoController.java
  5. 12
      epdc-cloud-admin/src/main/java/com/elink/esua/epdc/controller/SysRoleController.java
  6. 2
      epdc-cloud-admin/src/main/java/com/elink/esua/epdc/controller/v2/SysRoleV2Controller.java
  7. 33
      epdc-cloud-admin/src/main/java/com/elink/esua/epdc/dao/AdminImgDao.java
  8. 57
      epdc-cloud-admin/src/main/java/com/elink/esua/epdc/dao/PartyOrgDao.java
  9. 67
      epdc-cloud-admin/src/main/java/com/elink/esua/epdc/dao/PartyOrgTypeDao.java
  10. 33
      epdc-cloud-admin/src/main/java/com/elink/esua/epdc/dao/SysDeptInfoDao.java
  11. 10
      epdc-cloud-admin/src/main/java/com/elink/esua/epdc/dao/SysRoleDao.java
  12. 56
      epdc-cloud-admin/src/main/java/com/elink/esua/epdc/entity/AdminImgEntity.java
  13. 106
      epdc-cloud-admin/src/main/java/com/elink/esua/epdc/entity/PartyOrgEntity.java
  14. 61
      epdc-cloud-admin/src/main/java/com/elink/esua/epdc/entity/PartyOrgTypeEntity.java
  15. 91
      epdc-cloud-admin/src/main/java/com/elink/esua/epdc/entity/SysDeptInfoEntity.java
  16. 44
      epdc-cloud-admin/src/main/java/com/elink/esua/epdc/excel/PartyOrgExcel.java
  17. 68
      epdc-cloud-admin/src/main/java/com/elink/esua/epdc/excel/PartyOrgTypeExcel.java
  18. 55
      epdc-cloud-admin/src/main/java/com/elink/esua/epdc/feign/NewsFeignClient.java
  19. 35
      epdc-cloud-admin/src/main/java/com/elink/esua/epdc/feign/fallback/NewsFeignClientFallback.java
  20. 47
      epdc-cloud-admin/src/main/java/com/elink/esua/epdc/redis/PartyOrgRedis.java
  21. 47
      epdc-cloud-admin/src/main/java/com/elink/esua/epdc/redis/PartyOrgTypeRedis.java
  22. 107
      epdc-cloud-admin/src/main/java/com/elink/esua/epdc/service/AdminImgService.java
  23. 105
      epdc-cloud-admin/src/main/java/com/elink/esua/epdc/service/PartyOrgService.java
  24. 106
      epdc-cloud-admin/src/main/java/com/elink/esua/epdc/service/PartyOrgTypeService.java
  25. 106
      epdc-cloud-admin/src/main/java/com/elink/esua/epdc/service/SysDeptInfoService.java
  26. 17
      epdc-cloud-admin/src/main/java/com/elink/esua/epdc/service/SysRoleService.java
  27. 110
      epdc-cloud-admin/src/main/java/com/elink/esua/epdc/service/impl/AdminImgServiceImpl.java
  28. 138
      epdc-cloud-admin/src/main/java/com/elink/esua/epdc/service/impl/PartyOrgServiceImpl.java
  29. 143
      epdc-cloud-admin/src/main/java/com/elink/esua/epdc/service/impl/PartyOrgTypeServiceImpl.java
  30. 109
      epdc-cloud-admin/src/main/java/com/elink/esua/epdc/service/impl/SysDeptInfoServiceImpl.java
  31. 104
      epdc-cloud-admin/src/main/java/com/elink/esua/epdc/service/impl/SysDeptServiceImpl.java
  32. 27
      epdc-cloud-admin/src/main/java/com/elink/esua/epdc/service/impl/SysRoleServiceImpl.java
  33. 20
      epdc-cloud-admin/src/main/resources/mapper/AdminImgDao.xml
  34. 54
      epdc-cloud-admin/src/main/resources/mapper/PartyOrgDao.xml
  35. 50
      epdc-cloud-admin/src/main/resources/mapper/PartyOrgTypeDao.xml
  36. 26
      epdc-cloud-admin/src/main/resources/mapper/SysDeptInfoDao.xml
  37. 4
      epdc-cloud-admin/src/main/resources/mapper/SysRoleDao.xml
  38. 2
      epdc-cloud-client-yushan
  39. 2
      epdc-cloud-commons-yushan

88
epdc-cloud-admin/src/main/java/com/elink/esua/epdc/controller/AdminImgController.java

@ -0,0 +1,88 @@
/**
* 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.elink.esua.epdc.controller;
import com.elink.esua.epdc.commons.tools.page.PageData;
import com.elink.esua.epdc.commons.tools.utils.ExcelUtils;
import com.elink.esua.epdc.commons.tools.utils.Result;
import com.elink.esua.epdc.commons.tools.validator.AssertUtils;
import com.elink.esua.epdc.commons.tools.validator.ValidatorUtils;
import com.elink.esua.epdc.commons.tools.validator.group.AddGroup;
import com.elink.esua.epdc.commons.tools.validator.group.UpdateGroup;
import com.elink.esua.epdc.commons.tools.validator.group.DefaultGroup;
import com.elink.esua.epdc.dto.AdminImgDTO;
import com.elink.esua.epdc.service.AdminImgService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
import java.util.Map;
/**
* 图片表 图片表
*
* @author qu qu@elink-cn.com
* @since v1.0.0 2021-08-10
*/
@RestController
@RequestMapping("adminimg")
public class AdminImgController {
@Autowired
private AdminImgService adminImgService;
@GetMapping("page")
public Result<PageData<AdminImgDTO>> page(@RequestParam Map<String, Object> params){
PageData<AdminImgDTO> page = adminImgService.page(params);
return new Result<PageData<AdminImgDTO>>().ok(page);
}
@GetMapping("{id}")
public Result<AdminImgDTO> get(@PathVariable("id") String id){
AdminImgDTO data = adminImgService.get(id);
return new Result<AdminImgDTO>().ok(data);
}
@PostMapping
public Result save(@RequestBody AdminImgDTO dto){
//效验数据
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class);
adminImgService.save(dto);
return new Result();
}
@PutMapping
public Result update(@RequestBody AdminImgDTO dto){
//效验数据
ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class);
adminImgService.update(dto);
return new Result();
}
@DeleteMapping
public Result delete(@RequestBody String[] ids){
//效验数据
AssertUtils.isArrayEmpty(ids, "id");
adminImgService.delete(ids);
return new Result();
}
}

94
epdc-cloud-admin/src/main/java/com/elink/esua/epdc/controller/PartyOrgController.java

@ -0,0 +1,94 @@
/**
* 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.elink.esua.epdc.controller;
import com.elink.esua.epdc.commons.tools.page.PageData;
import com.elink.esua.epdc.commons.tools.utils.ExcelUtils;
import com.elink.esua.epdc.commons.tools.utils.Result;
import com.elink.esua.epdc.commons.tools.validator.AssertUtils;
import com.elink.esua.epdc.commons.tools.validator.ValidatorUtils;
import com.elink.esua.epdc.commons.tools.validator.group.AddGroup;
import com.elink.esua.epdc.commons.tools.validator.group.UpdateGroup;
import com.elink.esua.epdc.commons.tools.validator.group.DefaultGroup;
import com.elink.esua.epdc.dto.PartyOrgDTO;
import com.elink.esua.epdc.excel.PartyOrgExcel;
import com.elink.esua.epdc.service.PartyOrgService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
import java.util.Map;
/**
* 党组织表 党组织表
*
* @author qu qu@elink-cn.com
* @since v1.0.0 2021-08-06
*/
@RestController
@RequestMapping("partyorg")
public class PartyOrgController {
@Autowired
private PartyOrgService partyOrgService;
@GetMapping("page")
public Result<PageData<PartyOrgDTO>> page(@RequestParam Map<String, Object> params){
PageData<PartyOrgDTO> page = partyOrgService.page(params);
return new Result<PageData<PartyOrgDTO>>().ok(page);
}
@GetMapping("{id}")
public Result<PartyOrgDTO> get(@PathVariable("id") String id){
PartyOrgDTO data = partyOrgService.get(id);
return new Result<PartyOrgDTO>().ok(data);
}
@PostMapping
public Result save(@RequestBody PartyOrgDTO dto){
//效验数据
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class);
partyOrgService.save(dto);
return new Result();
}
@PutMapping
public Result update(@RequestBody PartyOrgDTO dto){
//效验数据
ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class);
partyOrgService.update(dto);
return new Result();
}
@DeleteMapping
public Result delete(@RequestBody String[] ids){
//效验数据
AssertUtils.isArrayEmpty(ids, "id");
partyOrgService.delete(ids);
return new Result();
}
@GetMapping("export")
public void export(@RequestParam Map<String, Object> params, HttpServletResponse response) throws Exception {
List<PartyOrgDTO> list = partyOrgService.selectListPartyOrg(params);
ExcelUtils.exportExcelToTarget(response, "党组织管理", list, PartyOrgExcel.class);
}
}

106
epdc-cloud-admin/src/main/java/com/elink/esua/epdc/controller/PartyOrgTypeController.java

@ -0,0 +1,106 @@
/**
* 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.elink.esua.epdc.controller;
import com.elink.esua.epdc.commons.tools.page.PageData;
import com.elink.esua.epdc.commons.tools.utils.ExcelUtils;
import com.elink.esua.epdc.commons.tools.utils.Result;
import com.elink.esua.epdc.commons.tools.validator.AssertUtils;
import com.elink.esua.epdc.commons.tools.validator.ValidatorUtils;
import com.elink.esua.epdc.commons.tools.validator.group.AddGroup;
import com.elink.esua.epdc.commons.tools.validator.group.UpdateGroup;
import com.elink.esua.epdc.commons.tools.validator.group.DefaultGroup;
import com.elink.esua.epdc.dto.PartyOrgTypeDTO;
import com.elink.esua.epdc.dto.PartyOrgTypeSelectDTO;
import com.elink.esua.epdc.excel.PartyOrgTypeExcel;
import com.elink.esua.epdc.service.PartyOrgTypeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
import java.util.Map;
/**
* 党组织类型表 党组织类型表
*
* @author qu qu@elink-cn.com
* @since v1.0.0 2021-08-06
*/
@RestController
@RequestMapping("partyorgtype")
public class PartyOrgTypeController {
@Autowired
private PartyOrgTypeService partyOrgTypeService;
@GetMapping("page")
public Result<PageData<PartyOrgTypeDTO>> page(@RequestParam Map<String, Object> params){
PageData<PartyOrgTypeDTO> page = partyOrgTypeService.page(params);
return new Result<PageData<PartyOrgTypeDTO>>().ok(page);
}
@GetMapping("{id}")
public Result<PartyOrgTypeDTO> get(@PathVariable("id") String id){
PartyOrgTypeDTO data = partyOrgTypeService.get(id);
return new Result<PartyOrgTypeDTO>().ok(data);
}
@PostMapping
public Result save(@RequestBody PartyOrgTypeDTO dto){
//效验数据
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class);
partyOrgTypeService.save(dto);
return new Result();
}
@PutMapping
public Result update(@RequestBody PartyOrgTypeDTO dto){
//效验数据
ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class);
partyOrgTypeService.update(dto);
return new Result();
}
@DeleteMapping
public Result delete(@RequestBody String[] ids){
//效验数据
AssertUtils.isArrayEmpty(ids, "id");
partyOrgTypeService.delete(ids);
return new Result();
}
@GetMapping("export")
public void export(@RequestParam Map<String, Object> params, HttpServletResponse response) throws Exception {
List<PartyOrgTypeDTO> list = partyOrgTypeService.list(params);
ExcelUtils.exportExcelToTarget(response, null, list, PartyOrgTypeExcel.class);
}
/*
* 获取 党组织类型用于下拉选项
* @param
* @return com.elink.esua.epdc.commons.tools.utils.Result<java.util.List<com.elink.esua.epdc.dto.PartyOrgTypeSelectDTO>>
* @Author zhangyong
* @Date 15:28 2021-08-06
**/
@GetMapping("getPartyOrgType")
public Result<List<PartyOrgTypeSelectDTO>> getPartyOrgType() {
return new Result<List<PartyOrgTypeSelectDTO>>().ok(partyOrgTypeService.getPartyOrgType());
}
}

88
epdc-cloud-admin/src/main/java/com/elink/esua/epdc/controller/SysDeptInfoController.java

@ -0,0 +1,88 @@
/**
* 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.elink.esua.epdc.controller;
import com.elink.esua.epdc.commons.tools.page.PageData;
import com.elink.esua.epdc.commons.tools.utils.ExcelUtils;
import com.elink.esua.epdc.commons.tools.utils.Result;
import com.elink.esua.epdc.commons.tools.validator.AssertUtils;
import com.elink.esua.epdc.commons.tools.validator.ValidatorUtils;
import com.elink.esua.epdc.commons.tools.validator.group.AddGroup;
import com.elink.esua.epdc.commons.tools.validator.group.UpdateGroup;
import com.elink.esua.epdc.commons.tools.validator.group.DefaultGroup;
import com.elink.esua.epdc.dto.SysDeptInfoDTO;
import com.elink.esua.epdc.service.SysDeptInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
import java.util.Map;
/**
* 部门信息表 组织信息表
*
* @author qu qu@elink-cn.com
* @since v1.0.0 2021-08-10
*/
@RestController
@RequestMapping("sysdeptinfo")
public class SysDeptInfoController {
@Autowired
private SysDeptInfoService sysDeptInfoService;
@GetMapping("page")
public Result<PageData<SysDeptInfoDTO>> page(@RequestParam Map<String, Object> params){
PageData<SysDeptInfoDTO> page = sysDeptInfoService.page(params);
return new Result<PageData<SysDeptInfoDTO>>().ok(page);
}
@GetMapping("{id}")
public Result<SysDeptInfoDTO> get(@PathVariable("id") String id){
SysDeptInfoDTO data = sysDeptInfoService.get(id);
return new Result<SysDeptInfoDTO>().ok(data);
}
@PostMapping
public Result save(@RequestBody SysDeptInfoDTO dto){
//效验数据
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class);
sysDeptInfoService.save(dto);
return new Result();
}
@PutMapping
public Result update(@RequestBody SysDeptInfoDTO dto){
//效验数据
ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class);
sysDeptInfoService.update(dto);
return new Result();
}
@DeleteMapping
public Result delete(@RequestBody String[] ids){
//效验数据
AssertUtils.isArrayEmpty(ids, "id");
sysDeptInfoService.delete(ids);
return new Result();
}
}

12
epdc-cloud-admin/src/main/java/com/elink/esua/epdc/controller/SysRoleController.java

@ -158,4 +158,16 @@ public class SysRoleController {
return new Result(); return new Result();
} }
/**
* @describe: 根据用户ID查询角色ID用逗号隔开
* @author wangtong
* @date 2021/8/10 16:05
* @params [userId]
* @return com.elink.esua.epdc.commons.tools.utils.Result<java.util.List<com.elink.esua.epdc.dto.SysRoleDTO>>
*/
@GetMapping("getRoleStringIdsByUserId/{userId}")
public Result<String> getRoleStringIdsByUserId(@PathVariable("userId") Long userId) {
String roleStringList = sysRoleService.getRoleStringIdsByUserId(userId);
return new Result<String>().ok(roleStringList);
}
} }

2
epdc-cloud-admin/src/main/java/com/elink/esua/epdc/controller/v2/SysRoleV2Controller.java

@ -61,6 +61,8 @@ public class SysRoleV2Controller {
data.setCategoryIdList(sysRoleService.getCategoryIdList(id)); data.setCategoryIdList(sysRoleService.getCategoryIdList(id));
//查询角色对应的吹哨部门 //查询角色对应的吹哨部门
data.setWhistleDeptIdList(sysRoleService.getWhistleDeptIdList(id)); data.setWhistleDeptIdList(sysRoleService.getWhistleDeptIdList(id));
//查询角色对应的栏目权限
data.setModuleMenuIdList(sysRoleService.getModuleMenuIdList(id));
return new Result<SysRoleDTO>().ok(data); return new Result<SysRoleDTO>().ok(data);
} }

33
epdc-cloud-admin/src/main/java/com/elink/esua/epdc/dao/AdminImgDao.java

@ -0,0 +1,33 @@
/**
* 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.elink.esua.epdc.dao;
import com.elink.esua.epdc.commons.mybatis.dao.BaseDao;
import com.elink.esua.epdc.entity.AdminImgEntity;
import org.apache.ibatis.annotations.Mapper;
/**
* 图片表 图片表
*
* @author qu qu@elink-cn.com
* @since v1.0.0 2021-08-10
*/
@Mapper
public interface AdminImgDao extends BaseDao<AdminImgEntity> {
}

57
epdc-cloud-admin/src/main/java/com/elink/esua/epdc/dao/PartyOrgDao.java

@ -0,0 +1,57 @@
/**
* 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.elink.esua.epdc.dao;
import com.elink.esua.epdc.commons.mybatis.dao.BaseDao;
import com.elink.esua.epdc.dto.PartyOrgDTO;
import com.elink.esua.epdc.entity.PartyOrgEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
import java.util.Map;
/**
* 党组织表 党组织表
*
* @author qu qu@elink-cn.com
* @since v1.0.0 2021-08-06
*/
@Mapper
public interface PartyOrgDao extends BaseDao<PartyOrgEntity> {
/**
* 是否存在该类型partyOrgType的党组织
*
* @param typeCode
* @return java.lang.Integer
* @Author zhangyong
* @Date 14:34 2021-08-06
**/
Integer isPartyOrgExistByPartyOrgType(@Param("typeCode") String typeCode);
/**
* PC 首页查询
*
* @param params
* @return java.util.List<com.elink.esua.epdc.dto.PartyOrgDTO>
* @Author zhangyong
* @Date 15:21 2021-08-11
**/
List<PartyOrgDTO> selectListPartyOrg(Map<String, Object> params);
}

67
epdc-cloud-admin/src/main/java/com/elink/esua/epdc/dao/PartyOrgTypeDao.java

@ -0,0 +1,67 @@
/**
* 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.elink.esua.epdc.dao;
import com.elink.esua.epdc.commons.mybatis.dao.BaseDao;
import com.elink.esua.epdc.dto.PartyOrgTypeSelectDTO;
import com.elink.esua.epdc.entity.PartyOrgTypeEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* 党组织类型表 党组织类型表
*
* @author qu qu@elink-cn.com
* @since v1.0.0 2021-08-06
*/
@Mapper
public interface PartyOrgTypeDao extends BaseDao<PartyOrgTypeEntity> {
/**
* 返回值 >0 code 已经存在
*
* @param typeCode
* @param id 过滤自身(可选项)
* @return java.lang.Integer
* @Author zhangyong
* @Date 10:55 2021-04-28
**/
Integer isTypeCodeRepeated(@Param("typeCode") String typeCode, @Param("id") String id);
/**
* 返回值 >0 name 已经存在
*
* @param typeName
* @param id 过滤自身(可选项)
* @return java.lang.Integer
* @Author zhangyong
* @Date 10:55 2021-04-28
**/
Integer isTypeNameRepeated(@Param("typeName") String typeName, @Param("id") String id);
/*
* 获取 党组织类型用于下拉选项
* @param
* @return java.util.List<com.elink.esua.epdc.dto.PartyOrgTypeSelectDTO>
* @Author zhangyong
* @Date 15:28 2021-08-06
**/
List<PartyOrgTypeSelectDTO> getPartyOrgType();
}

33
epdc-cloud-admin/src/main/java/com/elink/esua/epdc/dao/SysDeptInfoDao.java

@ -0,0 +1,33 @@
/**
* 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.elink.esua.epdc.dao;
import com.elink.esua.epdc.commons.mybatis.dao.BaseDao;
import com.elink.esua.epdc.entity.SysDeptInfoEntity;
import org.apache.ibatis.annotations.Mapper;
/**
* 部门信息表 组织信息表
*
* @author qu qu@elink-cn.com
* @since v1.0.0 2021-08-10
*/
@Mapper
public interface SysDeptInfoDao extends BaseDao<SysDeptInfoEntity> {
}

10
epdc-cloud-admin/src/main/java/com/elink/esua/epdc/dao/SysRoleDao.java

@ -8,7 +8,6 @@
package com.elink.esua.epdc.dao; package com.elink.esua.epdc.dao;
import com.elink.esua.epdc.entity.SysRoleEntity;
import com.elink.esua.epdc.commons.mybatis.dao.BaseDao; import com.elink.esua.epdc.commons.mybatis.dao.BaseDao;
import com.elink.esua.epdc.entity.SysRoleEntity; import com.elink.esua.epdc.entity.SysRoleEntity;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
@ -36,4 +35,13 @@ public interface SysRoleDao extends BaseDao<SysRoleEntity> {
* @date 2019/12/18 10:20 * @date 2019/12/18 10:20
*/ */
List<Map<String, Object>> selectAmountByRoleTpye(@Param("roleType") String roleType, @Param("deptIdList") List<Long> deptIdList); List<Map<String, Object>> selectAmountByRoleTpye(@Param("roleType") String roleType, @Param("deptIdList") List<Long> deptIdList);
/**
* @describe: 根据用户ID查询角色ID用逗号隔开
* @author wangtong
* @date 2021/8/10 16:05
* @params [userId]
* @return com.elink.esua.epdc.commons.tools.utils.Result<java.util.List<com.elink.esua.epdc.dto.SysRoleDTO>>
*/
String getRoleStringIdsByUserId(@Param("userId") Long userId);
} }

56
epdc-cloud-admin/src/main/java/com/elink/esua/epdc/entity/AdminImgEntity.java

@ -0,0 +1,56 @@
/**
* 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.elink.esua.epdc.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import com.elink.esua.epdc.commons.mybatis.entity.BaseEpdcEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.util.Date;
/**
* 图片表 图片表
*
* @author qu qu@elink-cn.com
* @since v1.0.0 2021-08-10
*/
@Data
@EqualsAndHashCode(callSuper=false)
@TableName("epdc_admin_img")
public class AdminImgEntity extends BaseEpdcEntity {
private static final long serialVersionUID = 1L;
/**
* 引用ID
*/
private String referenceId;
/**
* 图片地址
*/
private String imgUrl;
/**
* 图片类型lllll
*/
private String imgType;
}

106
epdc-cloud-admin/src/main/java/com/elink/esua/epdc/entity/PartyOrgEntity.java

@ -0,0 +1,106 @@
/**
* 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.elink.esua.epdc.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import com.elink.esua.epdc.commons.mybatis.entity.BaseEpdcEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.util.Date;
/**
* 党组织表 党组织表
*
* @author qu qu@elink-cn.com
* @since v1.0.0 2021-08-06
*/
@Data
@EqualsAndHashCode(callSuper=false)
@TableName("epdc_party_org")
public class PartyOrgEntity extends BaseEpdcEntity {
private static final long serialVersionUID = 1L;
/**
* 党组织名称
*/
private String partyOrgName;
/**
* 党组织介绍
*/
private String introduction;
/**
* 两委干部
*/
private String twoCommittees;
/**
* 党员数量
*/
private Integer partyMemberNum;
/**
* 经度
*/
private String longitude;
/**
* 纬度
*/
private String latitude;
/**
* 所属组织名称
*/
private String deptName;
/**
* 所属组织ID
*/
private String deptId;
/**
* 党组织类型编码
*/
private String typeCode;
/**
* 父所有部门ID
*/
private String parentDeptIds;
/**
* 父所有部门名称
*/
private String parentDeptNames;
/**
* 所有部门ID
*/
private String allDeptIds;
/**
* 所有部门名称
*/
private String allDeptNames;
}

61
epdc-cloud-admin/src/main/java/com/elink/esua/epdc/entity/PartyOrgTypeEntity.java

@ -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.elink.esua.epdc.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import com.elink.esua.epdc.commons.mybatis.entity.BaseEpdcEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.util.Date;
/**
* 党组织类型表 党组织类型表
*
* @author qu qu@elink-cn.com
* @since v1.0.0 2021-08-06
*/
@Data
@EqualsAndHashCode(callSuper=false)
@TableName("epdc_party_org_type")
public class PartyOrgTypeEntity extends BaseEpdcEntity {
private static final long serialVersionUID = 1L;
/**
* 类型名称
*/
private String typeName;
/**
* 类型编码
*/
private String typeCode;
/**
* 排序
*/
private Integer sort;
/**
* 启用标识 0-1-
*/
private String enable;
}

91
epdc-cloud-admin/src/main/java/com/elink/esua/epdc/entity/SysDeptInfoEntity.java

@ -0,0 +1,91 @@
/**
* 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.elink.esua.epdc.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import com.elink.esua.epdc.commons.mybatis.entity.BaseEpdcEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.util.Date;
/**
* 部门信息表 组织信息表
*
* @author qu qu@elink-cn.com
* @since v1.0.0 2021-08-10
*/
@Data
@EqualsAndHashCode(callSuper=false)
@TableName("sys_dept_info")
public class SysDeptInfoEntity extends BaseEpdcEntity {
private static final long serialVersionUID = 1L;
/**
* 部门ID
*/
private Long deptId;
/**
* 概况介绍
*/
private String introduction;
/**
* 社区数量
*/
private Integer communityNum;
/**
* 网格数量
*/
private Integer gridNum;
/**
* 网格员数量
*/
private Integer gridmanNum;
/**
* 党员数量
*/
private Integer partyMemberNum;
/**
* 经度
*/
private String longitude;
/**
* 纬度
*/
private String latitude;
/**
* 辖区面积
*/
private String acreage;
/**
* 社区人数
*/
private Integer communityManNum;
}

44
epdc-cloud-admin/src/main/java/com/elink/esua/epdc/excel/PartyOrgExcel.java

@ -0,0 +1,44 @@
/**
* 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.elink.esua.epdc.excel;
import cn.afterturn.easypoi.excel.annotation.Excel;
import lombok.Data;
import java.util.Date;
/**
* 党组织表 党组织表
*
* @author qu qu@elink-cn.com
* @since v1.0.0 2021-08-06
*/
@Data
public class PartyOrgExcel {
@Excel(name = "所属组织")
private String allDeptNames;
@Excel(name = "党组织名称")
private String partyOrgName;
@Excel(name = "党组织类型")
private String typeName;
}

68
epdc-cloud-admin/src/main/java/com/elink/esua/epdc/excel/PartyOrgTypeExcel.java

@ -0,0 +1,68 @@
/**
* 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.elink.esua.epdc.excel;
import cn.afterturn.easypoi.excel.annotation.Excel;
import lombok.Data;
import java.util.Date;
/**
* 党组织类型表 党组织类型表
*
* @author qu qu@elink-cn.com
* @since v1.0.0 2021-08-06
*/
@Data
public class PartyOrgTypeExcel {
@Excel(name = "标识号")
private String id;
@Excel(name = "类型名称")
private String typeName;
@Excel(name = "类型编码")
private String typeCode;
@Excel(name = "排序")
private Integer sort;
@Excel(name = "启用标识 0-否,1-是")
private String enable;
@Excel(name = "删除标识 0-否,1-是")
private String delFlag;
@Excel(name = "乐观锁")
private Integer revision;
@Excel(name = "创建人")
private String createdBy;
@Excel(name = "创建时间")
private Date createdTime;
@Excel(name = "更新人")
private String updatedBy;
@Excel(name = "更新时间")
private Date updatedTime;
}

55
epdc-cloud-admin/src/main/java/com/elink/esua/epdc/feign/NewsFeignClient.java

@ -0,0 +1,55 @@
package com.elink.esua.epdc.feign;
import com.elink.esua.epdc.commons.tools.constant.ServiceConstant;
import com.elink.esua.epdc.commons.tools.utils.Result;
import com.elink.esua.epdc.dto.RoleModuleRealationDTO;
import com.elink.esua.epdc.feign.fallback.NewsFeignClientFallback;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import java.util.List;
/**
* @Author: wangtong
* @Date: 2021/8/11 09:28
* @Description: 通知接口
*/
@FeignClient(name = ServiceConstant.EPDC_NEWS_SERVER, fallback = NewsFeignClientFallback.class
// ,url = "http://127.0.0.1:9064"
)
public interface NewsFeignClient {
/**
* @param orgTypeFormDTO
* @return com.elink.esua.epdc.commons.tools.utils.Result
* @Author yinzuomei
* @Description 保存项目处理类型权限
* @Date 2019/12/24 17:17
**/
@PostMapping(value = "news/rolemodule/saveRoleModuleRealation", consumes = MediaType.APPLICATION_JSON_VALUE)
Result saveRoleModuleRealation(RoleModuleRealationDTO moduleDto);
/**
* @describe: 查询角色对应的栏目权限
* @author wangtong
* @date 2021/8/11 16:08
* @params [roleId]
* @return com.elink.esua.epdc.commons.tools.utils.Result<java.util.List<java.lang.Long>>
*/
@GetMapping(value = "news/rolemodule/getModuleMenuIdList/{roleId}")
Result<List<Long>> getModuleMenuIdList(@PathVariable("roleId") Long roleId);
/**
* @param orgTypeFormDTO
* @return com.elink.esua.epdc.commons.tools.utils.Result
* @Author yinzuomei
* @Description 保存项目处理类型权限
* @Date 2019/12/24 17:17
**/
@PutMapping(value = "news/rolemodule/updateRoleModuleRealation", consumes = MediaType.APPLICATION_JSON_VALUE)
Result updateRoleModuleRealation(RoleModuleRealationDTO moduleDto);
}

35
epdc-cloud-admin/src/main/java/com/elink/esua/epdc/feign/fallback/NewsFeignClientFallback.java

@ -0,0 +1,35 @@
package com.elink.esua.epdc.feign.fallback;
import com.elink.esua.epdc.commons.tools.constant.ServiceConstant;
import com.elink.esua.epdc.commons.tools.utils.ModuleUtils;
import com.elink.esua.epdc.commons.tools.utils.Result;
import com.elink.esua.epdc.dto.RoleModuleRealationDTO;
import com.elink.esua.epdc.feign.NewsFeignClient;
import org.springframework.stereotype.Component;
import java.util.List;
/**
* @Description
* @Author yinzuomei
* @Date 2019/12/24 9:45
*/
@Component
public class NewsFeignClientFallback implements NewsFeignClient {
@Override
public Result saveRoleModuleRealation(RoleModuleRealationDTO moduleDto) {
return ModuleUtils.feignConError(ServiceConstant.EPDC_NEWS_SERVER, "saveRoleModuleRealation", moduleDto);
}
@Override
public Result<List<Long>> getModuleMenuIdList(Long roleId) {
return ModuleUtils.feignConError(ServiceConstant.EPDC_NEWS_SERVER, "getModuleMenuIdList", roleId);
}
@Override
public Result updateRoleModuleRealation(RoleModuleRealationDTO moduleDto) {
return ModuleUtils.feignConError(ServiceConstant.EPDC_NEWS_SERVER, "updateRoleModuleRealation", moduleDto);
}
}

47
epdc-cloud-admin/src/main/java/com/elink/esua/epdc/redis/PartyOrgRedis.java

@ -0,0 +1,47 @@
/**
* 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.elink.esua.epdc.redis;
import com.elink.esua.epdc.commons.tools.redis.RedisUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
/**
* 党组织表 党组织表
*
* @author qu qu@elink-cn.com
* @since v1.0.0 2021-08-06
*/
@Component
public class PartyOrgRedis {
@Autowired
private RedisUtils redisUtils;
public void delete(Object[] ids) {
}
public void set(){
}
public String get(String id){
return null;
}
}

47
epdc-cloud-admin/src/main/java/com/elink/esua/epdc/redis/PartyOrgTypeRedis.java

@ -0,0 +1,47 @@
/**
* 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.elink.esua.epdc.redis;
import com.elink.esua.epdc.commons.tools.redis.RedisUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
/**
* 党组织类型表 党组织类型表
*
* @author qu qu@elink-cn.com
* @since v1.0.0 2021-08-06
*/
@Component
public class PartyOrgTypeRedis {
@Autowired
private RedisUtils redisUtils;
public void delete(Object[] ids) {
}
public void set(){
}
public String get(String id){
return null;
}
}

107
epdc-cloud-admin/src/main/java/com/elink/esua/epdc/service/AdminImgService.java

@ -0,0 +1,107 @@
/**
* 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.elink.esua.epdc.service;
import com.elink.esua.epdc.commons.mybatis.service.BaseService;
import com.elink.esua.epdc.commons.tools.page.PageData;
import com.elink.esua.epdc.dto.AdminImgDTO;
import com.elink.esua.epdc.entity.AdminImgEntity;
import java.util.List;
import java.util.Map;
/**
* 图片表 图片表
*
* @author qu qu@elink-cn.com
* @since v1.0.0 2021-08-10
*/
public interface AdminImgService extends BaseService<AdminImgEntity> {
/**
* 默认分页
*
* @param params
* @return PageData<AdminImgDTO>
* @author generator
* @date 2021-08-10
*/
PageData<AdminImgDTO> page(Map<String, Object> params);
/**
* 默认查询
*
* @param params
* @return java.util.List<AdminImgDTO>
* @author generator
* @date 2021-08-10
*/
List<AdminImgDTO> list(Map<String, Object> params);
/**
* 单条查询
*
* @param id
* @return AdminImgDTO
* @author generator
* @date 2021-08-10
*/
AdminImgDTO get(String id);
/**
* 默认保存
*
* @param dto
* @return void
* @author generator
* @date 2021-08-10
*/
void save(AdminImgDTO dto);
/**
* 默认更新
*
* @param dto
* @return void
* @author generator
* @date 2021-08-10
*/
void update(AdminImgDTO dto);
/**
* 批量删除
*
* @param ids
* @return void
* @author generator
* @date 2021-08-10
*/
void delete(String[] ids);
/***
* 根据类型 +引用ID
* @param imgType
* @param referenceId
* @return com.elink.esua.epdc.dto.AdminImgDTO
* @author qushutong
* @date 2021/8/10 17:20
*/
AdminImgDTO getDtoByReference(String imgType,String referenceId);
}

105
epdc-cloud-admin/src/main/java/com/elink/esua/epdc/service/PartyOrgService.java

@ -0,0 +1,105 @@
/**
* 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.elink.esua.epdc.service;
import com.elink.esua.epdc.commons.mybatis.service.BaseService;
import com.elink.esua.epdc.commons.tools.page.PageData;
import com.elink.esua.epdc.dto.PartyOrgDTO;
import com.elink.esua.epdc.entity.PartyOrgEntity;
import java.util.List;
import java.util.Map;
/**
* 党组织表 党组织表
*
* @author qu qu@elink-cn.com
* @since v1.0.0 2021-08-06
*/
public interface PartyOrgService extends BaseService<PartyOrgEntity> {
/**
* 默认分页
*
* @param params
* @return PageData<PartyOrgDTO>
* @author generator
* @date 2021-08-06
*/
PageData<PartyOrgDTO> page(Map<String, Object> params);
/**
* 默认查询
*
* @param params
* @return java.util.List<PartyOrgDTO>
* @author generator
* @date 2021-08-06
*/
List<PartyOrgDTO> list(Map<String, Object> params);
/**
* 单条查询
*
* @param id
* @return PartyOrgDTO
* @author generator
* @date 2021-08-06
*/
PartyOrgDTO get(String id);
/**
* 默认保存
*
* @param dto
* @return void
* @author generator
* @date 2021-08-06
*/
void save(PartyOrgDTO dto);
/**
* 默认更新
*
* @param dto
* @return void
* @author generator
* @date 2021-08-06
*/
void update(PartyOrgDTO dto);
/**
* 批量删除
*
* @param ids
* @return void
* @author generator
* @date 2021-08-06
*/
void delete(String[] ids);
/**
* PC 首页查询
*
* @param params
* @return java.util.List<com.elink.esua.epdc.dto.PartyOrgDTO>
* @Author zhangyong
* @Date 15:21 2021-08-11
**/
List<PartyOrgDTO> selectListPartyOrg(Map<String, Object> params);
}

106
epdc-cloud-admin/src/main/java/com/elink/esua/epdc/service/PartyOrgTypeService.java

@ -0,0 +1,106 @@
/**
* 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.elink.esua.epdc.service;
import com.elink.esua.epdc.commons.mybatis.service.BaseService;
import com.elink.esua.epdc.commons.tools.page.PageData;
import com.elink.esua.epdc.commons.tools.utils.Result;
import com.elink.esua.epdc.dto.PartyOrgTypeDTO;
import com.elink.esua.epdc.dto.PartyOrgTypeSelectDTO;
import com.elink.esua.epdc.entity.PartyOrgTypeEntity;
import java.util.List;
import java.util.Map;
/**
* 党组织类型表 党组织类型表
*
* @author qu qu@elink-cn.com
* @since v1.0.0 2021-08-06
*/
public interface PartyOrgTypeService extends BaseService<PartyOrgTypeEntity> {
/**
* 默认分页
*
* @param params
* @return PageData<PartyOrgTypeDTO>
* @author generator
* @date 2021-08-06
*/
PageData<PartyOrgTypeDTO> page(Map<String, Object> params);
/**
* 默认查询
*
* @param params
* @return java.util.List<PartyOrgTypeDTO>
* @author generator
* @date 2021-08-06
*/
List<PartyOrgTypeDTO> list(Map<String, Object> params);
/**
* 单条查询
*
* @param id
* @return PartyOrgTypeDTO
* @author generator
* @date 2021-08-06
*/
PartyOrgTypeDTO get(String id);
/**
* 默认保存
*
* @param dto
* @return void
* @author generator
* @date 2021-08-06
*/
void save(PartyOrgTypeDTO dto);
/**
* 默认更新
*
* @param dto
* @return void
* @author generator
* @date 2021-08-06
*/
void update(PartyOrgTypeDTO dto);
/**
* 批量删除
*
* @param ids
* @return void
* @author generator
* @date 2021-08-06
*/
void delete(String[] ids);
/*
* 获取 党组织类型用于下拉选项
* @param
* @return java.util.List<com.elink.esua.epdc.dto.PartyOrgTypeSelectDTO>
* @Author zhangyong
* @Date 15:28 2021-08-06
**/
List<PartyOrgTypeSelectDTO> getPartyOrgType();
}

106
epdc-cloud-admin/src/main/java/com/elink/esua/epdc/service/SysDeptInfoService.java

@ -0,0 +1,106 @@
/**
* 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.elink.esua.epdc.service;
import com.elink.esua.epdc.commons.mybatis.service.BaseService;
import com.elink.esua.epdc.commons.tools.page.PageData;
import com.elink.esua.epdc.dto.SysDeptInfoDTO;
import com.elink.esua.epdc.entity.SysDeptInfoEntity;
import java.util.List;
import java.util.Map;
/**
* 部门信息表 组织信息表
*
* @author qu qu@elink-cn.com
* @since v1.0.0 2021-08-10
*/
public interface SysDeptInfoService extends BaseService<SysDeptInfoEntity> {
/**
* 默认分页
*
* @param params
* @return PageData<SysDeptInfoDTO>
* @author generator
* @date 2021-08-10
*/
PageData<SysDeptInfoDTO> page(Map<String, Object> params);
/**
* 默认查询
*
* @param params
* @return java.util.List<SysDeptInfoDTO>
* @author generator
* @date 2021-08-10
*/
List<SysDeptInfoDTO> list(Map<String, Object> params);
/**
* 单条查询
*
* @param id
* @return SysDeptInfoDTO
* @author generator
* @date 2021-08-10
*/
SysDeptInfoDTO get(String id);
/**
* 默认保存
*
* @param dto
* @return void
* @author generator
* @date 2021-08-10
*/
void save(SysDeptInfoDTO dto);
/**
* 默认更新
*
* @param dto
* @return void
* @author generator
* @date 2021-08-10
*/
void update(SysDeptInfoDTO dto);
/**
* 批量删除
*
* @param ids
* @return void
* @author generator
* @date 2021-08-10
*/
void delete(String[] ids);
/**
* 根据关联deptID 查询
*
* @param deptId
* @return SysDeptInfoDTO
* @author generator
* @date 2021-08-10
*/
SysDeptInfoDTO getDeptInfoByDeptID(String deptId);
}

17
epdc-cloud-admin/src/main/java/com/elink/esua/epdc/service/SysRoleService.java

@ -42,4 +42,21 @@ public interface SysRoleService extends BaseService<SysRoleEntity> {
List<Long> getWhistleDeptIdList(Long id); List<Long> getWhistleDeptIdList(Long id);
/**
* @describe: 根据用户ID查询角色ID用逗号隔开
* @author wangtong
* @date 2021/8/10 16:05
* @params [userId]
* @return com.elink.esua.epdc.commons.tools.utils.Result<java.util.List<com.elink.esua.epdc.dto.SysRoleDTO>>
*/
String getRoleStringIdsByUserId(Long userId);
/**
* @describe: 查询角色对应的栏目权限
* @author wangtong
* @date 2021/8/11 16:07
* @params [id]
* @return java.util.List<java.lang.Long>
*/
List<Long> getModuleMenuIdList(Long id);
} }

110
epdc-cloud-admin/src/main/java/com/elink/esua/epdc/service/impl/AdminImgServiceImpl.java

@ -0,0 +1,110 @@
/**
* 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.elink.esua.epdc.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.elink.esua.epdc.commons.mybatis.service.impl.BaseServiceImpl;
import com.elink.esua.epdc.commons.tools.page.PageData;
import com.elink.esua.epdc.commons.tools.utils.ConvertUtils;
import com.elink.esua.epdc.commons.tools.constant.FieldConstant;
import com.elink.esua.epdc.dao.AdminImgDao;
import com.elink.esua.epdc.dto.AdminImgDTO;
import com.elink.esua.epdc.entity.AdminImgEntity;
import com.elink.esua.epdc.entity.SysDeptInfoEntity;
import com.elink.esua.epdc.service.AdminImgService;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
/**
* 图片表 图片表
*
* @author qu qu@elink-cn.com
* @since v1.0.0 2021-08-10
*/
@Service
public class AdminImgServiceImpl extends BaseServiceImpl<AdminImgDao, AdminImgEntity> implements AdminImgService {
@Override
public PageData<AdminImgDTO> page(Map<String, Object> params) {
IPage<AdminImgEntity> page = baseDao.selectPage(
getPage(params, FieldConstant.CREATED_TIME, false),
getWrapper(params)
);
return getPageData(page, AdminImgDTO.class);
}
@Override
public List<AdminImgDTO> list(Map<String, Object> params) {
List<AdminImgEntity> entityList = baseDao.selectList(getWrapper(params));
return ConvertUtils.sourceToTarget(entityList, AdminImgDTO.class);
}
private QueryWrapper<AdminImgEntity> getWrapper(Map<String, Object> params){
String id = (String)params.get(FieldConstant.ID_HUMP);
QueryWrapper<AdminImgEntity> wrapper = new QueryWrapper<>();
wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id);
return wrapper;
}
@Override
public AdminImgDTO get(String id) {
AdminImgEntity entity = baseDao.selectById(id);
return ConvertUtils.sourceToTarget(entity, AdminImgDTO.class);
}
@Override
@Transactional(rollbackFor = Exception.class)
public void save(AdminImgDTO dto) {
AdminImgEntity entity = ConvertUtils.sourceToTarget(dto, AdminImgEntity.class);
insert(entity);
}
@Override
@Transactional(rollbackFor = Exception.class)
public void update(AdminImgDTO dto) {
AdminImgEntity entity = ConvertUtils.sourceToTarget(dto, AdminImgEntity.class);
updateById(entity);
}
@Override
@Transactional(rollbackFor = Exception.class)
public void delete(String[] ids) {
// 逻辑删除(@TableLogic 注解)
baseDao.deleteBatchIds(Arrays.asList(ids));
}
@Override
public AdminImgDTO getDtoByReference(String imgType, String referenceId) {
QueryWrapper<AdminImgEntity> wrapper = new QueryWrapper<>();
wrapper.eq(StringUtils.isNotBlank(referenceId), FieldConstant.REFERENCE_ID, referenceId);
wrapper.eq(StringUtils.isNotBlank(imgType), FieldConstant.IMG_TYPE, imgType);
return ConvertUtils.sourceToTarget(baseDao.selectOne(wrapper),AdminImgDTO.class);
}
}

138
epdc-cloud-admin/src/main/java/com/elink/esua/epdc/service/impl/PartyOrgServiceImpl.java

@ -0,0 +1,138 @@
/**
* 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.elink.esua.epdc.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.elink.esua.epdc.commons.mybatis.service.impl.BaseServiceImpl;
import com.elink.esua.epdc.commons.tools.constant.NumConstant;
import com.elink.esua.epdc.commons.tools.page.PageData;
import com.elink.esua.epdc.commons.tools.utils.ConvertUtils;
import com.elink.esua.epdc.commons.tools.constant.FieldConstant;
import com.elink.esua.epdc.dao.PartyOrgDao;
import com.elink.esua.epdc.dto.DeptLevelAndLeaderDTO;
import com.elink.esua.epdc.dto.PartyOrgDTO;
import com.elink.esua.epdc.entity.PartyOrgEntity;
import com.elink.esua.epdc.optimize.modules.deptlevel.service.OptSysDeptService;
import com.elink.esua.epdc.redis.PartyOrgRedis;
import com.elink.esua.epdc.service.PartyOrgService;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
/**
* 党组织表 党组织表
*
* @author qu qu@elink-cn.com
* @since v1.0.0 2021-08-06
*/
@Service
public class PartyOrgServiceImpl extends BaseServiceImpl<PartyOrgDao, PartyOrgEntity> implements PartyOrgService {
@Autowired
private PartyOrgRedis partyOrgRedis;
@Autowired
private OptSysDeptService optSysDeptService;
@Override
public PageData<PartyOrgDTO> page(Map<String, Object> params) {
IPage<PartyOrgDTO> page = getPage(params);
List<PartyOrgDTO> list = baseDao.selectListPartyOrg(params);
return new PageData<>(list, page.getTotal());
}
@Override
public List<PartyOrgDTO> list(Map<String, Object> params) {
List<PartyOrgEntity> entityList = baseDao.selectList(getWrapper(params));
return ConvertUtils.sourceToTarget(entityList, PartyOrgDTO.class);
}
private QueryWrapper<PartyOrgEntity> getWrapper(Map<String, Object> params){
String id = (String)params.get(FieldConstant.ID_HUMP);
QueryWrapper<PartyOrgEntity> wrapper = new QueryWrapper<>();
wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id);
return wrapper;
}
@Override
public PartyOrgDTO get(String id) {
PartyOrgEntity entity = baseDao.selectById(id);
PartyOrgDTO dto = ConvertUtils.sourceToTarget(entity, PartyOrgDTO.class);
if (null != dto && null != dto.getAllDeptIds()) {
String[] split = dto.getAllDeptIds().split(",");
// 去除,顶级组织
String[] allDeptIdArr = new String[split.length - NumConstant.ONE];
System.arraycopy(split, NumConstant.ONE, allDeptIdArr, NumConstant.ZERO,split.length - NumConstant.ONE);
dto.setAllDeptIdArr(allDeptIdArr);
}
return dto;
}
@Override
@Transactional(rollbackFor = Exception.class)
public void save(PartyOrgDTO dto) {
PartyOrgEntity entity = ConvertUtils.sourceToTarget(dto, PartyOrgEntity.class);
this.packageOrgLevel(entity, Long.valueOf(dto.getDeptId()));
insert(entity);
}
@Override
@Transactional(rollbackFor = Exception.class)
public void update(PartyOrgDTO dto) {
PartyOrgEntity entity = ConvertUtils.sourceToTarget(dto, PartyOrgEntity.class);
this.packageOrgLevel(entity, Long.valueOf(dto.getDeptId()));
updateById(entity);
}
/**
* 组装部门层级
*
* @param entity
* @param deptId
* @return void
* @Author zhangyong
* @Date 16:25 2021-08-06
**/
private void packageOrgLevel(PartyOrgEntity entity, Long deptId) {
DeptLevelAndLeaderDTO deptLevel = optSysDeptService.getDeptLevelById(deptId);
entity.setAllDeptIds(deptLevel.getAllDeptIds());
entity.setAllDeptNames(deptLevel.getAllDeptNames());
entity.setParentDeptIds(deptLevel.getParentDeptIds());
entity.setParentDeptNames(deptLevel.getParentDeptNames());
}
@Override
@Transactional(rollbackFor = Exception.class)
public void delete(String[] ids) {
// 逻辑删除(@TableLogic 注解)
baseDao.deleteBatchIds(Arrays.asList(ids));
}
@Override
public List<PartyOrgDTO> selectListPartyOrg(Map<String, Object> params) {
return baseDao.selectListPartyOrg(params);
}
}

143
epdc-cloud-admin/src/main/java/com/elink/esua/epdc/service/impl/PartyOrgTypeServiceImpl.java

@ -0,0 +1,143 @@
/**
* 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.elink.esua.epdc.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.elink.esua.epdc.commons.mybatis.service.impl.BaseServiceImpl;
import com.elink.esua.epdc.commons.tools.constant.NumConstant;
import com.elink.esua.epdc.commons.tools.exception.RenException;
import com.elink.esua.epdc.commons.tools.page.PageData;
import com.elink.esua.epdc.commons.tools.utils.ConvertUtils;
import com.elink.esua.epdc.commons.tools.constant.FieldConstant;
import com.elink.esua.epdc.dao.PartyOrgDao;
import com.elink.esua.epdc.dao.PartyOrgTypeDao;
import com.elink.esua.epdc.dto.PartyOrgTypeDTO;
import com.elink.esua.epdc.dto.PartyOrgTypeSelectDTO;
import com.elink.esua.epdc.entity.PartyOrgTypeEntity;
import com.elink.esua.epdc.redis.PartyOrgTypeRedis;
import com.elink.esua.epdc.service.PartyOrgTypeService;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
/**
* 党组织类型表 党组织类型表
*
* @author qu qu@elink-cn.com
* @since v1.0.0 2021-08-06
*/
@Service
public class PartyOrgTypeServiceImpl extends BaseServiceImpl<PartyOrgTypeDao, PartyOrgTypeEntity> implements PartyOrgTypeService {
@Autowired
private PartyOrgTypeRedis partyOrgTypeRedis;
@Autowired
private PartyOrgDao partyOrgDao;
@Override
public PageData<PartyOrgTypeDTO> page(Map<String, Object> params) {
IPage<PartyOrgTypeEntity> page = baseDao.selectPage(
getPage(params, FieldConstant.CREATED_TIME, false),
getWrapper(params)
);
return getPageData(page, PartyOrgTypeDTO.class);
}
@Override
public List<PartyOrgTypeDTO> list(Map<String, Object> params) {
List<PartyOrgTypeEntity> entityList = baseDao.selectList(getWrapper(params));
return ConvertUtils.sourceToTarget(entityList, PartyOrgTypeDTO.class);
}
private QueryWrapper<PartyOrgTypeEntity> getWrapper(Map<String, Object> params){
String id = (String)params.get(FieldConstant.ID_HUMP);
QueryWrapper<PartyOrgTypeEntity> wrapper = new QueryWrapper<>();
wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id);
wrapper.orderByAsc("SORT");
return wrapper;
}
@Override
public PartyOrgTypeDTO get(String id) {
PartyOrgTypeEntity entity = baseDao.selectById(id);
return ConvertUtils.sourceToTarget(entity, PartyOrgTypeDTO.class);
}
@Override
@Transactional(rollbackFor = Exception.class)
public void save(PartyOrgTypeDTO dto) {
Integer num = baseDao.isTypeCodeRepeated(dto.getTypeCode(), null);
this.exceptionHandling(num, "党组织类型编码");
num = baseDao.isTypeNameRepeated(dto.getTypeName(), null);
this.exceptionHandling(num, "党组织类型");
PartyOrgTypeEntity entity = ConvertUtils.sourceToTarget(dto, PartyOrgTypeEntity.class);
insert(entity);
}
@Override
@Transactional(rollbackFor = Exception.class)
public void update(PartyOrgTypeDTO dto) {
Integer num = baseDao.isTypeCodeRepeated(dto.getTypeCode(), dto.getId());
this.exceptionHandling(num, "党组织类型编码 不可重复!");
num = baseDao.isTypeNameRepeated(dto.getTypeName(), dto.getId());
this.exceptionHandling(num, "党组织类型 不可重复!");
PartyOrgTypeEntity entity = ConvertUtils.sourceToTarget(dto, PartyOrgTypeEntity.class);
updateById(entity);
}
/**
* 异常处理
* @param num > 0 输出异常
* @param exceptionInfo 异常描述
* @return void
* @Author zhangyong
* @Date 14:26 2021-08-06
**/
private void exceptionHandling(Integer num, String exceptionInfo) {
if (NumConstant.ZERO < num) {
throw new RenException(exceptionInfo);
}
}
@Override
@Transactional(rollbackFor = Exception.class)
public void delete(String[] ids) {
for (String id : ids) {
PartyOrgTypeEntity partyOrgTypeEntity = baseDao.selectById(id);
Integer num = partyOrgDao.isPartyOrgExistByPartyOrgType(partyOrgTypeEntity.getTypeCode());
this.exceptionHandling(num, "该类型不能被删除,因当前尚存在该类型的党组织。");
}
// 逻辑删除(@TableLogic 注解)
baseDao.deleteBatchIds(Arrays.asList(ids));
}
@Override
public List<PartyOrgTypeSelectDTO> getPartyOrgType() {
return baseDao.getPartyOrgType();
}
}

109
epdc-cloud-admin/src/main/java/com/elink/esua/epdc/service/impl/SysDeptInfoServiceImpl.java

@ -0,0 +1,109 @@
/**
* 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.elink.esua.epdc.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.elink.esua.epdc.commons.mybatis.service.impl.BaseServiceImpl;
import com.elink.esua.epdc.commons.tools.page.PageData;
import com.elink.esua.epdc.commons.tools.utils.ConvertUtils;
import com.elink.esua.epdc.commons.tools.constant.FieldConstant;
import com.elink.esua.epdc.dao.SysDeptInfoDao;
import com.elink.esua.epdc.dto.SysDeptInfoDTO;
import com.elink.esua.epdc.entity.SysDeptInfoEntity;
import com.elink.esua.epdc.service.SysDeptInfoService;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
/**
* 部门信息表 组织信息表
*
* @author qu qu@elink-cn.com
* @since v1.0.0 2021-08-10
*/
@Service
public class SysDeptInfoServiceImpl extends BaseServiceImpl<SysDeptInfoDao, SysDeptInfoEntity> implements SysDeptInfoService {
@Override
public PageData<SysDeptInfoDTO> page(Map<String, Object> params) {
IPage<SysDeptInfoEntity> page = baseDao.selectPage(
getPage(params, FieldConstant.CREATED_TIME, false),
getWrapper(params)
);
return getPageData(page, SysDeptInfoDTO.class);
}
@Override
public List<SysDeptInfoDTO> list(Map<String, Object> params) {
List<SysDeptInfoEntity> entityList = baseDao.selectList(getWrapper(params));
return ConvertUtils.sourceToTarget(entityList, SysDeptInfoDTO.class);
}
private QueryWrapper<SysDeptInfoEntity> getWrapper(Map<String, Object> params){
String id = (String)params.get(FieldConstant.ID_HUMP);
QueryWrapper<SysDeptInfoEntity> wrapper = new QueryWrapper<>();
wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id);
return wrapper;
}
@Override
public SysDeptInfoDTO get(String id) {
SysDeptInfoEntity entity = baseDao.selectById(id);
return ConvertUtils.sourceToTarget(entity, SysDeptInfoDTO.class);
}
@Override
@Transactional(rollbackFor = Exception.class)
public void save(SysDeptInfoDTO dto) {
SysDeptInfoEntity entity = ConvertUtils.sourceToTarget(dto, SysDeptInfoEntity.class);
insert(entity);
}
@Override
@Transactional(rollbackFor = Exception.class)
public void update(SysDeptInfoDTO dto) {
SysDeptInfoEntity entity = ConvertUtils.sourceToTarget(dto, SysDeptInfoEntity.class);
updateById(entity);
}
@Override
@Transactional(rollbackFor = Exception.class)
public void delete(String[] ids) {
// 逻辑删除(@TableLogic 注解)
baseDao.deleteBatchIds(Arrays.asList(ids));
}
@Override
public SysDeptInfoDTO getDeptInfoByDeptID(String deptId) {
QueryWrapper<SysDeptInfoEntity> wrapper = new QueryWrapper<>();
wrapper.eq(StringUtils.isNotBlank(deptId), FieldConstant.DEPT_ID, deptId);
SysDeptInfoEntity sysDeptInfoEntity = baseDao.selectOne(wrapper);
return ConvertUtils.sourceToTarget(sysDeptInfoEntity,SysDeptInfoDTO.class);
}
}

104
epdc-cloud-admin/src/main/java/com/elink/esua/epdc/service/impl/SysDeptServiceImpl.java

@ -28,6 +28,7 @@ import com.elink.esua.epdc.commons.tools.security.user.UserDetail;
import com.elink.esua.epdc.commons.tools.utils.ConvertUtils; import com.elink.esua.epdc.commons.tools.utils.ConvertUtils;
import com.elink.esua.epdc.commons.tools.utils.Result; import com.elink.esua.epdc.commons.tools.utils.Result;
import com.elink.esua.epdc.commons.tools.utils.TreeUtils; import com.elink.esua.epdc.commons.tools.utils.TreeUtils;
import com.elink.esua.epdc.constant.ImgConstant;
import com.elink.esua.epdc.constant.RoleTypeKeyConstant; import com.elink.esua.epdc.constant.RoleTypeKeyConstant;
import com.elink.esua.epdc.dao.SysDeptDao; import com.elink.esua.epdc.dao.SysDeptDao;
import com.elink.esua.epdc.dto.*; import com.elink.esua.epdc.dto.*;
@ -42,11 +43,15 @@ import com.elink.esua.epdc.dto.epdc.result.AreaCodeChildResultDTO;
import com.elink.esua.epdc.dto.epdc.result.AreaCodeParentResultDTO; import com.elink.esua.epdc.dto.epdc.result.AreaCodeParentResultDTO;
import com.elink.esua.epdc.dto.epdc.result.UserSysDeptAreaCodeResultDTO; import com.elink.esua.epdc.dto.epdc.result.UserSysDeptAreaCodeResultDTO;
import com.elink.esua.epdc.dto.epdc.result.UserSysDeptInfoResultDTO; import com.elink.esua.epdc.dto.epdc.result.UserSysDeptInfoResultDTO;
import com.elink.esua.epdc.entity.AdminImgEntity;
import com.elink.esua.epdc.entity.SysDeptEntity; import com.elink.esua.epdc.entity.SysDeptEntity;
import com.elink.esua.epdc.entity.SysDeptInfoEntity;
import com.elink.esua.epdc.feign.AnalysisFeignClient; import com.elink.esua.epdc.feign.AnalysisFeignClient;
import com.elink.esua.epdc.feign.GroupFeignClient; import com.elink.esua.epdc.feign.GroupFeignClient;
import com.elink.esua.epdc.rocketmq.dto.OrganizationModifyDTO; import com.elink.esua.epdc.rocketmq.dto.OrganizationModifyDTO;
import com.elink.esua.epdc.rocketmq.producer.OrganizationModifyProducer; import com.elink.esua.epdc.rocketmq.producer.OrganizationModifyProducer;
import com.elink.esua.epdc.service.AdminImgService;
import com.elink.esua.epdc.service.SysDeptInfoService;
import com.elink.esua.epdc.service.SysDeptService; import com.elink.esua.epdc.service.SysDeptService;
import com.elink.esua.epdc.service.SysUserService; import com.elink.esua.epdc.service.SysUserService;
import com.elink.esua.epdc.utils.EpmetUtils; import com.elink.esua.epdc.utils.EpmetUtils;
@ -93,6 +98,12 @@ public class SysDeptServiceImpl extends BaseServiceImpl<SysDeptDao, SysDeptEntit
@Autowired @Autowired
private AnalysisFeignClient analysisFeignClient; private AnalysisFeignClient analysisFeignClient;
@Autowired
private SysDeptInfoService sysDeptInfoService;
@Autowired
private AdminImgService adminImgService;
@Override @Override
public List<SysDeptDTO> list(Map<String, Object> params) { public List<SysDeptDTO> list(Map<String, Object> params) {
//普通管理员,只能查询所属部门及子部门的数据 //普通管理员,只能查询所属部门及子部门的数据
@ -126,10 +137,35 @@ public class SysDeptServiceImpl extends BaseServiceImpl<SysDeptDao, SysDeptEntit
if (id == null) { if (id == null) {
return null; return null;
} }
// 组装信息
SysDeptDTO sysDeptDTO = getDeptEntity(id);
SysDeptEntity entity = baseDao.getById(id); return sysDeptDTO;
}
return ConvertUtils.sourceToTarget(entity, SysDeptDTO.class); private SysDeptDTO getDeptEntity(Long id) {
SysDeptEntity entity = baseDao.getById(id);
SysDeptDTO sysDeptDTO = ConvertUtils.sourceToTarget(entity, SysDeptDTO.class);
AdminImgDTO businessDto = adminImgService.getDtoByReference(ImgConstant.DEPT_BUSINESS_CIRCULATION, id.toString());
AdminImgDTO partyDto = adminImgService.getDtoByReference(ImgConstant.DEPT_PARTY_ORGANIZATION_STRUCTURE, id.toString());
SysDeptInfoDTO deptInfoByDeptID = sysDeptInfoService.getDeptInfoByDeptID(id.toString());
if(deptInfoByDeptID!=null){
sysDeptDTO.setIntroduction(deptInfoByDeptID.getIntroduction());
sysDeptDTO.setCommunityNum(deptInfoByDeptID.getCommunityNum());
sysDeptDTO.setGridNum(deptInfoByDeptID.getGridNum());
sysDeptDTO.setGridmanNum(deptInfoByDeptID.getGridmanNum());
sysDeptDTO.setPartyMemberNum(deptInfoByDeptID.getPartyMemberNum());
sysDeptDTO.setLongitude(deptInfoByDeptID.getLongitude());
sysDeptDTO.setLatitude(deptInfoByDeptID.getLatitude());
sysDeptDTO.setAcreage(deptInfoByDeptID.getAcreage());
if(businessDto!=null){
sysDeptDTO.setDeptBusinessUrl(businessDto.getImgUrl());
}
if(partyDto!=null){
sysDeptDTO.setDeptPartyUrl(partyDto.getImgUrl());
}
}
return sysDeptDTO;
} }
@Override @Override
@ -150,6 +186,8 @@ public class SysDeptServiceImpl extends BaseServiceImpl<SysDeptDao, SysDeptEntit
} }
entity.setPids(getPidList(entity.getPid())); entity.setPids(getPidList(entity.getPid()));
insert(entity); insert(entity);
// 插入信息表
insertInfo(dto, entity);
// 新建网格党支部时创建网格党员群 // 新建网格党支部时创建网格党员群
if (OrganizationTypeConstant.ORG_TYPE_GRID_PARTY.equals(dto.getTypeKey())) { if (OrganizationTypeConstant.ORG_TYPE_GRID_PARTY.equals(dto.getTypeKey())) {
@ -159,6 +197,24 @@ public class SysDeptServiceImpl extends BaseServiceImpl<SysDeptDao, SysDeptEntit
} }
} }
private void insertInfo(SysDeptDTO dto, SysDeptEntity entity) {
SysDeptInfoEntity sysDeptInfoEntity = ConvertUtils.sourceToTarget(dto, SysDeptInfoEntity.class);
sysDeptInfoEntity.setDeptId(dto.getId());
sysDeptInfoService.insert(sysDeptInfoEntity);
// 插入图片表
AdminImgEntity businessImgEntity = new AdminImgEntity();
businessImgEntity.setImgType(ImgConstant.DEPT_BUSINESS_CIRCULATION);
businessImgEntity.setImgUrl(dto.getDeptBusinessUrl());
businessImgEntity.setReferenceId(entity.getId().toString());
adminImgService.insert(businessImgEntity);
AdminImgEntity partyImgEntity = new AdminImgEntity();
partyImgEntity.setImgType(ImgConstant.DEPT_PARTY_ORGANIZATION_STRUCTURE);
partyImgEntity.setImgUrl(dto.getDeptPartyUrl());
partyImgEntity.setReferenceId(entity.getId().toString());
adminImgService.insert(partyImgEntity);
}
@Override @Override
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
public void update(SysDeptDTO dto) { public void update(SysDeptDTO dto) {
@ -185,6 +241,48 @@ public class SysDeptServiceImpl extends BaseServiceImpl<SysDeptDao, SysDeptEntit
// 发送消息 // 发送消息
sendMqMessage(dto); sendMqMessage(dto);
updateById(entity); updateById(entity);
// 修改基本信息
updatainfo(dto, entity);
}
private void updatainfo(SysDeptDTO dto, SysDeptEntity entity) {
SysDeptInfoDTO sysDeptInfoDTO = sysDeptInfoService.getDeptInfoByDeptID(dto.getId().toString());
AdminImgEntity businessImgEntity = new AdminImgEntity();
businessImgEntity.setImgType(ImgConstant.DEPT_BUSINESS_CIRCULATION);
businessImgEntity.setImgUrl(dto.getDeptBusinessUrl());
businessImgEntity.setReferenceId(entity.getId().toString());
AdminImgEntity partyImgEntity = new AdminImgEntity();
partyImgEntity.setImgType(ImgConstant.DEPT_PARTY_ORGANIZATION_STRUCTURE);
partyImgEntity.setImgUrl(dto.getDeptPartyUrl());
partyImgEntity.setReferenceId(entity.getId().toString());
// 表里没有直接插入
if (sysDeptInfoDTO == null) {
// 插入信息表
SysDeptInfoEntity sysDeptInfoEntity = ConvertUtils.sourceToTarget(dto, SysDeptInfoEntity.class);
sysDeptInfoEntity.setDeptId(entity.getId());
sysDeptInfoService.insert(sysDeptInfoEntity);
// 插入图片表
adminImgService.insert(businessImgEntity);
adminImgService.insert(partyImgEntity);
} else {
// 更新信息表
SysDeptInfoDTO deptInfoDTO = ConvertUtils.sourceToTarget(dto, SysDeptInfoDTO.class);
deptInfoDTO.setDeptId(sysDeptInfoDTO.getDeptId());
deptInfoDTO.setId(sysDeptInfoDTO.getId());
sysDeptInfoService.update(deptInfoDTO);
// 查询图片表图片id
AdminImgDTO businessDto = adminImgService.getDtoByReference(ImgConstant.DEPT_BUSINESS_CIRCULATION, entity.getId().toString());
AdminImgDTO partyDto = adminImgService.getDtoByReference(ImgConstant.DEPT_PARTY_ORGANIZATION_STRUCTURE, entity.getId().toString());
AdminImgDTO newBusinessDto = ConvertUtils.sourceToTarget(businessImgEntity, AdminImgDTO.class);
newBusinessDto.setId(businessDto.getId());
adminImgService.update(newBusinessDto);
AdminImgDTO newPartyDto = ConvertUtils.sourceToTarget(partyImgEntity, AdminImgDTO.class);
newPartyDto.setId(partyDto.getId());
adminImgService.update(newPartyDto);
}
} }
@Override @Override
@ -506,7 +604,7 @@ public class SysDeptServiceImpl extends BaseServiceImpl<SysDeptDao, SysDeptEntit
* @param allParentNode 所有的上级机构节点 * @param allParentNode 所有的上级机构节点
* @param dataScopeDeptList 拥有数据权限的部门 * @param dataScopeDeptList 拥有数据权限的部门
* @param parentDeptIdList 上级部门id * @param parentDeptIdList 上级部门id
* @return java.util.Map<java.lang.String, java.lang.Object> * @return java.util.Map<java.lang.String , java.lang.Object>
* @author work@yujt.net.cn * @author work@yujt.net.cn
* @date 2019/11/29 10:27 * @date 2019/11/29 10:27
*/ */

27
epdc-cloud-admin/src/main/java/com/elink/esua/epdc/service/impl/SysRoleServiceImpl.java

@ -28,6 +28,7 @@ import com.elink.esua.epdc.constant.RoleTypeKeyConstant;
import com.elink.esua.epdc.dao.SysDeptDao; import com.elink.esua.epdc.dao.SysDeptDao;
import com.elink.esua.epdc.dao.SysRoleDao; import com.elink.esua.epdc.dao.SysRoleDao;
import com.elink.esua.epdc.dto.ParentAndAllDeptDTO; import com.elink.esua.epdc.dto.ParentAndAllDeptDTO;
import com.elink.esua.epdc.dto.RoleModuleRealationDTO;
import com.elink.esua.epdc.dto.SysRoleDTO; import com.elink.esua.epdc.dto.SysRoleDTO;
import com.elink.esua.epdc.dto.handleroledept.HandleRoleDeptDTO; import com.elink.esua.epdc.dto.handleroledept.HandleRoleDeptDTO;
import com.elink.esua.epdc.dto.handleroledept.form.HandleRoleDeptFormDTO; import com.elink.esua.epdc.dto.handleroledept.form.HandleRoleDeptFormDTO;
@ -35,6 +36,7 @@ import com.elink.esua.epdc.dto.rulecategory.form.HandleRoleCategoryFormDTO;
import com.elink.esua.epdc.entity.SysDeptEntity; import com.elink.esua.epdc.entity.SysDeptEntity;
import com.elink.esua.epdc.entity.SysRoleEntity; import com.elink.esua.epdc.entity.SysRoleEntity;
import com.elink.esua.epdc.feign.EventFeignClient; import com.elink.esua.epdc.feign.EventFeignClient;
import com.elink.esua.epdc.feign.NewsFeignClient;
import com.elink.esua.epdc.service.*; import com.elink.esua.epdc.service.*;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
@ -71,6 +73,8 @@ public class SysRoleServiceImpl extends BaseServiceImpl<SysRoleDao, SysRoleEntit
private EventFeignClient eventFeignClient; private EventFeignClient eventFeignClient;
@Autowired @Autowired
private SysDeptDao sysDeptDao; private SysDeptDao sysDeptDao;
@Autowired
private NewsFeignClient newsFeignClient;
@Override @Override
public PageData<SysRoleDTO> page(Map<String, Object> params) { public PageData<SysRoleDTO> page(Map<String, Object> params) {
@ -149,6 +153,12 @@ public class SysRoleServiceImpl extends BaseServiceImpl<SysRoleDao, SysRoleEntit
//保存角色数据权限关系 //保存角色数据权限关系
sysRoleDataScopeService.saveOrUpdate(entity.getId(), dto.getDeptIdList()); sysRoleDataScopeService.saveOrUpdate(entity.getId(), dto.getDeptIdList());
//保存角色栏目关系
RoleModuleRealationDTO moduleDto = new RoleModuleRealationDTO();
moduleDto.setId(entity.getId());
moduleDto.setModuleMenuIdList(dto.getModuleMenuIdList());
newsFeignClient.saveRoleModuleRealation(moduleDto);
handleEpdcUserRole(dto, entity, true); handleEpdcUserRole(dto, entity, true);
} }
@ -254,6 +264,12 @@ public class SysRoleServiceImpl extends BaseServiceImpl<SysRoleDao, SysRoleEntit
//更新角色数据权限关系 //更新角色数据权限关系
sysRoleDataScopeService.saveOrUpdate(entity.getId(), dto.getDeptIdList()); sysRoleDataScopeService.saveOrUpdate(entity.getId(), dto.getDeptIdList());
//更新角色栏目关系
RoleModuleRealationDTO moduleDto = new RoleModuleRealationDTO();
moduleDto.setId(entity.getId());
moduleDto.setModuleMenuIdList(dto.getModuleMenuIdList());
newsFeignClient.updateRoleModuleRealation(moduleDto);
handleEpdcUserRole(dto, entity, true); handleEpdcUserRole(dto, entity, true);
} }
@ -295,6 +311,17 @@ public class SysRoleServiceImpl extends BaseServiceImpl<SysRoleDao, SysRoleEntit
return result.getData(); return result.getData();
} }
@Override
public String getRoleStringIdsByUserId(Long userId) {
return baseDao.getRoleStringIdsByUserId(userId);
}
@Override
public List<Long> getModuleMenuIdList(Long id) {
Result<List<Long>> result = newsFeignClient.getModuleMenuIdList(id);
return result.getData();
}
/** /**
* @param roleId * @param roleId
* @param whistleDeptIdList * @param whistleDeptIdList

20
epdc-cloud-admin/src/main/resources/mapper/AdminImgDao.xml

@ -0,0 +1,20 @@
<?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.elink.esua.epdc.dao.AdminImgDao">
<resultMap type="com.elink.esua.epdc.entity.AdminImgEntity" id="adminImgMap">
<result property="id" column="ID"/>
<result property="referenceId" column="REFERENCE_ID"/>
<result property="imgUrl" column="IMG_URL"/>
<result property="imgType" column="IMG_TYPE"/>
<result property="delFlag" column="DEL_FLAG"/>
<result property="revision" column="REVISION"/>
<result property="createdBy" column="CREATED_BY"/>
<result property="createdTime" column="CREATED_TIME"/>
<result property="updatedBy" column="UPDATED_BY"/>
<result property="updatedTime" column="UPDATED_TIME"/>
</resultMap>
</mapper>

54
epdc-cloud-admin/src/main/resources/mapper/PartyOrgDao.xml

@ -0,0 +1,54 @@
<?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.elink.esua.epdc.dao.PartyOrgDao">
<resultMap type="com.elink.esua.epdc.entity.PartyOrgEntity" id="partyOrgMap">
<result property="id" column="ID"/>
<result property="partyOrgName" column="PARTY_ORG_NAME"/>
<result property="introduction" column="INTRODUCTION"/>
<result property="twoCommittees" column="TWO_COMMITTEES"/>
<result property="partyMemberNum" column="PARTY_MEMBER_NUM"/>
<result property="longitude" column="LONGITUDE"/>
<result property="latitude" column="LATITUDE"/>
<result property="deptName" column="DEPT_NAME"/>
<result property="deptId" column="DEPT_ID"/>
<result property="typeCode" column="TYPE_CODE"/>
<result property="parentDeptIds" column="PARENT_DEPT_IDS"/>
<result property="parentDeptNames" column="PARENT_DEPT_NAMES"/>
<result property="allDeptIds" column="ALL_DEPT_IDS"/>
<result property="allDeptNames" column="ALL_DEPT_NAMES"/>
<result property="delFlag" column="DEL_FLAG"/>
<result property="revision" column="REVISION"/>
<result property="createdBy" column="CREATED_BY"/>
<result property="createdTime" column="CREATED_TIME"/>
<result property="updatedBy" column="UPDATED_BY"/>
<result property="updatedTime" column="UPDATED_TIME"/>
</resultMap>
<select id="isPartyOrgExistByPartyOrgType" resultType="Integer">
SELECT
COUNT(1)
FROM epdc_party_org
WHERE DEL_FLAG = '0'
AND TYPE_CODE = #{typeCode}
</select>
<select id="selectListPartyOrg" resultType="com.elink.esua.epdc.dto.PartyOrgDTO">
SELECT
o.ID id,
REPLACE(o.ALL_DEPT_NAMES, '平阴县-', '') allDeptNames,
o.PARTY_ORG_NAME partyOrgName,
t.TYPE_NAME typeName
FROM epdc_party_org o
LEFT JOIN epdc_party_org_type t ON o.TYPE_CODE = t.TYPE_CODE AND t.DEL_FLAG ='0'
WHERE o.DEL_FLAG ='0'
<if test="deptId != null and deptId.trim() != ''">
AND o.ALL_DEPT_IDS LIKE CONCAT( '%', #{deptId}, '%' )
</if>
<if test="partyOrgName != null and partyOrgName.trim() != ''">
AND o.PARTY_ORG_NAME LIKE CONCAT( '%', #{partyOrgName}, '%' )
</if>
ORDER BY o.CREATED_TIME DESC
</select>
</mapper>

50
epdc-cloud-admin/src/main/resources/mapper/PartyOrgTypeDao.xml

@ -0,0 +1,50 @@
<?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.elink.esua.epdc.dao.PartyOrgTypeDao">
<resultMap type="com.elink.esua.epdc.entity.PartyOrgTypeEntity" id="partyOrgTypeMap">
<result property="id" column="ID"/>
<result property="typeName" column="TYPE_NAME"/>
<result property="typeCode" column="TYPE_CODE"/>
<result property="sort" column="SORT"/>
<result property="enable" column="ENABLE"/>
<result property="delFlag" column="DEL_FLAG"/>
<result property="revision" column="REVISION"/>
<result property="createdBy" column="CREATED_BY"/>
<result property="createdTime" column="CREATED_TIME"/>
<result property="updatedBy" column="UPDATED_BY"/>
<result property="updatedTime" column="UPDATED_TIME"/>
</resultMap>
<select id="isTypeCodeRepeated" resultType="Integer">
SELECT
COUNT(1)
FROM epdc_party_org_type
WHERE DEL_FLAG = '0'
AND TYPE_CODE = #{typeCode}
<if test="id != null and id.trim() != ''">
AND ID != #{id}
</if>
</select>
<select id="isTypeNameRepeated" resultType="Integer">
SELECT
COUNT(1)
FROM epdc_party_org_type
WHERE DEL_FLAG = '0'
AND TYPE_NAME = #{typeName}
<if test="id != null and id.trim() != ''">
AND ID != #{id}
</if>
</select>
<select id="getPartyOrgType" resultType="com.elink.esua.epdc.dto.PartyOrgTypeSelectDTO">
SELECT
TYPE_CODE tagValue,
TYPE_NAME tagName
FROM epdc_party_org_type
WHERE DEL_FLAG = '0'
AND ENABLE = '1'
</select>
</mapper>

26
epdc-cloud-admin/src/main/resources/mapper/SysDeptInfoDao.xml

@ -0,0 +1,26 @@
<?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.elink.esua.epdc.dao.SysDeptInfoDao">
<resultMap type="com.elink.esua.epdc.entity.SysDeptInfoEntity" id="sysDeptInfoMap">
<result property="id" column="ID"/>
<result property="deptId" column="DEPT_ID"/>
<result property="introduction" column="INTRODUCTION"/>
<result property="communityNum" column="COMMUNITY_NUM"/>
<result property="gridNum" column="GRID_NUM"/>
<result property="gridmanNum" column="GRIDMAN_NUM"/>
<result property="partyMemberNum" column="PARTY_MEMBER_NUM"/>
<result property="longitude" column="LONGITUDE"/>
<result property="latitude" column="LATITUDE"/>
<result property="acreage" column="ACREAGE"/>
<result property="delFlag" column="DEL_FLAG"/>
<result property="revision" column="REVISION"/>
<result property="createdBy" column="CREATED_BY"/>
<result property="createdTime" column="CREATED_TIME"/>
<result property="updatedBy" column="UPDATED_BY"/>
<result property="updatedTime" column="UPDATED_TIME"/>
</resultMap>
</mapper>

4
epdc-cloud-admin/src/main/resources/mapper/SysRoleDao.xml

@ -18,4 +18,8 @@
GROUP BY GROUP BY
d.id d.id
</select> </select>
<select id="getRoleStringIdsByUserId" resultType="java.lang.String">
SELECT GROUP_CONCAT(role_id) FROM `sys_role_user`
where user_id=#{userId}
</select>
</mapper> </mapper>

2
epdc-cloud-client-yushan

@ -1 +1 @@
Subproject commit 982b1ff01e69e7cb48180e3d68c94664605ae73e Subproject commit c660ca360356218f48dbdb987f4fba70f7642435

2
epdc-cloud-commons-yushan

@ -1 +1 @@
Subproject commit 5b077ffda98e46ce47e9c5540dabbc50f092968d Subproject commit 235f56d5ea756317efe54c5e0d4be0ac45e09155
Loading…
Cancel
Save