Browse Source

增加网格风采与志愿风采

feature/dangjian
luyan 2 years ago
parent
commit
7096574b1d
  1. 74
      esua-epdc/epdc-admin/epdc-admin-client/src/main/java/com/elink/esua/epdc/dto/GridStyleDTO.java
  2. 74
      esua-epdc/epdc-admin/epdc-admin-client/src/main/java/com/elink/esua/epdc/dto/VoluntaryStyleDTO.java
  3. 100
      esua-epdc/epdc-admin/epdc-admin-server/src/main/java/com/elink/esua/epdc/controller/GridStyleController.java
  4. 99
      esua-epdc/epdc-admin/epdc-admin-server/src/main/java/com/elink/esua/epdc/controller/VoluntaryStyleController.java
  5. 37
      esua-epdc/epdc-admin/epdc-admin-server/src/main/java/com/elink/esua/epdc/dao/GridStyleDao.java
  6. 37
      esua-epdc/epdc-admin/epdc-admin-server/src/main/java/com/elink/esua/epdc/dao/VoluntaryStyleDao.java
  7. 67
      esua-epdc/epdc-admin/epdc-admin-server/src/main/java/com/elink/esua/epdc/entity/GridStyleEntity.java
  8. 68
      esua-epdc/epdc-admin/epdc-admin-server/src/main/java/com/elink/esua/epdc/entity/VoluntaryStyleEntity.java
  9. 53
      esua-epdc/epdc-admin/epdc-admin-server/src/main/java/com/elink/esua/epdc/excel/GridStyleExcel.java
  10. 53
      esua-epdc/epdc-admin/epdc-admin-server/src/main/java/com/elink/esua/epdc/excel/VoluntaryStyleExcel.java
  11. 47
      esua-epdc/epdc-admin/epdc-admin-server/src/main/java/com/elink/esua/epdc/redis/GridStyleRedis.java
  12. 47
      esua-epdc/epdc-admin/epdc-admin-server/src/main/java/com/elink/esua/epdc/redis/VoluntaryStyleRedis.java
  13. 97
      esua-epdc/epdc-admin/epdc-admin-server/src/main/java/com/elink/esua/epdc/service/GridStyleService.java
  14. 102
      esua-epdc/epdc-admin/epdc-admin-server/src/main/java/com/elink/esua/epdc/service/VoluntaryStyleService.java
  15. 156
      esua-epdc/epdc-admin/epdc-admin-server/src/main/java/com/elink/esua/epdc/service/impl/GridStyleServiceImpl.java
  16. 156
      esua-epdc/epdc-admin/epdc-admin-server/src/main/java/com/elink/esua/epdc/service/impl/VoluntaryStyleServiceImpl.java
  17. 44
      esua-epdc/epdc-admin/epdc-admin-server/src/main/resources/mapper/GridStyleDao.xml
  18. 42
      esua-epdc/epdc-admin/epdc-admin-server/src/main/resources/mapper/VoluntaryStyleDao.xml
  19. 20
      esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/controller/ApiAdminController.java
  20. 7
      esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/feign/AdminFeignClient.java
  21. 25
      esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/feign/fallback/AdminFeignClientFallback.java
  22. 14
      esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/service/AdminService.java
  23. 23
      esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/service/impl/AdminServiceImpl.java

74
esua-epdc/epdc-admin/epdc-admin-client/src/main/java/com/elink/esua/epdc/dto/GridStyleDTO.java

@ -0,0 +1,74 @@
/**
* 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.dto;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
/**
* 网格风采
*
* @author elink elink@elink-cn.com
* @since v1.0.0 2023-07-17
*/
@Data
public class GridStyleDTO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 网格风采主键
*/
private String id;
/**
* 标题
*/
private String title;
/**
* 内容
*/
private String content;
/**
* 图片
*/
private String headerPhoto;
/**
* 地址
*/
private String address;
/**
* 时间
*/
private Date date;
private String[] allDeptIds;
private Long deptId;
private String parentDeptNames;
private String allDeptNames;
}

74
esua-epdc/epdc-admin/epdc-admin-client/src/main/java/com/elink/esua/epdc/dto/VoluntaryStyleDTO.java

@ -0,0 +1,74 @@
/**
* 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.dto;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
/**
* 志愿风采
*
* @author elink elink@elink-cn.com
* @since v1.0.0 2023-07-17
*/
@Data
public class VoluntaryStyleDTO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 志愿风采主键
*/
private String id;
/**
* 标题
*/
private String title;
/**
* 内容
*/
private String content;
/**
* 图片
*/
private String headerPhoto;
/**
* 地址
*/
private String address;
/**
* 时间
*/
private Date date;
private String[] allDeptIds;
private Long deptId;
private String parentDeptNames;
private String allDeptNames;
}

100
esua-epdc/epdc-admin/epdc-admin-server/src/main/java/com/elink/esua/epdc/controller/GridStyleController.java

