diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/work/ActListCommonFormDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/work/ActListCommonFormDTO.java
new file mode 100644
index 0000000000..bc89178a5c
--- /dev/null
+++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/work/ActListCommonFormDTO.java
@@ -0,0 +1,23 @@
+package com.epmet.dto.form.work;
+
+import lombok.Data;
+
+import javax.validation.constraints.NotBlank;
+import java.io.Serializable;
+
+/**
+ * 描述一下
+ *
+ * @author yinzuomei@elink-cn.com
+ * @date 2020/7/23 21:21
+ */
+@Data
+public class ActListCommonFormDTO implements Serializable {
+ private static final long serialVersionUID = -8014343076037268806L;
+ public interface AddUserInternalGroup {}
+ /**
+ * 客户id
+ */
+ @NotBlank(message = "客户id不能为空", groups = {AddUserInternalGroup.class })
+ private String customerId;
+}
diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/work/Grid.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/work/Grid.java
new file mode 100644
index 0000000000..581eac9d9a
--- /dev/null
+++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/work/Grid.java
@@ -0,0 +1,44 @@
+/**
+ * Copyright 2018 人人开源 https://www.renren.io
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+package com.epmet.dto.result.work;
+
+import lombok.Data;
+
+import java.io.Serializable;
+
+
+/**
+ * 添加组织-接口返参
+ *
+ * @author sun
+ */
+@Data
+public class Grid implements Serializable {
+
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * 网格Id
+ */
+ private String gridId = "";
+ /**
+ * 机关-网格名称
+ */
+ private String agencyGridName = "";
+
+}
\ No newline at end of file
diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/work/InProgressActResultDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/work/InProgressActResultDTO.java
new file mode 100644
index 0000000000..edf6102c7c
--- /dev/null
+++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/work/InProgressActResultDTO.java
@@ -0,0 +1,71 @@
+package com.epmet.dto.result.work;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import lombok.Data;
+
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * 描述一下
+ *
+ * @author yinzuomei@elink-cn.com
+ * @date 2020/7/23 21:23
+ */
+@Data
+public class InProgressActResultDTO implements Serializable {
+ private static final long serialVersionUID = -2631607663760353230L;
+
+ /**
+ *活动id
+ */
+ private String actId;
+
+ /**
+ *活动标题
+ */
+ private String title;
+
+ /**
+ * 活动封面
+ */
+ private String coverPic;
+
+ /**
+ * 活动状态:报名中:signing_up;截止报名: end_sign_up; 已开始: in_progress; 已报满: enough
+ */
+ private String status="";
+
+ /**
+ * 活动预计开始时间yyyy-MM-dd HH:mm
+ */
+ @JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8")
+ private Date actStartTime;
+
+ /**
+ * 活动预计结束时间yyyy-MM-dd HH:mm
+ */
+ @JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8")
+ private Date actEndTime;
+
+ /**
+ * true:固定名额 false: 不限制名额
+ */
+ private Boolean actQuotaCategory;
+
+ /**
+ * 活动名额人数
+ */
+ private Integer actQuota;
+
+ /**
+ * 已报名人数
+ */
+ private Integer signedUp;
+
+ @JsonIgnore
+ private Date signUpEndTime;
+ @JsonIgnore
+ private Date signUpStartTime;
+}
diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/work/SponsorResultDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/work/SponsorResultDTO.java
new file mode 100644
index 0000000000..ee7006381f
--- /dev/null
+++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/work/SponsorResultDTO.java
@@ -0,0 +1,29 @@
+package com.epmet.dto.result.work;
+
+import lombok.Data;
+
+import java.io.Serializable;
+import java.util.List;
+
+/**
+ * 描述一下
+ *
+ * @author yinzuomei@elink-cn.com
+ * @date 2020/7/23 20:23
+ */
+@Data
+public class SponsorResultDTO implements Serializable {
+ private static final long serialVersionUID = 2781093523201803701L;
+ /**
+ * 机关组织Id
+ */
+ private String agencyId = "";
+ /**
+ * 机关组织名称
+ */
+ private String agencyName = "";
+ /**
+ * 机关下网格列表信息
+ */
+ private List agencyGridList;
+}
diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/WorkActController.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/WorkActController.java
index 4bc41c41d3..e7ce6b50a8 100644
--- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/WorkActController.java
+++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/WorkActController.java
@@ -1,8 +1,18 @@
package com.epmet.controller;
+import com.epmet.commons.tools.utils.Result;
+import com.epmet.commons.tools.validator.ValidatorUtils;
+import com.epmet.dto.form.work.ActListCommonFormDTO;
+import com.epmet.dto.result.work.InProgressActResultDTO;
+import com.epmet.dto.result.work.SponsorResultDTO;
+import com.epmet.service.WorkActService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
+import java.util.List;
+
/**
* 工作端-发布活动相关api
*
@@ -12,4 +22,31 @@ import org.springframework.web.bind.annotation.RestController;
@RestController
@RequestMapping("/work/act")
public class WorkActController {
+ @Autowired
+ private WorkActService workActService;
+
+ /**
+ * @return com.epmet.commons.tools.utils.Result
+ * @param
+ * @author yinzuomei
+ * @description 活动主办方
+ * @Date 2020/7/23 20:37
+ **/
+ @PostMapping("sponsorlist")
+ public Result querySponsorList(){
+ return new Result().ok(workActService.querySponsorList());
+ }
+
+ /**
+ * @return com.epmet.commons.tools.utils.Result
+ * @param formDTO
+ * @author yinzuomei
+ * @description 进行中活动列表
+ * @Date 2020/7/23 21:24
+ **/
+ @PostMapping("inprogresslist")
+ public Result> queryInProgressList(ActListCommonFormDTO formDTO){
+ ValidatorUtils.validateEntity(formDTO,ActListCommonFormDTO.AddUserInternalGroup.class);
+ return new Result>().ok(workActService.queryInProgressList(formDTO));
+ }
}
diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/ActInfoDao.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/ActInfoDao.java
index 802096fd8f..6166d5ffdd 100644
--- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/ActInfoDao.java
+++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/ActInfoDao.java
@@ -25,6 +25,7 @@ import com.epmet.dto.form.resi.ResiLatestActFormDTO;
import com.epmet.dto.form.resi.ResiMyActFormDTO;
import com.epmet.dto.result.resi.*;
import com.epmet.dto.result.work.ActSignUpStatResultDTO;
+import com.epmet.dto.result.work.InProgressActResultDTO;
import com.epmet.entity.ActInfoEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
@@ -225,4 +226,13 @@ public interface ActInfoDao extends BaseDao {
* @Date 17:17 2020-07-23
**/
Integer checkActTime(ActInfoDTO actInfoDTO);
+
+ /**
+ * @return java.util.List
+ * @param customerId
+ * @author yinzuomei
+ * @description 查询正在进行中的活动列表
+ * @Date 2020/7/23 21:58
+ **/
+ List selectInprogress(String customerId);
}
diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/WorkActService.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/WorkActService.java
new file mode 100644
index 0000000000..4a623371c8
--- /dev/null
+++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/WorkActService.java
@@ -0,0 +1,33 @@
+package com.epmet.service;
+
+import com.epmet.dto.form.work.ActListCommonFormDTO;
+import com.epmet.dto.result.work.InProgressActResultDTO;
+import com.epmet.dto.result.work.SponsorResultDTO;
+
+import java.util.List;
+
+/**
+ * 描述一下
+ *
+ * @author yinzuomei@elink-cn.com
+ * @date 2020/7/23 20:36
+ */
+public interface WorkActService {
+ /**
+ * @return com.epmet.dto.result.work.SponsorResultDTO
+ * @param
+ * @author yinzuomei
+ * @description 活动主办方
+ * @Date 2020/7/23 20:37
+ **/
+ SponsorResultDTO querySponsorList();
+
+ /**
+ * @return com.epmet.dto.result.work.InProgressActResultDTO
+ * @param formDTO
+ * @author yinzuomei
+ * @description 进行中活动列表
+ * @Date 2020/7/23 21:24
+ **/
+ List queryInProgressList(ActListCommonFormDTO formDTO);
+}
diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/WorkActServiceImpl.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/WorkActServiceImpl.java
new file mode 100644
index 0000000000..161d838d57
--- /dev/null
+++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/WorkActServiceImpl.java
@@ -0,0 +1,125 @@
+package com.epmet.service.impl;
+
+import com.epmet.commons.tools.security.user.LoginUserUtil;
+import com.epmet.commons.tools.utils.ConvertUtils;
+import com.epmet.commons.tools.utils.Result;
+import com.epmet.dao.ActInfoDao;
+import com.epmet.dto.form.work.ActListCommonFormDTO;
+import com.epmet.dto.result.ActSponsorResultDTO;
+import com.epmet.dto.result.work.Grid;
+import com.epmet.dto.result.work.InProgressActResultDTO;
+import com.epmet.dto.result.work.SponsorResultDTO;
+import com.epmet.feign.GovOrgOpenFeignClient;
+import com.epmet.service.WorkActService;
+import org.apache.commons.lang3.StringUtils;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.text.ParseException;
+import java.text.SimpleDateFormat;
+import java.util.Date;
+import java.util.List;
+
+/**
+ * 描述一下
+ *
+ * @author yinzuomei@elink-cn.com
+ * @date 2020/7/23 20:37
+ */
+@Service
+public class WorkActServiceImpl implements WorkActService {
+ private Logger logger = LogManager.getLogger(WorkActServiceImpl.class);
+ @Autowired
+ private GovOrgOpenFeignClient govOrgOpenFeignClient;
+ @Autowired
+ private LoginUserUtil loginUserUtil;
+ @Autowired
+ private ActInfoDao actInfoDao;
+
+ /**
+ * @return com.epmet.dto.result.work.SponsorResultDTO
+ * @author yinzuomei
+ * @description 活动主办方
+ * @Date 2020/7/23 20:37
+ **/
+ @Override
+ public SponsorResultDTO querySponsorList() {
+ String staffId=loginUserUtil.getLoginUserId();
+ if(StringUtils.isNotBlank(staffId)){
+ Result result=govOrgOpenFeignClient.querySponsorList(staffId);
+ if(result.success()&&null!=result.getData()){
+ SponsorResultDTO sponsorResultDTO=new SponsorResultDTO();
+ sponsorResultDTO.setAgencyId(result.getData().getAgencyId());
+ sponsorResultDTO.setAgencyName(result.getData().getAgencyName());
+ sponsorResultDTO.setAgencyGridList(ConvertUtils.sourceToTarget(result.getData().getAgencyGridList(), Grid.class));
+ return sponsorResultDTO;
+ }
+ }
+ logger.error("当前用户id获取为空");
+ return null;
+ }
+
+ /**
+ * @param formDTO
+ * @return com.epmet.dto.result.work.InProgressActResultDTO
+ * @author yinzuomei
+ * @description 进行中活动列表
+ * @Date 2020/7/23 21:24
+ **/
+ @Override
+ public List queryInProgressList(ActListCommonFormDTO formDTO) {
+ List list = actInfoDao.selectInprogress(formDTO.getCustomerId());
+ Date nowDate = new Date();
+ for (InProgressActResultDTO inProgressActResultDTO : list) {
+// 活动状态:报名中:signing_up;截止报名: end_sign_up; 已开始: in_progress; 已报满: enough
+ if (nowDate.compareTo(inProgressActResultDTO.getSignUpEndTime()) == -1
+ || nowDate.compareTo(inProgressActResultDTO.getSignUpEndTime()) == 0) {
+ //截止报名时间之前(包含报名时间截止时间点)
+ if (!inProgressActResultDTO.getActQuotaCategory()) {
+ //如果是不限制名额,则显示报名中
+ inProgressActResultDTO.setStatus("signing_up");
+ continue;
+ } else {
+ //固定名额,且已报名人数<活动需要人数显示报名中
+ if (inProgressActResultDTO.getActQuota() > inProgressActResultDTO.getSignedUp()) {
+ inProgressActResultDTO.setStatus("signing_up");
+ continue;
+ } else if (inProgressActResultDTO.getActQuota().equals(inProgressActResultDTO.getSignedUp())) {
+ inProgressActResultDTO.setStatus("enough");
+ continue;
+ }
+ }
+ } else if (nowDate.compareTo(inProgressActResultDTO.getSignUpEndTime()) == 1
+ || nowDate.compareTo(inProgressActResultDTO.getActStartTime()) == -1) {
+ //活动报名截止-活动预计开始之间显示截止报名
+ inProgressActResultDTO.setStatus("end_sign_up");
+ continue;
+ } else if (nowDate.compareTo(inProgressActResultDTO.getActStartTime()) == 1
+ || nowDate.compareTo(inProgressActResultDTO.getActStartTime()) == 0) {
+ //活动预计开始时间点之后,包含活动预计开始时间点,显示 已开始
+ inProgressActResultDTO.setStatus("in_progress");
+ continue;
+ }
+ }
+ return list;
+ }
+
+ public static void main(String[] args) {
+ SimpleDateFormat format=new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
+
+ try {
+ Date date1=format.parse("2020-07-23 13:00:00");
+ Date yesterDate=format.parse("2020-07-22 13:00:00");
+ Date date2=format.parse("2020-07-23 13:00:00");
+ Date tommorrow=format.parse("2020-07-24 13:00:00");
+ System.out.println(new Date().compareTo(yesterDate));
+ System.out.println(date1.compareTo(tommorrow));
+ System.out.println(date1.compareTo(date2));
+ } catch (ParseException e) {
+ e.printStackTrace();
+ }
+
+ }
+}
diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/WorkActUserServiceImpl.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/WorkActUserServiceImpl.java
index 94754726ac..d98eafc875 100644
--- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/WorkActUserServiceImpl.java
+++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/WorkActUserServiceImpl.java
@@ -365,6 +365,10 @@ public class WorkActUserServiceImpl implements WorkActUserService {
return ;
}
ActInfoEntity actInfo = actInfoDao.selectById(actUserRelationEntity.getActId());
+ if(null==actInfo){
+ logger.error("查询活动为空actId="+actUserRelationEntity.getActId());
+ return;
+ }
if(!actInfo.getCreatedBy().equals(loginUserUtil.getLoginUserId())){
throw new RenException(EpmetErrorCode.REQUIRE_PERMISSION.getCode());
}
@@ -403,6 +407,10 @@ public class WorkActUserServiceImpl implements WorkActUserService {
return ;
}
ActInfoEntity actInfo = actInfoDao.selectById(actUserRelationEntity.getActId());
+ if(null==actInfo){
+ logger.error("查询活动为空actId="+actUserRelationEntity.getActId());
+ return;
+ }
if(!actInfo.getCreatedBy().equals(loginUserUtil.getLoginUserId())){
throw new RenException(EpmetErrorCode.REQUIRE_PERMISSION.getCode());
}
diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/ActInfoDao.xml b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/ActInfoDao.xml
index 2680e43176..e16f3b8369 100644
--- a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/ActInfoDao.xml
+++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/ActInfoDao.xml
@@ -457,4 +457,35 @@
AND ((#{actStartTime} BETWEEN ACT_START_TIME AND ACT_END_TIME OR #{actEndTime} BETWEEN ACT_START_TIME AND ACT_END_TIME)
or (ACT_START_TIME BETWEEN #{actStartTime} AND #{actEndTime} OR ACT_END_TIME BETWEEN #{actStartTime} AND #{actEndTime}));
+
+
+
+ SELECT
+ ai.id AS actId,
+ ai.TITLE AS title,
+ ai.COVER_PIC AS coverPic,
+ ai.ACT_QUOTA AS actQuota,
+ ai.ACT_QUOTA_CATEGORY AS actQuotaCategory,
+ ai.ACT_START_TIME AS actStartTime,
+ ai.ACT_END_TIME AS actEndTime,
+ (
+ SELECT
+ count( aur.id )
+ FROM
+ act_user_relation aur
+ WHERE
+ aur.ACT_ID = ai.ID
+ AND aur.DEL_FLAG = '0'
+ AND ( aur.`STATUS` = 'auditing' OR aur.`STATUS` = 'passed' )
+ ) AS signedUp,
+ ai.SIGN_UP_END_TIME as signUpEndTime,
+ ai.SIGN_UP_START_TIME as signUpStartTime
+ FROM
+ act_info ai
+ WHERE
+ ai.DEL_FLAG = '0'
+ AND ai.ACT_STATUS = 'published'
+ and ai.CUSTOMER_ID=#{customerId}
+ order by ai.CREATED_TIME desc
+
diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/ActSponsorGridInfo.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/ActSponsorGridInfo.java
new file mode 100644
index 0000000000..d0d0fa1d86
--- /dev/null
+++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/ActSponsorGridInfo.java
@@ -0,0 +1,25 @@
+package com.epmet.dto.result;
+
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import lombok.Data;
+
+import java.io.Serializable;
+
+/**
+ * 描述一下
+ *
+ * @author yinzuomei@elink-cn.com
+ * @date 2020/7/23 20:58
+ */
+@Data
+public class ActSponsorGridInfo implements Serializable {
+ private static final long serialVersionUID = -2797565581047800011L;
+ /**
+ * 网格Id
+ */
+ private String gridId = "";
+ /**
+ * 机关-网格名称
+ */
+ private String agencyGridName = "";
+}
diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/ActSponsorResultDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/ActSponsorResultDTO.java
new file mode 100644
index 0000000000..f7f7c955a1
--- /dev/null
+++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/ActSponsorResultDTO.java
@@ -0,0 +1,28 @@
+package com.epmet.dto.result;
+
+import lombok.Data;
+
+import java.io.Serializable;
+import java.util.List;
+
+/**
+ * 描述一下
+ *
+ * @author yinzuomei@elink-cn.com
+ * @date 2020/7/23 20:46
+ */
+@Data
+public class ActSponsorResultDTO implements Serializable {
+ /**
+ * 机关组织Id
+ */
+ private String agencyId = "";
+ /**
+ * 机关组织名称
+ */
+ private String agencyName = "";
+ /**
+ * 机关下网格列表信息
+ */
+ private List agencyGridList;
+}
diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/feign/GovOrgOpenFeignClient.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/feign/GovOrgOpenFeignClient.java
index 4fbf1e6f59..c5c421b5a3 100644
--- a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/feign/GovOrgOpenFeignClient.java
+++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/feign/GovOrgOpenFeignClient.java
@@ -156,4 +156,14 @@ public interface GovOrgOpenFeignClient {
*/
@PostMapping("/gov/org/grid/gridsbystaffid/{staffId}")
Result> listGridsbystaffid(@PathVariable("staffId") String staffId);
+
+ /**
+ * @return com.epmet.commons.tools.utils.Result
+ * @param staffId
+ * @author yinzuomei
+ * @description 发布活动-主办方列表
+ * @Date 2020/7/23 20:47
+ **/
+ @PostMapping("/gov/org/customeragency/querysponsorlist/{staffId}")
+ Result querySponsorList(@PathVariable("staffId") String staffId);
}
diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/feign/fallback/GovOrgOpenFeignClientFallback.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/feign/fallback/GovOrgOpenFeignClientFallback.java
index 48fa9c84dc..dcc848725f 100644
--- a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/feign/fallback/GovOrgOpenFeignClientFallback.java
+++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/feign/fallback/GovOrgOpenFeignClientFallback.java
@@ -90,4 +90,16 @@ public class GovOrgOpenFeignClientFallback implements GovOrgOpenFeignClient {
public Result> listGridsbystaffid(String staffId) {
return ModuleUtils.feignConError(ServiceConstant.GOV_ORG_SERVER, "listGridsbystaffid", staffId);
}
+
+ /**
+ * @param staffId
+ * @return com.epmet.commons.tools.utils.Result
+ * @author yinzuomei
+ * @description 发布活动-主办方列表
+ * @Date 2020/7/23 20:47
+ **/
+ @Override
+ public Result querySponsorList(String staffId) {
+ return ModuleUtils.feignConError(ServiceConstant.GOV_ORG_SERVER, "querySponsorList", staffId);
+ }
}
diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/CustomerAgencyController.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/CustomerAgencyController.java
index 6177a24ce6..83250c4c17 100644
--- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/CustomerAgencyController.java
+++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/CustomerAgencyController.java
@@ -181,4 +181,16 @@ public class CustomerAgencyController {
public Result getPublishAgencyList(@PathVariable("staffId") String staffId) {
return new Result().ok(customerAgencyService.getPublishAgencyList(staffId));
}
+
+ /**
+ * @return com.epmet.commons.tools.utils.Result
+ * @param staffId
+ * @author yinzuomei
+ * @description 发布活动-主办方列表
+ * @Date 2020/7/23 20:50
+ **/
+ @PostMapping("querysponsorlist/{staffId}")
+ Result querySponsorList(@PathVariable("staffId") String staffId){
+ return new Result().ok(customerAgencyService.querySponsorList(staffId));
+ }
}
\ No newline at end of file
diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/CustomerStaffAgencyDao.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/CustomerStaffAgencyDao.java
index 7f980cb8c8..8cfef54079 100644
--- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/CustomerStaffAgencyDao.java
+++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/CustomerStaffAgencyDao.java
@@ -18,7 +18,9 @@
package com.epmet.dao;
import com.epmet.commons.mybatis.dao.BaseDao;
+import com.epmet.dto.CustomerAgencyDTO;
import com.epmet.dto.CustomerStaffAgencyDTO;
+import com.epmet.dto.result.ActSponsorGridInfo;
import com.epmet.dto.result.StaffListResultDTO;
import com.epmet.entity.CustomerStaffAgencyEntity;
import org.apache.ibatis.annotations.Mapper;
@@ -80,4 +82,22 @@ public interface CustomerStaffAgencyDao extends BaseDao selectActSponsorGrid(String staffId);
+
+ /**
+ * @return com.epmet.dto.CustomerAgencyDTO
+ * @param staffId
+ * @author yinzuomei
+ * @description 根据staffId,查询我所属的组织信息
+ * @Date 2020/7/23 21:10
+ **/
+ CustomerAgencyDTO selectMyAgency(String staffId);
}
\ No newline at end of file
diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/CustomerAgencyService.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/CustomerAgencyService.java
index 66586aeec4..cacba8512e 100644
--- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/CustomerAgencyService.java
+++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/CustomerAgencyService.java
@@ -169,4 +169,13 @@ public interface CustomerAgencyService extends BaseService
* @Description 党建声音-政府端-可选发布单位接口调用-根据人员角色查询对应的不同发布单位
**/
PublishAgencyListResultDTO getPublishAgencyList(String staffId);
+
+ /**
+ * @return com.epmet.dto.result.ActSponsorResultDTO
+ * @param staffId
+ * @author yinzuomei
+ * @description 发布活动-主办方列表
+ * @Date 2020/7/23 20:50
+ **/
+ ActSponsorResultDTO querySponsorList(String staffId);
}
\ No newline at end of file
diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerAgencyServiceImpl.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerAgencyServiceImpl.java
index 23b07f5b93..69a1d4ec87 100644
--- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerAgencyServiceImpl.java
+++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerAgencyServiceImpl.java
@@ -810,5 +810,25 @@ public class CustomerAgencyServiceImpl extends BaseServiceImpl list=customerStaffAgencyDao.selectActSponsorGrid(staffId);
+ resultDTO.setAgencyGridList(list);
+ return resultDTO;
+ }
+
}
\ No newline at end of file
diff --git a/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerStaffAgencyDao.xml b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerStaffAgencyDao.xml
index 21d9cf139c..222d4cc6d3 100644
--- a/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerStaffAgencyDao.xml
+++ b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerStaffAgencyDao.xml
@@ -117,4 +117,28 @@
+
+
+
+
+ SELECT
+ ca.*
+ FROM
+ customer_staff_agency csa
+ LEFT JOIN customer_agency ca ON ( csa.AGENCY_ID = ca.id AND ca.DEL_FLAG = '0' )
+ WHERE
+ csa.DEL_FLAG = '0'
+ AND csa.USER_ID = #{staffId}
+
\ No newline at end of file