Browse Source

活动关联志愿团队

ftature/screen
Jackwang 4 years ago
parent
commit
216df9bb89
  1. 15
      esua-epdc/epdc-module/epdc-heart/epdc-heart-client/src/main/java/com/elink/esua/epdc/activity/ActInfoDTO.java
  2. 5
      esua-epdc/epdc-module/epdc-heart/epdc-heart-client/src/main/java/com/elink/esua/epdc/volunteer/VolunteerTeamDTO.java
  3. 5
      esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/activity/entity/ActInfoEntity.java
  4. 14
      esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/activity/service/impl/ActInfoServiceImpl.java
  5. 14
      esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/controller/VolunteerTeamController.java
  6. 12
      esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/controller/VolunteerTeamTypeController.java
  7. 14
      esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/dao/VolunteerTeamDao.java
  8. 10
      esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/dao/VolunteerTeamTypeDao.java
  9. 12
      esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/service/VolunteerTeamService.java
  10. 10
      esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/service/VolunteerTeamTypeService.java
  11. 16
      esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/service/impl/VolunteerTeamServiceImpl.java
  12. 7
      esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/service/impl/VolunteerTeamTypeServiceImpl.java
  13. 23
      esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/resources/mapper/volunteer/VolunteerTeamDao.xml
  14. 6
      esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/resources/mapper/volunteer/VolunteerTeamTypeDao.xml

15
esua-epdc/epdc-module/epdc-heart/epdc-heart-client/src/main/java/com/elink/esua/epdc/activity/ActInfoDTO.java

@ -50,6 +50,21 @@ public class ActInfoDTO implements Serializable {
*/
private String headPic;
/**
* 志愿团队类型
*/
private String teamType;
/**
* 志愿团队id
*/
private String teamId;
/**
* 志愿团队名称
*/
private String teamName;
/**
* 报名开始时间
*/

5
esua-epdc/epdc-module/epdc-heart/epdc-heart-client/src/main/java/com/elink/esua/epdc/volunteer/VolunteerTeamDTO.java

@ -49,6 +49,11 @@ public class VolunteerTeamDTO implements Serializable {
*/
private String teamType;
/**
* 类别名称
*/
private String typeName;
/**
* 联系人
*/

5
esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/activity/entity/ActInfoEntity.java

@ -83,6 +83,11 @@ public class ActInfoEntity extends BaseEpdcEntity {
*/
private String actAddress;
/**
* 志愿团队id
*/
private String teamId;
/**
* 默认状态
*/

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

@ -52,7 +52,10 @@ 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.modules.activity.dao.*;
import com.elink.esua.epdc.modules.activity.entity.*;
import com.elink.esua.epdc.modules.activity.entity.ActBannerEntity;
import com.elink.esua.epdc.modules.activity.entity.ActInfoEntity;
import com.elink.esua.epdc.modules.activity.entity.ActUserClockLogEntity;
import com.elink.esua.epdc.modules.activity.entity.ActUserRelationEntity;
import com.elink.esua.epdc.modules.activity.service.ActBannerService;
import com.elink.esua.epdc.modules.activity.service.ActInfoService;
import com.elink.esua.epdc.modules.activity.service.ActPeriodService;
@ -63,6 +66,8 @@ import com.elink.esua.epdc.modules.feign.ContentSecurityFeignClient;
import com.elink.esua.epdc.modules.feign.JobFeignClient;
import com.elink.esua.epdc.modules.feign.UserInfoFeignClient;
import com.elink.esua.epdc.modules.rocketmq.dto.RejectRecordDTO;
import com.elink.esua.epdc.modules.volunteer.dao.VolunteerTeamDao;
import com.elink.esua.epdc.modules.volunteer.entity.VolunteerTeamEntity;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@ -102,6 +107,8 @@ public class ActInfoServiceImpl extends BaseServiceImpl<ActInfoDao, ActInfoEntit
private ActBannerDao actBannerDao;
@Autowired
private ActClockPicDao actClockPicDao;
@Autowired
private VolunteerTeamDao volunteerTeamDao;
@Autowired
private ActUserReadService actUserReadService;
@ -147,6 +154,11 @@ public class ActInfoServiceImpl extends BaseServiceImpl<ActInfoDao, ActInfoEntit
List<ActPeriodDTO> periods = actPeriodService.listOfActPeriodsByActId(id);
ActInfoDTO dto = ConvertUtils.sourceToTarget(entity, ActInfoDTO.class);
dto.setPeriods(periods);
if(StringUtils.isNotBlank(dto.getTeamId())){
VolunteerTeamEntity volunteerTeamEntity = volunteerTeamDao.selectById(dto.getTeamId());
dto.setTeamType(volunteerTeamEntity.getTeamType());
dto.setTeamName(volunteerTeamEntity.getTeamName());
}
return dto;
}

14
esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/controller/VolunteerTeamController.java

@ -51,7 +51,7 @@ public class VolunteerTeamController {
@GetMapping("page")
public Result<PageData<VolunteerTeamDTO>> page(@RequestParam Map<String, Object> params){
PageData<VolunteerTeamDTO> page = volunteerTeamService.page(params);
PageData<VolunteerTeamDTO> page = volunteerTeamService.getPageList(params);
return new Result<PageData<VolunteerTeamDTO>>().ok(page);
}
@ -91,4 +91,16 @@ public class VolunteerTeamController {
ExcelUtils.exportExcelToTarget(response, null, list, VolunteerTeamExcel.class);
}
/**
* @describe: 通过团队类别获取团队列表
* @author wangtong
* @date 2021/11/18 14:47
* @params [params]
* @return com.elink.esua.epdc.commons.tools.utils.Result
*/
@GetMapping("getTeamListByType")
public Result getTeamListByType(@RequestParam Map<String, Object> params){
return volunteerTeamService.getTeamListByType(params);
}
}

12
esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/controller/VolunteerTeamTypeController.java

@ -91,4 +91,16 @@ public class VolunteerTeamTypeController {
ExcelUtils.exportExcelToTarget(response, null, list, VolunteerTeamTypeExcel.class);
}
/**
* @describe: 查询所有志愿团队类别
* @author wangtong
* @date 2021/11/18 10:55
* @params []
* @return com.elink.esua.epdc.commons.tools.utils.Result
*/
@GetMapping("getTeamTypeList")
public Result getTeamTypeList(){
return volunteerTeamTypeService.getTeamTypeList();
}
}

14
esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/dao/VolunteerTeamDao.java

@ -19,8 +19,12 @@ package com.elink.esua.epdc.modules.volunteer.dao;
import com.elink.esua.epdc.commons.mybatis.dao.BaseDao;
import com.elink.esua.epdc.modules.volunteer.entity.VolunteerTeamEntity;
import com.elink.esua.epdc.volunteer.VolunteerTeamDTO;
import org.apache.ibatis.annotations.Mapper;
import java.util.List;
import java.util.Map;
/**
* 志愿团队
*
@ -30,4 +34,14 @@ import org.apache.ibatis.annotations.Mapper;
@Mapper
public interface VolunteerTeamDao extends BaseDao<VolunteerTeamEntity> {
List<VolunteerTeamDTO> getPageList(Map<String, Object> params);
/**
* @describe: 通过团队类别获取团队列表
* @author wangtong
* @date 2021/11/18 14:47
* @params [params]
* @return com.elink.esua.epdc.commons.tools.utils.Result
*/
List<VolunteerTeamDTO> getTeamListByType(Map<String, Object> params);
}