@ -0,0 +1,100 @@
/**
* 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.DefaultGroup;
import com.elink.esua.epdc.commons.tools.validator.group.UpdateGroup;
import com.elink.esua.epdc.dto.GridStyleDTO;
import com.elink.esua.epdc.excel.GridStyleExcel;
import com.elink.esua.epdc.service.GridStyleService;
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 elink elink@elink-cn.com
* @since v1.0.0 2023-07-17
*/
@RestController
@RequestMapping("gridstyle")
public class GridStyleController {
@Autowired
private GridStyleService gridStyleService;
@GetMapping("page")
public Result<PageData<GridStyleDTO>> page(@RequestParam Map<String, Object> params) {
PageData<GridStyleDTO> page = gridStyleService.page(params);
return new Result<PageData<GridStyleDTO>>().ok(page);
}
@GetMapping("{id}")
public Result<GridStyleDTO> get(@PathVariable("id") String id) {
GridStyleDTO data = gridStyleService.get(id);
return new Result<GridStyleDTO>().ok(data);
}
@PostMapping
public Result save(@RequestBody GridStyleDTO dto) {
//效验数据
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class);
gridStyleService.save(dto);
return new Result();
}
@PutMapping
public Result update(@RequestBody GridStyleDTO dto) {
//效验数据
ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class);
gridStyleService.update(dto);
return new Result();
}
@DeleteMapping
public Result delete(@RequestBody String[] ids) {
//效验数据
AssertUtils.isArrayEmpty(ids, "id");
gridStyleService.delete(ids);
return new Result();
}
@GetMapping("export")
public void export(@RequestParam Map<String, Object> params, HttpServletResponse response) throws Exception {
List<GridStyleDTO> list = gridStyleService.list(params);
ExcelUtils.exportExcelToTarget(response, null, list, GridStyleExcel.class);
}
@PostMapping("getListByDeptId")
public Result<List<GridStyleDTO>> getListByDeptId(@RequestBody GridStyleDTO dto) {
return new Result<List<GridStyleDTO>>().ok(gridStyleService.getListByDeptId(dto.getDeptId()));
}
}

99
esua-epdc/epdc-admin/epdc-admin-server/src/main/java/com/elink/esua/epdc/controller/VoluntaryStyleController.java

@ -0,0 +1,99 @@
/**
* 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.DefaultGroup;
import com.elink.esua.epdc.commons.tools.validator.group.UpdateGroup;
import com.elink.esua.epdc.dto.VoluntaryStyleDTO;
import com.elink.esua.epdc.excel.VoluntaryStyleExcel;
import com.elink.esua.epdc.service.VoluntaryStyleService;
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 elink elink@elink-cn.com
* @since v1.0.0 2023-07-17
*/
@RestController
@RequestMapping("voluntarystyle")
public class VoluntaryStyleController {
@Autowired
private VoluntaryStyleService voluntaryStyleService;
@GetMapping("page")
public Result<PageData<VoluntaryStyleDTO>> page(@RequestParam Map<String, Object> params) {
PageData<VoluntaryStyleDTO> page = voluntaryStyleService.page(params);
return new Result<PageData<VoluntaryStyleDTO>>().ok(page);
}
@GetMapping("{id}")
public Result<VoluntaryStyleDTO> get(@PathVariable("id") String id) {
VoluntaryStyleDTO data = voluntaryStyleService.get(id);
return new Result<VoluntaryStyleDTO>().ok(data);
}
@PostMapping
public Result save(@RequestBody VoluntaryStyleDTO dto) {
//效验数据
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class);
voluntaryStyleService.save(dto);
return new Result();
}
@PutMapping
public Result update(@RequestBody VoluntaryStyleDTO dto) {
//效验数据
ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class);
voluntaryStyleService.update(dto);
return new Result();
}
@DeleteMapping
public Result delete(@RequestBody String[] ids) {
//效验数据
AssertUtils.isArrayEmpty(ids, "id");
voluntaryStyleService.delete(ids);
return new Result();
}
@GetMapping("export")
public void export(@RequestParam Map<String, Object> params, HttpServletResponse response) throws Exception {
List<VoluntaryStyleDTO> list = voluntaryStyleService.list(params);
ExcelUtils.exportExcelToTarget(response, null, list, VoluntaryStyleExcel.class);
}
@PostMapping("getListByDeptId")
public Result<List<VoluntaryStyleDTO>> getListByDeptId(@RequestBody VoluntaryStyleDTO dto) {
return new Result<List<VoluntaryStyleDTO>>().ok(voluntaryStyleService.getListByDeptId(dto.getDeptId()));
}
}

37
esua-epdc/epdc-admin/epdc-admin-server/src/main/java/com/elink/esua/epdc/dao/GridStyleDao.java

