|
|
|
@ -17,6 +17,7 @@ |
|
|
|
|
|
|
|
package com.elink.esua.epdc.service.impl; |
|
|
|
|
|
|
|
import cn.hutool.core.collection.CollUtil; |
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
|
|
|
import com.baomidou.mybatisplus.core.metadata.IPage; |
|
|
|
import com.elink.esua.epdc.async.NewsTask; |
|
|
|
@ -27,6 +28,7 @@ import com.elink.esua.epdc.commons.tools.enums.UserTagEnum; |
|
|
|
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.constant.UserFieldConsant; |
|
|
|
import com.elink.esua.epdc.constant.VolunteerInfoNoticeConstant; |
|
|
|
import com.elink.esua.epdc.dao.VolunteerInfoDao; |
|
|
|
import com.elink.esua.epdc.dto.ParentAndAllDeptDTO; |
|
|
|
@ -108,6 +110,7 @@ public class VolunteerInfoServiceImpl extends BaseServiceImpl<VolunteerInfoDao, |
|
|
|
/** |
|
|
|
* 根据志愿者ID,查询志愿者 单条详情 |
|
|
|
* 积分需要连user表查询 |
|
|
|
* |
|
|
|
* @param id |
|
|
|
* @return |
|
|
|
*/ |
|
|
|
@ -170,6 +173,7 @@ public class VolunteerInfoServiceImpl extends BaseServiceImpl<VolunteerInfoDao, |
|
|
|
|
|
|
|
/** |
|
|
|
* 志愿者申请,根据用户表基础信息 赋默认值 |
|
|
|
* |
|
|
|
* @param id |
|
|
|
* @return VolunteerInfoDTO |
|
|
|
* @author zy |
|
|
|
@ -183,6 +187,7 @@ public class VolunteerInfoServiceImpl extends BaseServiceImpl<VolunteerInfoDao, |
|
|
|
|
|
|
|
/** |
|
|
|
* 向标签表中,查询唯一志愿者标签:tag_code = volunteer |
|
|
|
* |
|
|
|
* @param tagCode |
|
|
|
* @return |
|
|
|
*/ |
|
|
|
@ -193,9 +198,10 @@ public class VolunteerInfoServiceImpl extends BaseServiceImpl<VolunteerInfoDao, |
|
|
|
|
|
|
|
/** |
|
|
|
* 根据用户id 进行志愿者认证 |
|
|
|
* |
|
|
|
* @param userId |
|
|
|
* @author wanggongfeng |
|
|
|
* @return |
|
|
|
* @author wanggongfeng |
|
|
|
* @Date 2019/12/13 16:39 |
|
|
|
*/ |
|
|
|
@Override |
|
|
|
@ -205,9 +211,10 @@ public class VolunteerInfoServiceImpl extends BaseServiceImpl<VolunteerInfoDao, |
|
|
|
|
|
|
|
/** |
|
|
|
* 新增志愿者 |
|
|
|
* |
|
|
|
* @param epdcCompleteVolunteerInfoFormDTO |
|
|
|
* @author wanggongfeng |
|
|
|
* @return |
|
|
|
* @author wanggongfeng |
|
|
|
*/ |
|
|
|
@Override |
|
|
|
@Transactional(rollbackFor = Exception.class) |
|
|
|
@ -254,8 +261,9 @@ public class VolunteerInfoServiceImpl extends BaseServiceImpl<VolunteerInfoDao, |
|
|
|
|
|
|
|
/** |
|
|
|
* 获取排行榜 |
|
|
|
* @author wanggongfeng |
|
|
|
* |
|
|
|
* @return |
|
|
|
* @author wanggongfeng |
|
|
|
*/ |
|
|
|
@Override |
|
|
|
public Result<List<EpdcGetVolunteerRankDTO>> getRankingList() { |
|
|
|
@ -272,13 +280,16 @@ public class VolunteerInfoServiceImpl extends BaseServiceImpl<VolunteerInfoDao, |
|
|
|
**/ |
|
|
|
@Override |
|
|
|
public Result<String> queryUserVolunteerFlag(String userId) { |
|
|
|
if (StringUtils.isNotBlank(userId)) { |
|
|
|
QueryWrapper<VolunteerInfoEntity> wrapper = new QueryWrapper<>(); |
|
|
|
wrapper.eq(StringUtils.isNotBlank(userId), "USER_ID", userId); |
|
|
|
wrapper.eq(UserFieldConsant.USER_ID, userId) |
|
|
|
.orderByDesc(FieldConstant.UPDATED_TIME); |
|
|
|
List<VolunteerInfoEntity> list = baseDao.selectList(wrapper); |
|
|
|
if (null == list || list.size() == 0) { |
|
|
|
return new Result<String>().ok("2"); |
|
|
|
if (CollUtil.isNotEmpty(list)) { |
|
|
|
return new Result().ok(list.get(NumConstant.ZERO).getAuditStatus()); |
|
|
|
} |
|
|
|
} |
|
|
|
return new Result<String>().ok(list.get(0).getAuditStatus()); |
|
|
|
return new Result().ok(NumConstant.TWO_STR); |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
|