10
esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/dao/VolunteerTeamTypeDao.java

@ -22,6 +22,8 @@ import com.elink.esua.epdc.commons.mybatis.dao.BaseDao;
import com.elink.esua.epdc.modules.volunteer.entity.VolunteerTeamTypeEntity;
import org.apache.ibatis.annotations.Mapper;
import java.util.List;
/**
* 志愿团队类别
*
@ -31,4 +33,12 @@ import org.apache.ibatis.annotations.Mapper;
@Mapper
public interface VolunteerTeamTypeDao extends BaseDao<VolunteerTeamTypeEntity> {
/**
* @describe: 查询所有志愿团队类别
* @author wangtong
* @date 2021/11/18 10:55
* @params []
* @return com.elink.esua.epdc.commons.tools.utils.Result
*/
List<VolunteerTeamTypeEntity> getTeamTypeList();
}

12
esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/service/VolunteerTeamService.java

@ -20,6 +20,7 @@ package com.elink.esua.epdc.modules.volunteer.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.modules.volunteer.entity.VolunteerTeamEntity;
import com.elink.esua.epdc.volunteer.VolunteerTeamDTO;
@ -93,4 +94,15 @@ public interface VolunteerTeamService extends BaseService<VolunteerTeamEntity> {
* @date 2021-11-16
*/
void delete(String[] ids);
PageData<VolunteerTeamDTO> getPageList(Map<String, Object> params);
/**
* @describe: 通过团队类别获取团队列表
* @author wangtong
* @date 2021/11/18 14:47
* @params [params]
* @return com.elink.esua.epdc.commons.tools.utils.Result
*/
Result getTeamListByType(Map<String, Object> params);
}

10
esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/service/VolunteerTeamTypeService.java