@ -0,0 +1,37 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.elink.esua.epdc.dao;
import com.elink.esua.epdc.commons.mybatis.dao.BaseDao;
import com.elink.esua.epdc.entity.GridStyleEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* 网格风采
*
* @author elink elink@elink-cn.com
* @since v1.0.0 2023-07-17
*/
@Mapper
public interface GridStyleDao extends BaseDao<GridStyleEntity> {
List<GridStyleEntity> getListByDeptId(@Param("deptId") Long deptId);
}

37
esua-epdc/epdc-admin/epdc-admin-server/src/main/java/com/elink/esua/epdc/dao/VoluntaryStyleDao.java

@ -0,0 +1,37 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.elink.esua.epdc.dao;
import com.elink.esua.epdc.commons.mybatis.dao.BaseDao;
import com.elink.esua.epdc.entity.VoluntaryStyleEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* 志愿风采
*
* @author elink elink@elink-cn.com
* @since v1.0.0 2023-07-17
*/
@Mapper
public interface VoluntaryStyleDao extends BaseDao<VoluntaryStyleEntity> {
List<VoluntaryStyleEntity> getListByDeptId(@Param("deptId") Long deptId);
}

67
esua-epdc/epdc-admin/epdc-admin-server/src/main/java/com/elink/esua/epdc/entity/GridStyleEntity.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.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import com.elink.esua.epdc.commons.mybatis.entity.DeptScope;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.util.Date;
/**
* 网格风采
*
* @author elink elink@elink-cn.com
* @since v1.0.0 2023-07-17
*/
@Data
@EqualsAndHashCode(callSuper=false)
@TableName("grid_style")
public class GridStyleEntity extends DeptScope {
private static final long serialVersionUID = 1L;
/**
* 标题
*/
private String title;
/**
* 内容
*/
private String content;
/**
* 图片
*/
private String headerPhoto;
/**
* 地址
*/
private String address;
/**
* 时间
*/
private Date date;
private String deptId;
}

68
esua-epdc/epdc-admin/epdc-admin-server/src/main/java/com/elink/esua/epdc/entity/VoluntaryStyleEntity.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.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import com.elink.esua.epdc.commons.mybatis.entity.DeptScope;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.util.Date;
/**
* 志愿风采
*
* @author elink elink@elink-cn.com
* @since v1.0.0 2023-07-17
*/
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("voluntary_style")
public class VoluntaryStyleEntity extends DeptScope {
private static final long serialVersionUID = 2742920848306891141L;
/**
* 标题
*/
private String title;
/**
* 内容
*/
private String content;
/**
* 图片
*/
private String headerPhoto;
/**
* 地址
*/
private String address;
/**
* 时间
*/
private Date date;
private String deptId;
}

53
esua-epdc/epdc-admin/epdc-admin-server/src/main/java/com/elink/esua/epdc/excel/GridStyleExcel.java

@ -0,0 +1,53 @@
/**
* 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 elink elink@elink-cn.com
* @since v1.0.0 2023-07-17
*/
@Data
public class GridStyleExcel {
@Excel(name = "网格风采主键")
private String id;
@Excel(name = "标题")
private String title;
@Excel(name = "内容")
private String content;
@Excel(name = "图片")
private String headerPhoto;
@Excel(name = "地址")
private String address;
@Excel(name = "时间")
private Date date;
}

53
esua-epdc/epdc-admin/epdc-admin-server/src/main/java/com/elink/esua/epdc/excel/VoluntaryStyleExcel.java

@ -0,0 +1,53 @@
/**
* 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 elink elink@elink-cn.com
* @since v1.0.0 2023-07-17
*/
@Data
public class VoluntaryStyleExcel {
@Excel(name = "志愿风采主键")
private String id;
@Excel(name = "标题")
private String title;
@Excel(name = "内容")
private String content;
@Excel(name = "图片")
private String headerPhoto;
@Excel(name = "地址")
private String address;
@Excel(name = "时间")
private Date date;
}

47
esua-epdc/epdc-admin/epdc-admin-server/src/main/java/com/elink/esua/epdc/redis/GridStyleRedis.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 elink elink@elink-cn.com
* @since v1.0.0 2023-07-17
*/
@Component
public class GridStyleRedis {
@Autowired
private RedisUtils redisUtils;
public void delete(Object[] ids) {
}
public void set(){
}
public String get(String id){
return null;
}
}

47
esua-epdc/epdc-admin/epdc-admin-server/src/main/java/com/elink/esua/epdc/redis/VoluntaryStyleRedis.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 elink elink@elink-cn.com
* @since v1.0.0 2023-07-17
*/
@Component
public class VoluntaryStyleRedis {
@Autowired
private RedisUtils redisUtils;
public void delete(Object[] ids) {
}
public void set(){
}
public String get(String id){
return null;
}
}

97
esua-epdc/epdc-admin/epdc-admin-server/src/main/java/com/elink/esua/epdc/service/GridStyleService.java

