101captain
2022-03-02 60784a329fd3cf9f4b6a75b8dc39ff79bd907dc6
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActActivityServiceImpl.java
@@ -303,10 +303,22 @@
                    comActActivityVO.setIsVolunteer(comActActSignDO.getIsVolunteer());
                }
                List<ComActActRegistDO> regList = comActActRegistDAO.selectList(new QueryWrapper<ComActActRegistDO>().lambda()
                        .eq(ComActActRegistDO::getUserId, userId).eq(ComActActRegistDO::getActivityId, id).eq(ComActActRegistDO::getType, 1));
                        .eq(ComActActRegistDO::getUserId, userId).eq(ComActActRegistDO::getActivityId, id));
                if (!regList.isEmpty()) {
                    List<ComActActRegistDO> collect = regList.stream().sorted(Comparator.comparing(ComActActRegistDO::getId).reversed()).collect(Collectors.toList());
                    comActActivityVO.setTimes(collect.get(0).getTimes());
                    ComActActRegistDO comActActRegistDO=collect.get(0);
                    if(comActActRegistDO.getType()==2){
                        if(comActActRegistDO.getEndTime()==null){
                            comActActivityVO.setSignType(2);
                        }
                        else {
                            comActActivityVO.setSignType(1);
                        }
                    }
                }
                else {
                    comActActivityVO.setSignType(1);
                }
            }
        }
@@ -585,7 +597,7 @@
     * @return 活动列表
     */
    @Override
    public R listActivity(Long userId, Integer status) {
    public R listActivity(Long userId, Integer status,Integer type) {
        List<ActivitySignVO> activitySignVOList = comActActSignDAO.selectList(userId);
        if (ObjectUtils.isEmpty(activitySignVOList)) {
            return R.ok();
@@ -603,6 +615,9 @@
                        .filter(activityDO -> activityDO.getStatus().equals(status)).collect(Collectors.toList());
            }
        }
        if(isNull(type)){
            comActActivityDOS=comActActivityDOS.stream().filter(comActActivityDO -> comActActivityDO.getType().equals(type)).collect(Collectors.toList());
        }
        if (!comActActivityDOS.isEmpty()) {
            comActActivityDOS.forEach(comActActivityDO -> {
                ComActActivityVO comActActivityVO = new ComActActivityVO();