|
|
@@ -128,6 +128,7 @@ public class AmActivityServiceImpl implements IAmActivityService {
|
|
|
lqw.eq(StringUtils.isNotBlank(bo.getAuditStatus()), AmActivity::getAuditStatus, bo.getAuditStatus());
|
|
|
lqw.eq(StringUtils.isNotBlank(bo.getIsClose()), AmActivity::getIsClose, bo.getIsClose());
|
|
|
lqw.orderBy(true, false, AmActivity::getIsHead)
|
|
|
+ .orderBy(true, true, AmActivity::getIsClose)
|
|
|
.orderBy(true, false, AmActivity::getIsHot)
|
|
|
.orderBy(true, false, AmActivity::getCreateTime);
|
|
|
return lqw;
|
|
|
@@ -247,16 +248,17 @@ public class AmActivityServiceImpl implements IAmActivityService {
|
|
|
@Override
|
|
|
public TableDataInfo<AmActivityVo> queryMyJoinActivities(Long amId, AmActivityBo bo, PageQuery pageQuery) {
|
|
|
LambdaQueryWrapper<AmActivity> lqw = buildQueryWrapper(bo);
|
|
|
- lqw.and(w -> {
|
|
|
- List<AmActivityApply> applyList = baseApplyMapper.selectList(new LambdaQueryWrapper<AmActivityApply>()
|
|
|
- .eq(AmActivityApply::getAmId, amId)
|
|
|
- .eq(AmActivityApply::getAuditStatus, AuditStatusEnum.PASS.getValue())
|
|
|
- .select(AmActivityApply::getActivityId)
|
|
|
- );
|
|
|
- List<String> ids = StreamUtils.toList(applyList, AmActivityApply::getActivityId);
|
|
|
- w.in(AmActivity::getActivityId, ids);
|
|
|
- });
|
|
|
- lqw.orderByDesc(AmActivity::getCreateTime);
|
|
|
+ List<AmActivityApply> applyList = baseApplyMapper.selectList(new LambdaQueryWrapper<AmActivityApply>()
|
|
|
+ .eq(AmActivityApply::getAmId, amId)
|
|
|
+ .eq(AmActivityApply::getAuditStatus, AuditStatusEnum.PASS.getValue())
|
|
|
+ .select(AmActivityApply::getActivityId)
|
|
|
+ );
|
|
|
+ List<String> ids = StreamUtils.toList(applyList, AmActivityApply::getActivityId);
|
|
|
+ if (ids.isEmpty()) {
|
|
|
+ ids.add("");
|
|
|
+ }
|
|
|
+ lqw.in(AmActivity::getActivityId, ids);
|
|
|
+
|
|
|
Page<AmActivityVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
|
|
|
return TableDataInfo.build(result);
|
|
|
}
|