@ -0,0 +1,97 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.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.GridStyleDTO;
import com.elink.esua.epdc.entity.GridStyleEntity;
import java.util.List;
import java.util.Map;
/**
* 网格风采
*
* @author elink elink@elink-cn.com
* @since v1.0.0 2023-07-17
*/
public interface GridStyleService extends BaseService<GridStyleEntity> {
/**
* 默认分页
*
* @param params
* @return PageData<GridStyleDTO>
* @author generator
* @date 2023-07-17
*/
PageData<GridStyleDTO> page(Map<String, Object> params);
/**
* 默认查询
*
* @param params
* @return java.util.List<GridStyleDTO>
* @author generator
* @date 2023-07-17
*/
List<GridStyleDTO> list(Map<String, Object> params);
/**
* 单条查询
*
* @param id
* @return GridStyleDTO
* @author generator
* @date 2023-07-17
*/
GridStyleDTO get(String id);
/**
* 默认保存
*
* @param dto
* @return void
* @author generator
* @date 2023-07-17
*/
void save(GridStyleDTO dto);
/**
* 默认更新
*
* @param dto
* @return void
* @author generator
* @date 2023-07-17
*/
void update(GridStyleDTO dto);
/**
* 批量删除
*
* @param ids
* @return void
* @author generator
* @date 2023-07-17
*/
void delete(String[] ids);
List<GridStyleDTO> getListByDeptId(Long deptId);
}

102
esua-epdc/epdc-admin/epdc-admin-server/src/main/java/com/elink/esua/epdc/service/VoluntaryStyleService.java

@ -0,0 +1,102 @@
/**
* 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.VoluntaryStyleDTO;
import com.elink.esua.epdc.entity.VoluntaryStyleEntity;
import java.util.List;
import java.util.Map;
/**
* 志愿风采
*
* @author elink elink@elink-cn.com
* @since v1.0.0 2023-07-17
*/
public interface VoluntaryStyleService extends BaseService<VoluntaryStyleEntity> {
/**
* 默认分页
*
* @param params
* @return PageData<VoluntaryStyleDTO>
* @author generator
* @date 2023-07-17
*/
PageData<VoluntaryStyleDTO> page(Map<String, Object> params);
/**
* 默认查询
*
* @param params
* @return java.util.List<VoluntaryStyleDTO>
* @author generator
* @date 2023-07-17
*/
List<VoluntaryStyleDTO> list(Map<String, Object> params);
/**
* 单条查询
*
* @param id
* @return VoluntaryStyleDTO
* @author generator
* @date 2023-07-17
*/
VoluntaryStyleDTO get(String id);
/**
* 默认保存
*
* @param dto
* @return void
* @author generator
* @date 2023-07-17
*/
void save(VoluntaryStyleDTO dto);
/**
* 默认更新
*
* @param dto
* @return void
* @author generator
* @date 2023-07-17
*/
void update(VoluntaryStyleDTO dto);
/**
* 批量删除
*
* @param ids
* @return void
* @author generator
* @date 2023-07-17
*/
void delete(String[] ids);
/**
* 根据组织ID获取志愿风采
* @param deptId
* @return
*/
List<VoluntaryStyleDTO> getListByDeptId(Long deptId);
}

156
esua-epdc/epdc-admin/epdc-admin-server/src/main/java/com/elink/esua/epdc/service/impl/GridStyleServiceImpl.java

