|
|
@ -21,6 +21,7 @@ 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.constant.NumConstant; |
|
|
|
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; |
|
|
@ -28,8 +29,8 @@ import com.elink.esua.epdc.modules.volunteer.dao.VactInfoDao; |
|
|
|
import com.elink.esua.epdc.modules.volunteer.entity.VactInfoEntity; |
|
|
|
import com.elink.esua.epdc.modules.volunteer.redis.VactInfoRedis; |
|
|
|
import com.elink.esua.epdc.modules.volunteer.service.VactInfoService; |
|
|
|
import com.elink.esua.epdc.volunteer.VactInfoDTO; |
|
|
|
import com.elink.esua.epdc.volunteer.VactPageInfoDTO; |
|
|
|
import com.elink.esua.epdc.volunteer.*; |
|
|
|
import lombok.extern.slf4j.Slf4j; |
|
|
|
import org.apache.commons.lang3.StringUtils; |
|
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
|
import org.springframework.stereotype.Service; |
|
|
@ -45,6 +46,7 @@ import java.util.Map; |
|
|
|
* @author qu qu@elink-cn.com |
|
|
|
* @since v1.0.0 2021-09-01 |
|
|
|
*/ |
|
|
|
@Slf4j |
|
|
|
@Service |
|
|
|
public class VactInfoServiceImpl extends BaseServiceImpl<VactInfoDao, VactInfoEntity> implements VactInfoService { |
|
|
|
|
|
|
@ -123,4 +125,35 @@ public class VactInfoServiceImpl extends BaseServiceImpl<VactInfoDao, VactInfoEn |
|
|
|
updateById(entity); |
|
|
|
} |
|
|
|
|
|
|
|
@Override |
|
|
|
public Result applyActivity(AppVactApplyDTO formDto) { |
|
|
|
log.info("dto:"+formDto); |
|
|
|
VactInfoEntity entity = ConvertUtils.sourceToTarget(formDto, VactInfoEntity.class); |
|
|
|
entity.setState("0"); |
|
|
|
//新增
|
|
|
|
if(StringUtils.isBlank(formDto.getId())){ |
|
|
|
insert(entity); |
|
|
|
}else{//修改
|
|
|
|
entity.setReason(""); |
|
|
|
updateById(entity); |
|
|
|
} |
|
|
|
return new Result().ok("提交成功"); |
|
|
|
} |
|
|
|
|
|
|
|
@Override |
|
|
|
public Result getActivityList(AppPageParamsDTO dto) { |
|
|
|
log.info("dto:"+dto); |
|
|
|
int pageIndex = (dto.getPageIndex() - NumConstant.ONE) * dto.getPageSize(); |
|
|
|
dto.setPageIndex(pageIndex); |
|
|
|
List<AppVactPageListDTO> result = baseDao.getActivityList(dto); |
|
|
|
return new Result().ok(result); |
|
|
|
} |
|
|
|
|
|
|
|
@Override |
|
|
|
public Result getActivityDetail(String vactId) { |
|
|
|
log.info("vactId:"+vactId); |
|
|
|
AppVactDetailDTO result = baseDao.getActivityDetail(vactId); |
|
|
|
return new Result().ok(result); |
|
|
|
} |
|
|
|
|
|
|
|
} |