|
@ -23,11 +23,13 @@ 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.FieldConstant; |
|
|
import com.elink.esua.epdc.commons.tools.page.PageData; |
|
|
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.ConvertUtils; |
|
|
|
|
|
import com.elink.esua.epdc.commons.tools.utils.Result; |
|
|
import com.elink.esua.epdc.modules.volunteer.dao.VolunteerDao; |
|
|
import com.elink.esua.epdc.modules.volunteer.dao.VolunteerDao; |
|
|
import com.elink.esua.epdc.modules.volunteer.entity.VolunteerEntity; |
|
|
import com.elink.esua.epdc.modules.volunteer.entity.VolunteerEntity; |
|
|
import com.elink.esua.epdc.modules.volunteer.redis.VolunteerRedis; |
|
|
import com.elink.esua.epdc.modules.volunteer.redis.VolunteerRedis; |
|
|
import com.elink.esua.epdc.modules.volunteer.service.VolunteerService; |
|
|
import com.elink.esua.epdc.modules.volunteer.service.VolunteerService; |
|
|
import com.elink.esua.epdc.volunteer.VolunteerDTO; |
|
|
import com.elink.esua.epdc.volunteer.VolunteerDTO; |
|
|
|
|
|
import com.elink.esua.epdc.volunteer.VolunteerPageDTO; |
|
|
import org.apache.commons.lang3.StringUtils; |
|
|
import org.apache.commons.lang3.StringUtils; |
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
import org.springframework.stereotype.Service; |
|
|
import org.springframework.stereotype.Service; |
|
@ -58,6 +60,22 @@ public class VolunteerServiceImpl extends BaseServiceImpl<VolunteerDao, Voluntee |
|
|
return getPageData(page, VolunteerDTO.class); |
|
|
return getPageData(page, VolunteerDTO.class); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
|
public PageData<VolunteerPageDTO> getPageInfo(Map<String, Object> params) { |
|
|
|
|
|
IPage<VolunteerPageDTO> page = getPage(params); |
|
|
|
|
|
List<VolunteerPageDTO> list = baseDao.getPageInfo(params); |
|
|
|
|
|
return new PageData<>(list, page.getTotal()); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
|
public Result handleApply(VolunteerDTO dto) { |
|
|
|
|
|
VolunteerEntity entity = baseDao.selectEntityById(dto.getId()); |
|
|
|
|
|
entity.setState(dto.getState()); |
|
|
|
|
|
entity.setReason(dto.getReason()); |
|
|
|
|
|
updateById(entity); |
|
|
|
|
|
return new Result().ok("审核成功"); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
@Override |
|
|
@Override |
|
|
public List<VolunteerDTO> list(Map<String, Object> params) { |
|
|
public List<VolunteerDTO> list(Map<String, Object> params) { |
|
|
List<VolunteerEntity> entityList = baseDao.selectList(getWrapper(params)); |
|
|
List<VolunteerEntity> entityList = baseDao.selectList(getWrapper(params)); |
|
@ -75,9 +93,8 @@ public class VolunteerServiceImpl extends BaseServiceImpl<VolunteerDao, Voluntee |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
@Override |
|
|
@Override |
|
|
public VolunteerDTO get(String id) { |
|
|
public VolunteerPageDTO get(String id) { |
|
|
VolunteerEntity entity = baseDao.selectById(id); |
|
|
return baseDao.selectInfoById(id); |
|
|
return ConvertUtils.sourceToTarget(entity, VolunteerDTO.class); |
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
@Override |
|
|
@Override |
|
@ -101,4 +118,6 @@ public class VolunteerServiceImpl extends BaseServiceImpl<VolunteerDao, Voluntee |
|
|
baseDao.deleteBatchIds(Arrays.asList(ids)); |
|
|
baseDao.deleteBatchIds(Arrays.asList(ids)); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
} |