@ -0,0 +1,156 @@
/**
* 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.FieldConstant;
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.security.user.SecurityUser;
import com.elink.esua.epdc.commons.tools.security.user.UserDetail;
import com.elink.esua.epdc.commons.tools.utils.ConvertUtils;
import com.elink.esua.epdc.dao.GridStyleDao;
import com.elink.esua.epdc.dto.GridStyleDTO;
import com.elink.esua.epdc.dto.ParentAndAllDeptDTO;
import com.elink.esua.epdc.entity.GridStyleEntity;
import com.elink.esua.epdc.service.GridStyleService;
import com.elink.esua.epdc.service.SysDeptService;
import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import javax.annotation.Resource;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
/**
* 网格风采
*
* @author elink elink@elink-cn.com
* @since v1.0.0 2023-07-17
*/
@Service
public class GridStyleServiceImpl extends BaseServiceImpl<GridStyleDao, GridStyleEntity> implements GridStyleService {
@Resource
private SysDeptService deptService;
@Override
public PageData<GridStyleDTO> page(Map<String, Object> params) {
IPage<GridStyleEntity> page = baseDao.selectPage(
getPage(params, FieldConstant.CREATED_TIME, false),
getWrapper(params)
);
return getPageData(page, GridStyleDTO.class);
}
@Override
public List<GridStyleDTO> list(Map<String, Object> params) {
List<GridStyleEntity> entityList = baseDao.selectList(getWrapper(params));
return ConvertUtils.sourceToTarget(entityList, GridStyleDTO.class);
}
private QueryWrapper<GridStyleEntity> getWrapper(Map<String, Object> params) {
String id = (String) params.get(FieldConstant.ID_HUMP);
String title = (String) params.get("title");
QueryWrapper<GridStyleEntity> wrapper = new QueryWrapper<>();
wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id);
wrapper.like(StringUtils.isNotBlank(title), "TITLE", title);
return wrapper;
}
@Override
public GridStyleDTO get(String id) {
GridStyleEntity entity = baseDao.selectById(id);
GridStyleDTO dto = ConvertUtils.sourceToTarget(entity, GridStyleDTO.class);
if (null != entity.getAllDeptIds()) {
dto.setAllDeptIds(entity.getAllDeptIds().split(","));
dto.setDeptId(Long.valueOf(entity.getDeptId()));
}
return dto;
}
@Override
@Transactional(rollbackFor = Exception.class)
public void save(GridStyleDTO dto) {
if (dto.getAllDeptIds().length == 0) {
setDeptId(dto);
}
GridStyleEntity entity = ConvertUtils.sourceToTarget(dto, GridStyleEntity.class);
biuldDept(dto, entity);
insert(entity);
}
@Override
@Transactional(rollbackFor = Exception.class)
public void update(GridStyleDTO dto) {
GridStyleEntity entity = ConvertUtils.sourceToTarget(dto, GridStyleEntity.class);
biuldDept(dto, entity);
updateById(entity);
}
@Override
@Transactional(rollbackFor = Exception.class)
public void delete(String[] ids) {
// 逻辑删除(@TableLogic 注解)
baseDao.deleteBatchIds(Arrays.asList(ids));
}
@Override
public List<GridStyleDTO> getListByDeptId(Long deptId) {
if (null != deptId) {
List<GridStyleEntity> entities = baseDao.getListByDeptId(deptId);
return ConvertUtils.sourceToTarget(entities, GridStyleDTO.class);
} else
return new ArrayList<>();
}
private void setDeptId(GridStyleDTO dto) {
UserDetail user = SecurityUser.getUser();
String deptId = String.valueOf(user.getDeptId());
dto.setDeptId(user.getDeptId());
dto.setAllDeptIds(new String[]{deptId});
}
private void biuldDept(GridStyleDTO dto, GridStyleEntity entity) {
ParentAndAllDeptDTO parentResult;
String deptId = "";
if (dto.getAllDeptIds() != null && dto.getAllDeptIds().length > 1) {
deptId = dto.getAllDeptIds()[dto.getAllDeptIds().length - 1];
entity.setDeptId(deptId);
parentResult = deptService.getParentAndAllDept(deptId);
} else {
parentResult = deptService.getParentAndAllDept(deptId);
}
if (null == parentResult) {
throw new RenException("获取部门信息失败");
} else {
entity.setAllDeptIds(parentResult.getAllDeptIds());
entity.setAllDeptNames(parentResult.getAllDeptNames());
entity.setParentDeptIds(parentResult.getParentDeptIds());
entity.setParentDeptNames(parentResult.getParentDeptNames());
}
}
}

156
esua-epdc/epdc-admin/epdc-admin-server/src/main/java/com/elink/esua/epdc/service/impl/VoluntaryStyleServiceImpl.java

