Browse Source

大屏志愿者活动

ftature/screen
lichao 2 years ago
parent
commit
854b5b5669
  1. 44
      esua-epdc/epdc-module/epdc-heart/epdc-heart-client/src/main/java/com/elink/esua/epdc/activity/result/ScreenActInfoResultDTO.java
  2. 15
      esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/activity/controller/AppActInfoController.java
  3. 2
      esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/activity/dao/ActInfoDao.java
  4. 2
      esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/activity/service/ActInfoService.java
  5. 11
      esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/activity/service/impl/ActInfoServiceImpl.java
  6. 28
      esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/resources/mapper/activity/ActInfoDao.xml

44
esua-epdc/epdc-module/epdc-heart/epdc-heart-client/src/main/java/com/elink/esua/epdc/activity/result/ScreenActInfoResultDTO.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.activity.result;
import lombok.Data;
import java.io.Serializable;
/**
* 活动信息表
*
* @author qu qu@elink-cn.com
* @since v1.0.0 2019-12-11
*/
@Data
public class ScreenActInfoResultDTO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 主键
*/
private String id;
private String headPic;
}

15
esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/activity/controller/AppActInfoController.java

@ -20,19 +20,19 @@ package com.elink.esua.epdc.modules.activity.controller;
import com.elink.esua.epdc.activity.ActInfoDTO;
import com.elink.esua.epdc.activity.form.ActInfoAppFormDTO;
import com.elink.esua.epdc.activity.form.ActSignInListFormDTO;
import com.elink.esua.epdc.activity.result.ActInfoAppResultDTO;
import com.elink.esua.epdc.activity.result.ActInfoDetailAppResultDTO;
import com.elink.esua.epdc.activity.result.ActSignInListResultDTO;
import com.elink.esua.epdc.activity.result.AppActInfoDTO;
import com.elink.esua.epdc.activity.result.*;
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.utils.Result;
import com.elink.esua.epdc.commons.tools.validator.ValidatorUtils;
import com.elink.esua.epdc.dto.issue.IssueWaitHandleOrClosedDTO;
import com.elink.esua.epdc.modules.activity.service.ActInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.*;
import java.util.List;
import java.util.Map;
/**
@ -158,4 +158,11 @@ public class AppActInfoController {
return new Result<List<ActSignInListResultDTO>>().ok(data);
}
@GetMapping("screenJinShui/actList")
public Result<PageData<ScreenActInfoResultDTO>> screenActList(@RequestParam Map<String, Object> params) {
PageData<ScreenActInfoResultDTO> page = actInfoService.screenActList(params);
return new Result<PageData<ScreenActInfoResultDTO>>().ok(page);
}
}

2
esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/activity/dao/ActInfoDao.java

@ -175,4 +175,6 @@ public interface ActInfoDao extends BaseDao<ActInfoEntity> {
List<ScreenActCensusDTO> screenactCensusForQuarter(String startDate, String endDate);
List<ScreenActCensusDTO> screenactCensusForYear(String startDate, String endDate);
List<ScreenActInfoResultDTO> screenActList(Map<String, Object> params);
}

2
esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/activity/service/ActInfoService.java

@ -254,4 +254,6 @@ public interface ActInfoService extends BaseService<ActInfoEntity> {
Result modifyActTopFlag(ActTopFormDTO formDto);
List<ScreenActCensusDTO> screenactCensus(String startDate, String endDate, String type);
PageData<ScreenActInfoResultDTO> screenActList(Map<String, Object> params);
}

11
esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/activity/service/impl/ActInfoServiceImpl.java

@ -20,6 +20,7 @@ package com.elink.esua.epdc.modules.activity.service.impl;
import cn.hutool.core.collection.CollectionUtil;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.elink.esua.epdc.activity.*;
import com.elink.esua.epdc.activity.form.ActInfoAppFormDTO;
import com.elink.esua.epdc.activity.form.ActInfoFormDTO;
@ -51,6 +52,7 @@ import com.elink.esua.epdc.constant.*;
import com.elink.esua.epdc.dto.ScheduleJobDTO;
import com.elink.esua.epdc.dto.epdc.form.EpdcInformationFormDTO;
import com.elink.esua.epdc.dto.epdc.form.EpdcVolunteerKindnessTimeUpdateFormDTO;
import com.elink.esua.epdc.dto.issue.IssueWaitHandleOrClosedDTO;
import com.elink.esua.epdc.dto.issue.ScreenIssueCensusDTO;
import com.elink.esua.epdc.modules.activity.dao.*;
import com.elink.esua.epdc.modules.activity.entity.ActBannerEntity;
@ -899,6 +901,15 @@ public class ActInfoServiceImpl extends BaseServiceImpl<ActInfoDao, ActInfoEntit
return result;
}
@Override
public PageData<ScreenActInfoResultDTO> screenActList(Map<String, Object> params) {
IPage<Object> page = getPage(params);
List<ScreenActInfoResultDTO> list = baseDao.screenActList(params);
return new PageData<>(list, page.getTotal());
}
/**
* 校验活动详细时间段
*

28
esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/resources/mapper/activity/ActInfoDao.xml

@ -645,4 +645,32 @@
GROUP BY
date
</select>
<select id="screenActList" resultType="com.elink.esua.epdc.activity.result.ScreenActInfoResultDTO">
SELECT
actInfo.ID as id,
actInfo.HEAD_PIC as headPic
FROM
(
SELECT i.ID, i.TITLE, i.HEAD_PIC, i.ACT_START_TIME, i.ACT_END_TIME, i.PUBLISH_TIME, i.ACT_ADDRESS,
i.ACT_QUOTA, i.CLOCK_NUM, i.SIGNUP_END_TIME, i.CREATED_TIME, i.ACT_QUOTA_CATEGORY,
i.TOP_FLAG, i.DEL_FLAG, i.ACT_STATUS, i.SPONSOR, IFNULL(SUM(p.ACT_PERIOD_SIGNUP_NUM), 0) ACT_PERIOD_SIGNUP_NUM, i.SIGNUP_NUM,i.TEAM_ID
FROM
epdc_act_info i
LEFT JOIN epdc_act_period p ON i.ID = p.ACT_ID AND p.DEL_FLAG = '0'
GROUP BY i.ID
) actInfo
left join epdc_act_user_relation relation on relation.DEL_FLAG = '0'
and relation.STATUS not in ('3','4')
and actInfo.ID = relation.ACT_ID
left join epdc_volunteer_team vt on actInfo.TEAM_ID=vt.id
WHERE actInfo.DEL_FLAG = '0' and actInfo.ACT_STATUS = '1'
group by actInfo.ID
order by actInfo.CREATED_TIME desc
</select>
</mapper>

Loading…
Cancel
Save