|
|
|
@ -45,6 +45,7 @@ import cn.iocoder.yudao.module.farm.convert.project.ProjectConvert;
|
|
|
|
|
import cn.iocoder.yudao.module.farm.dal.mysql.project.ProjectMapper; |
|
|
|
|
|
|
|
|
|
import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception; |
|
|
|
|
import static cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils.getLoginUserId; |
|
|
|
|
import static cn.iocoder.yudao.module.farm.enums.ErrorCodeConstants.*; |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
@ -143,6 +144,13 @@ public class ProjectServiceImpl implements ProjectService {
|
|
|
|
|
queryWrapperX.between(ProjectDO::getCreateTime, startTime, nowTime); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (ObjectUtil.isNotEmpty(pageDTO.getDraft()) && pageDTO.getDraft()){ |
|
|
|
|
//查看自己的草稿
|
|
|
|
|
queryWrapperX.eqIfPresent(ProjectDO::getDraft, pageDTO.getDraft()); |
|
|
|
|
queryWrapperX.eqIfPresent(ProjectDO::getCreator, getLoginUserId()); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
List<ProjectDO> list = projectMapper.selectList(queryWrapperX); |
|
|
|
|
if (ObjectUtil.isEmpty(list)){ |
|
|
|
|
return R.success(PageUtil.emptyPage(pageDTO, ProjectListDTO.class)); |
|
|
|
|