@ -0,0 +1,156 @@
/**
* 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.FieldConstant;
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.security.user.SecurityUser;
import com.elink.esua.epdc.commons.tools.security.user.UserDetail;
import com.elink.esua.epdc.commons.tools.utils.ConvertUtils;
import com.elink.esua.epdc.dao.VoluntaryStyleDao;
import com.elink.esua.epdc.dto.ParentAndAllDeptDTO;
import com.elink.esua.epdc.dto.VoluntaryStyleDTO;
import com.elink.esua.epdc.entity.VoluntaryStyleEntity;
import com.elink.esua.epdc.service.SysDeptService;
import com.elink.esua.epdc.service.VoluntaryStyleService;
import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import javax.annotation.Resource;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
/**
* 志愿风采
*
* @author elink elink@elink-cn.com
* @since v1.0.0 2023-07-17
*/
@Service
public class VoluntaryStyleServiceImpl extends BaseServiceImpl<VoluntaryStyleDao, VoluntaryStyleEntity> implements VoluntaryStyleService {
@Resource
private SysDeptService deptService;
@Override
public PageData<VoluntaryStyleDTO> page(Map<String, Object> params) {
IPage<VoluntaryStyleEntity> page = baseDao.selectPage(
getPage(params, FieldConstant.CREATED_TIME, false),
getWrapper(params)
);
return getPageData(page, VoluntaryStyleDTO.class);
}
@Override
public List<VoluntaryStyleDTO> list(Map<String, Object> params) {
List<VoluntaryStyleEntity> entityList = baseDao.selectList(getWrapper(params));
return ConvertUtils.sourceToTarget(entityList, VoluntaryStyleDTO.class);
}
private QueryWrapper<VoluntaryStyleEntity> getWrapper(Map<String, Object> params) {
String id = (String) params.get(FieldConstant.ID_HUMP);
String title = (String) params.get("title");
QueryWrapper<VoluntaryStyleEntity> wrapper = new QueryWrapper<>();
wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id);
wrapper.like(StringUtils.isNotBlank(title), "TITLE", title);
return wrapper;
}
@Override
public VoluntaryStyleDTO get(String id) {
VoluntaryStyleEntity entity = baseDao.selectById(id);
VoluntaryStyleDTO dto = ConvertUtils.sourceToTarget(entity, VoluntaryStyleDTO.class);
if (null != entity.getAllDeptIds()) {
dto.setAllDeptIds(entity.getAllDeptIds().split(","));
dto.setDeptId(Long.valueOf(entity.getDeptId()));
}
return dto;
}
@Override
@Transactional(rollbackFor = Exception.class)
public void save(VoluntaryStyleDTO dto) {
if (dto.getAllDeptIds().length == 0) {
setDeptId(dto);
}
VoluntaryStyleEntity entity = ConvertUtils.sourceToTarget(dto, VoluntaryStyleEntity.class);
biuldDept(dto, entity);
insert(entity);
}
@Override
@Transactional(rollbackFor = Exception.class)
public void update(VoluntaryStyleDTO dto) {
VoluntaryStyleEntity entity = ConvertUtils.sourceToTarget(dto, VoluntaryStyleEntity.class);
biuldDept(dto, entity);
updateById(entity);
}
@Override
@Transactional(rollbackFor = Exception.class)
public void delete(String[] ids) {
// 逻辑删除(@TableLogic 注解)
baseDao.deleteBatchIds(Arrays.asList(ids));
}
@Override
public List<VoluntaryStyleDTO> getListByDeptId(Long deptId) {
if (null != deptId) {
List<VoluntaryStyleEntity> entities = baseDao.getListByDeptId(deptId);
return ConvertUtils.sourceToTarget(entities, VoluntaryStyleDTO.class);
} else
return new ArrayList<>();
}
private void setDeptId(VoluntaryStyleDTO dto) {
UserDetail user = SecurityUser.getUser();
String deptId = String.valueOf(user.getDeptId());
dto.setDeptId(user.getDeptId());
dto.setAllDeptIds(new String[]{deptId});
}
private void biuldDept(VoluntaryStyleDTO dto, VoluntaryStyleEntity entity) {
ParentAndAllDeptDTO parentResult;
String deptId = "";
if (dto.getAllDeptIds() != null && dto.getAllDeptIds().length > 1) {
deptId = dto.getAllDeptIds()[dto.getAllDeptIds().length - 1];
entity.setDeptId(deptId);
parentResult = deptService.getParentAndAllDept(deptId);
} else {
parentResult = deptService.getParentAndAllDept(deptId);
}
if (null == parentResult) {
throw new RenException("获取部门信息失败");
} else {
entity.setAllDeptIds(parentResult.getAllDeptIds());
entity.setAllDeptNames(parentResult.getAllDeptNames());
entity.setParentDeptIds(parentResult.getParentDeptIds());
entity.setParentDeptNames(parentResult.getParentDeptNames());
}
}
}

44
esua-epdc/epdc-admin/epdc-admin-server/src/main/resources/mapper/GridStyleDao.xml

@ -0,0 +1,44 @@
<?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.GridStyleDao">
<resultMap type="com.elink.esua.epdc.entity.GridStyleEntity" id="gridStyleMap">
<result property="id" column="ID"/>
<result property="title" column="TITLE"/>
<result property="content" column="CONTENT"/>
<result property="headerPhoto" column="HEADER_PHOTO"/>
<result property="address" column="ADDRESS"/>
<result property="date" column="DATE"/>
<result property="deptId" column="DEPT_ID"/>
<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="getListByDeptId" resultType="com.elink.esua.epdc.entity.GridStyleEntity">
select
gs.ID,
gs.TITLE,
gs.CONTENT,
gs.HEADER_PHOTO,
gs.ADDRESS,
gs.DATE,
gs.DEPT_ID,
gs.ALL_DEPT_IDS,
gs.ALL_DEPT_NAMES,
gs.PARENT_DEPT_IDS,
gs.PARENT_DEPT_NAMES
from grid_style gs
where gs.DEL_FLAG = 0 and gs.DEPT_ID = #{deptId}
</select>
</mapper>

42
esua-epdc/epdc-admin/epdc-admin-server/src/main/resources/mapper/VoluntaryStyleDao.xml