@ -20,6 +20,7 @@ package com.elink.esua.epdc.modules.volunteer.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.modules.volunteer.entity.VolunteerTeamTypeEntity;
import com.elink.esua.epdc.volunteer.VolunteerTeamTypeDTO;
@ -93,4 +94,13 @@ public interface VolunteerTeamTypeService extends BaseService<VolunteerTeamTypeE
* @date 2021-11-16
*/
void delete(String[] ids);
/**
* @describe: 查询所有志愿团队类别
* @author wangtong
* @date 2021/11/18 10:55
* @params []
* @return com.elink.esua.epdc.commons.tools.utils.Result
*/
Result getTeamTypeList();
}

16
esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/service/impl/VolunteerTeamServiceImpl.java

@ -23,6 +23,7 @@ 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.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.modules.volunteer.dao.VolunteerTeamDao;
import com.elink.esua.epdc.modules.volunteer.entity.VolunteerTeamEntity;
import com.elink.esua.epdc.modules.volunteer.redis.VolunteerTeamRedis;
@ -58,6 +59,19 @@ public class VolunteerTeamServiceImpl extends BaseServiceImpl<VolunteerTeamDao,
return getPageData(page, VolunteerTeamDTO.class);
}
@Override
public PageData<VolunteerTeamDTO> getPageList(Map<String, Object> params) {
IPage<VolunteerTeamDTO> page = getPage(params);
List<VolunteerTeamDTO> list = baseDao.getPageList(params);
return new PageData<>(list, page.getTotal());
}
@Override
public Result getTeamListByType(Map<String, Object> params) {
List<VolunteerTeamDTO> list = baseDao.getTeamListByType(params);
return new Result().ok(list);
}
@Override
public List<VolunteerTeamDTO> list(Map<String, Object> params) {
List<VolunteerTeamEntity> entityList = baseDao.selectList(getWrapper(params));
@ -101,4 +115,6 @@ public class VolunteerTeamServiceImpl extends BaseServiceImpl<VolunteerTeamDao,
baseDao.deleteBatchIds(Arrays.asList(ids));
}
}

7
esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/service/impl/VolunteerTeamTypeServiceImpl.java

@ -24,6 +24,7 @@ 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.utils.ConvertUtils;
import com.elink.esua.epdc.commons.tools.utils.Result;
import com.elink.esua.epdc.modules.volunteer.dao.VolunteerTeamTypeDao;
import com.elink.esua.epdc.modules.volunteer.entity.VolunteerTeamTypeEntity;
import com.elink.esua.epdc.modules.volunteer.redis.VolunteerTeamTypeRedis;
@ -151,4 +152,10 @@ public class VolunteerTeamTypeServiceImpl extends BaseServiceImpl<VolunteerTeamT
baseDao.deleteBatchIds(Arrays.asList(ids));
}
@Override
public Result getTeamTypeList() {
List<VolunteerTeamTypeEntity> result = baseDao.getTeamTypeList();
return new Result().ok(result);
}
}

23
esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/resources/mapper/volunteer/VolunteerTeamDao.xml

@ -17,6 +17,29 @@
<result property="updatedTime" column="UPDATED_TIME"/>
<result property="delFlag" column="DEL_FLAG"/>
</resultMap>
<select id="getPageList" resultType="com.elink.esua.epdc.volunteer.VolunteerTeamDTO">
select tt.type_name,t.*
from epdc_volunteer_team t
left join epdc_volunteer_team_type tt on t.TEAM_TYPE=tt.type_code
where t.DEL_FLAG='0'
<if test="teamType != null and teamType != ''">
and t.TEAM_TYPE like #{teamType}
</if>
<if test="teamName != null and teamName != ''">
and t.TEAM_NAME like '%${teamName}%'
</if>
<if test="contacts != null and contacts != ''">
and t.CONTACTS like '%${contacts}%'
</if>
order by CREATED_TIME desc
</select>
<select id="getTeamListByType" resultType="com.elink.esua.epdc.volunteer.VolunteerTeamDTO">
select *
from epdc_volunteer_team
where DEL_FLAG='0'
and TEAM_TYPE=#{teamType}
order by CREATED_TIME desc
</select>
</mapper>

6
esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/resources/mapper/volunteer/VolunteerTeamTypeDao.xml

@ -15,6 +15,12 @@
<result property="updater" column="updater"/>
<result property="updateDate" column="update_date"/>
</resultMap>
<select id="getTeamTypeList" resultType="com.elink.esua.epdc.modules.volunteer.entity.VolunteerTeamTypeEntity">
SELECT *
FROM `epdc_volunteer_team_type`
where del_flag='0'
order by sort asc
</select>
</mapper>

Loading…
Cancel
Save