@ -0,0 +1,42 @@
<?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.VoluntaryStyleDao">
<resultMap type="com.elink.esua.epdc.entity.VoluntaryStyleEntity" id="voluntaryStyleMap">
<result property="id" column="ID"/>
<result property="title" column="TITLE"/>
<result property="content" column="CONTENT"/>
<result property="headerPhoto" column="HEADER_PHOTO"/>
<result property="address" column="ADDRESS"/>
<result property="date" column="DATE"/>
<result property="deptId" column="DEPT_ID"/>
<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="getListByDeptId" resultType="com.elink.esua.epdc.entity.VoluntaryStyleEntity">
select
vs.ID,
vs.TITLE,
vs.CONTENT,
vs.HEADER_PHOTO,
vs.ADDRESS,
vs.DATE,
vs.DEPT_ID,
vs.ALL_DEPT_IDS,
vs.ALL_DEPT_NAMES,
vs.PARENT_DEPT_IDS,
vs.PARENT_DEPT_NAMES
from voluntary_style vs
where vs.DEL_FLAG = 0 and vs.DEPT_ID = #{deptId}
</select>
</mapper>

20
esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/controller/ApiAdminController.java

@ -10,6 +10,7 @@ import com.elink.esua.epdc.service.AdminService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import javax.websocket.server.PathParam;
import java.util.List;
/**
@ -126,4 +127,23 @@ public class ApiAdminController {
return adminService.listSimpleDictInfo(dictType);
}
/**
* 网格风采
* @param deptId
* @return
*/
@GetMapping("sys/gridstyle/getListByDeptId")
public Result<List<GridStyleDTO>> getGridStyleListByDeptId(@PathParam("deptId") String deptId) {
return adminService.getGridStyleListByDeptId(deptId);
}
/**
* 志愿风采
* @param deptId
* @return
*/
@GetMapping("sys/voluntarystyle/getListByDeptId")
public Result<List<VoluntaryStyleDTO>> getVoluntarystyleListByDeptId(@PathParam("deptId") String deptId) {
return adminService.getVoluntarystyleListByDeptId(deptId);
}
}

7
esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/feign/AdminFeignClient.java

@ -27,7 +27,7 @@ import java.util.List;
* @date 2019/9/7 9:27
*/
//@FeignClient(name = ServiceConstant.EPDC_ADMIN_SERVER, fallback = AdminFeignClientFallback.class, url = "http://127.0.0.1:9092")
@FeignClient(name = ServiceConstant.EPDC_ADMIN_SERVER, fallback = AdminFeignClientFallback.class)
@FeignClient(name = ServiceConstant.EPDC_ADMIN_SERVER, fallback = AdminFeignClientFallback.class)
public interface AdminFeignClient {
/**
@ -211,4 +211,9 @@ public interface AdminFeignClient {
@GetMapping("sys/appsys/listSimple/{dictType}")
Result<List<SysSimpleDictDTO>> listSimpleDictInfo(@PathVariable("dictType") String dictType);
@PostMapping("sys/gridstyle/getListByDeptId")
Result<List<GridStyleDTO>> getGridStyleListByDeptId(GridStyleDTO dto);
@PostMapping("sys/voluntarystyle/getListByDeptId")
Result<List<VoluntaryStyleDTO>> getVoluntarystyleListByDeptId(VoluntaryStyleDTO dto);
}

25
esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/feign/fallback/AdminFeignClientFallback.java

@ -27,6 +27,7 @@ public class AdminFeignClientFallback implements AdminFeignClient {
public Result<CompleteDeptDTO> getCompleteDept(Long gridId) {
return ModuleUtils.feignConError(ServiceConstant.EPDC_ADMIN_SERVER, "getCompleteDept", gridId);
}
@Override
public Result<ParentAndAllDeptDTO> getParentAndAllDept(Long deptId) {
return ModuleUtils.feignConError(ServiceConstant.EPDC_ADMIN_SERVER, "getParentAndAllDept", deptId);
@ -64,27 +65,27 @@ public class AdminFeignClientFallback implements AdminFeignClient {
@Override
public Result updateAvatar(String avatar) {
return ModuleUtils.feignConError(ServiceConstant.EPDC_ADMIN_SERVER, "updateAvatar",avatar);
return ModuleUtils.feignConError(ServiceConstant.EPDC_ADMIN_SERVER, "updateAvatar", avatar);
}
@Override
public Result modifyPwd(ModifyPwdDTO dto) {
return ModuleUtils.feignConError(ServiceConstant.EPDC_ADMIN_SERVER, "modifyPwd",dto);
return ModuleUtils.feignConError(ServiceConstant.EPDC_ADMIN_SERVER, "modifyPwd", dto);
}
@Override
public Result getDeptTypeKey(Long deptId) {
return ModuleUtils.feignConError(ServiceConstant.EPDC_ADMIN_SERVER, "getDeptTypeKey",deptId);
return ModuleUtils.feignConError(ServiceConstant.EPDC_ADMIN_SERVER, "getDeptTypeKey", deptId);
}
@Override
public Result userRelationWorkAndAnalyOpenId(SendMessageFormDTO formDto) {
return ModuleUtils.feignConError(ServiceConstant.EPDC_ADMIN_SERVER, "userRelationWorkAndAnalyOpenId",formDto);
return ModuleUtils.feignConError(ServiceConstant.EPDC_ADMIN_SERVER, "userRelationWorkAndAnalyOpenId", formDto);
}
@Override
public Result getAppMenu(AppUserIdMenuDTO dto) {
return ModuleUtils.feignConError(ServiceConstant.EPDC_ADMIN_SERVER, "getAppMenu",dto);
return ModuleUtils.feignConError(ServiceConstant.EPDC_ADMIN_SERVER, "getAppMenu", dto);
}
@Override
@ -104,16 +105,26 @@ public class AdminFeignClientFallback implements AdminFeignClient {
@Override
public Result<DeptItudeResultDTO> getDeptIdByItude(DeptItudeFormDTO dto) {
return ModuleUtils.feignConError(ServiceConstant.EPDC_ADMIN_SERVER, "getDeptIdByItude",dto);
return ModuleUtils.feignConError(ServiceConstant.EPDC_ADMIN_SERVER, "getDeptIdByItude", dto);
}
@Override
public Result<GisGridDTO> getGridByCoordinate(GisFormDTO formDTO) {
return ModuleUtils.feignConError(ServiceConstant.EPDC_ADMIN_SERVER, "getGridByCoordinate",formDTO);
return ModuleUtils.feignConError(ServiceConstant.EPDC_ADMIN_SERVER, "getGridByCoordinate", formDTO);
}
@Override
public Result<List<SysSimpleDictDTO>> listSimpleDictInfo(@PathVariable("dictType") String dictType) {
return ModuleUtils.feignConError(ServiceConstant.EPDC_ADMIN_SERVER, "listSimpleDictInfo", dictType);
}
@Override
public Result<List<GridStyleDTO>> getGridStyleListByDeptId(GridStyleDTO dto) {
return ModuleUtils.feignConError(ServiceConstant.EPDC_ADMIN_SERVER, "getGridStyleListByDeptId", dto);
}
@Override
public Result<List<VoluntaryStyleDTO>> getVoluntarystyleListByDeptId(VoluntaryStyleDTO dto) {
return ModuleUtils.feignConError(ServiceConstant.EPDC_ADMIN_SERVER, "getVoluntarystyleListByDeptId", dto);
}
}

14
esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/service/AdminService.java

@ -92,4 +92,18 @@ public interface AdminService {
Result<List<SysSimpleDictDTO>> listSimpleDictInfo(String dictType);
Result<DeptOption> getDeptTree();
/**
* 根据部门ID获取网格风采
* @param deptId
* @return
*/
Result<List<GridStyleDTO>> getGridStyleListByDeptId(String deptId);
/**
* 根据部门ID获取志愿风采
* @param deptId
* @return
*/
Result<List<VoluntaryStyleDTO>> getVoluntarystyleListByDeptId(String deptId);
}

23
esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/service/impl/AdminServiceImpl.java

@ -39,6 +39,7 @@ public class AdminServiceImpl implements AdminService {
.concat(completeDept.getGrid());
return new Result().ok(deptName);
}
@Override
public Result<CompleteDeptDTO> getComplete(Long gridId) {
Result<CompleteDeptDTO> adminResult = adminFeignClient.getCompleteDept(gridId);
@ -55,7 +56,7 @@ public class AdminServiceImpl implements AdminService {
@Override
public Result getAreaInfo(CityAreaFormDTO formDto) {
log.info("formDto:"+formDto);
log.info("formDto:" + formDto);
return adminFeignClient.getAreaInfo(formDto);
}
@ -69,6 +70,26 @@ public class AdminServiceImpl implements AdminService {
return adminFeignClient.getDeptTree();
}
@Override
public Result<List<GridStyleDTO>> getGridStyleListByDeptId(String deptId) {
if (null != deptId) {
GridStyleDTO dto = new GridStyleDTO();
dto.setDeptId(Long.valueOf(deptId));
return adminFeignClient.getGridStyleListByDeptId(dto);
} else
return new Result<>();
}
@Override
public Result<List<VoluntaryStyleDTO>> getVoluntarystyleListByDeptId(String deptId) {
if (null != deptId) {
VoluntaryStyleDTO dto = new VoluntaryStyleDTO();
dto.setDeptId(Long.valueOf(deptId));
return adminFeignClient.getVoluntarystyleListByDeptId(dto);
} else
return new Result<>();
}
@Override
public Result<DeptItudeResultDTO> getDeptIdByItude(DeptItudeFormDTO dto) {
return adminFeignClient.getDeptIdByItude(dto);

Loading…
Cancel
Save