huanghongfa
2021-01-27 9812ea838a9b5779455428ebe8f4d66f09f61e82
社区活动
4个文件已修改
78 ■■■■■ 已修改文件
springcloud_k8s_panzhihuazhihuishequ/.idea/workspace.xml 57 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComActActivityDAO.java 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComActDiscussOptionUserDAO.java 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActDiscussServiceImpl.java 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/.idea/workspace.xml
@@ -24,6 +24,9 @@
  <component name="ChangeListManager">
    <list default="true" id="8ba27629-3e5d-4f42-993e-d0c055bc9371" name="Default Changelist" comment="">
      <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
      <change beforePath="$PROJECT_DIR$/service_community/src/main/java/com/panzhihua/service_community/dao/ComActActivityDAO.java" beforeDir="false" afterPath="$PROJECT_DIR$/service_community/src/main/java/com/panzhihua/service_community/dao/ComActActivityDAO.java" afterDir="false" />
      <change beforePath="$PROJECT_DIR$/service_community/src/main/java/com/panzhihua/service_community/dao/ComActDiscussOptionUserDAO.java" beforeDir="false" afterPath="$PROJECT_DIR$/service_community/src/main/java/com/panzhihua/service_community/dao/ComActDiscussOptionUserDAO.java" afterDir="false" />
      <change beforePath="$PROJECT_DIR$/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActDiscussServiceImpl.java" beforeDir="false" afterPath="$PROJECT_DIR$/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActDiscussServiceImpl.java" afterDir="false" />
    </list>
    <option name="SHOW_DIALOG" value="false" />
    <option name="HIGHLIGHT_CONFLICTS" value="true" />
@@ -408,7 +411,7 @@
      <workItem from="1611019208339" duration="94460000" />
      <workItem from="1611365644515" duration="33195000" />
      <workItem from="1611536010905" duration="21843000" />
      <workItem from="1611622682269" duration="18734000" />
      <workItem from="1611622682269" duration="22640000" />
    </task>
    <servers />
  </component>
@@ -464,54 +467,54 @@
      <screen x="0" y="0" width="1536" height="824" />
    </state>
    <state x="549" y="167" key="FileChooserDialogImpl/0.0.1536.824@0.0.1536.824" timestamp="1610606590056" />
    <state width="1031" height="417" key="GridCell.Tab.0.bottom" timestamp="1611652976539">
    <state width="1031" height="417" key="GridCell.Tab.0.bottom" timestamp="1611711599750">
      <screen x="0" y="0" width="1536" height="824" />
    </state>
    <state width="1031" height="417" key="GridCell.Tab.0.bottom/0.0.1536.824@0.0.1536.824" timestamp="1611652976539" />
    <state width="1031" height="417" key="GridCell.Tab.0.center" timestamp="1611652976539">
    <state width="1031" height="417" key="GridCell.Tab.0.bottom/0.0.1536.824@0.0.1536.824" timestamp="1611711599750" />
    <state width="1031" height="417" key="GridCell.Tab.0.center" timestamp="1611711599750">
      <screen x="0" y="0" width="1536" height="824" />
    </state>
    <state width="1031" height="417" key="GridCell.Tab.0.center/0.0.1536.824@0.0.1536.824" timestamp="1611652976539" />
    <state width="1031" height="417" key="GridCell.Tab.0.left" timestamp="1611652976539">
    <state width="1031" height="417" key="GridCell.Tab.0.center/0.0.1536.824@0.0.1536.824" timestamp="1611711599750" />
    <state width="1031" height="417" key="GridCell.Tab.0.left" timestamp="1611711599750">
      <screen x="0" y="0" width="1536" height="824" />
    </state>
    <state width="1031" height="417" key="GridCell.Tab.0.left/0.0.1536.824@0.0.1536.824" timestamp="1611652976539" />
    <state width="1031" height="417" key="GridCell.Tab.0.right" timestamp="1611652976539">
    <state width="1031" height="417" key="GridCell.Tab.0.left/0.0.1536.824@0.0.1536.824" timestamp="1611711599750" />
    <state width="1031" height="417" key="GridCell.Tab.0.right" timestamp="1611711599750">
      <screen x="0" y="0" width="1536" height="824" />
    </state>
    <state width="1031" height="417" key="GridCell.Tab.0.right/0.0.1536.824@0.0.1536.824" timestamp="1611652976539" />
    <state width="1031" height="417" key="GridCell.Tab.1.bottom" timestamp="1611652976540">
    <state width="1031" height="417" key="GridCell.Tab.0.right/0.0.1536.824@0.0.1536.824" timestamp="1611711599750" />
    <state width="1031" height="417" key="GridCell.Tab.1.bottom" timestamp="1611711599751">
      <screen x="0" y="0" width="1536" height="824" />
    </state>
    <state width="1031" height="417" key="GridCell.Tab.1.bottom/0.0.1536.824@0.0.1536.824" timestamp="1611652976540" />
    <state width="1031" height="417" key="GridCell.Tab.1.center" timestamp="1611652976540">
    <state width="1031" height="417" key="GridCell.Tab.1.bottom/0.0.1536.824@0.0.1536.824" timestamp="1611711599751" />
    <state width="1031" height="417" key="GridCell.Tab.1.center" timestamp="1611711599750">
      <screen x="0" y="0" width="1536" height="824" />
    </state>
    <state width="1031" height="417" key="GridCell.Tab.1.center/0.0.1536.824@0.0.1536.824" timestamp="1611652976540" />
    <state width="1031" height="417" key="GridCell.Tab.1.left" timestamp="1611652976540">
    <state width="1031" height="417" key="GridCell.Tab.1.center/0.0.1536.824@0.0.1536.824" timestamp="1611711599750" />
    <state width="1031" height="417" key="GridCell.Tab.1.left" timestamp="1611711599750">
      <screen x="0" y="0" width="1536" height="824" />
    </state>
    <state width="1031" height="417" key="GridCell.Tab.1.left/0.0.1536.824@0.0.1536.824" timestamp="1611652976540" />
    <state width="1031" height="417" key="GridCell.Tab.1.right" timestamp="1611652976540">
    <state width="1031" height="417" key="GridCell.Tab.1.left/0.0.1536.824@0.0.1536.824" timestamp="1611711599750" />
    <state width="1031" height="417" key="GridCell.Tab.1.right" timestamp="1611711599750">
      <screen x="0" y="0" width="1536" height="824" />
    </state>
    <state width="1031" height="417" key="GridCell.Tab.1.right/0.0.1536.824@0.0.1536.824" timestamp="1611652976540" />
    <state width="1031" height="417" key="GridCell.Tab.2.bottom" timestamp="1611652976540">
    <state width="1031" height="417" key="GridCell.Tab.1.right/0.0.1536.824@0.0.1536.824" timestamp="1611711599750" />
    <state width="1031" height="417" key="GridCell.Tab.2.bottom" timestamp="1611711599751">
      <screen x="0" y="0" width="1536" height="824" />
    </state>
    <state width="1031" height="417" key="GridCell.Tab.2.bottom/0.0.1536.824@0.0.1536.824" timestamp="1611652976540" />
    <state width="1031" height="417" key="GridCell.Tab.2.center" timestamp="1611652976540">
    <state width="1031" height="417" key="GridCell.Tab.2.bottom/0.0.1536.824@0.0.1536.824" timestamp="1611711599751" />
    <state width="1031" height="417" key="GridCell.Tab.2.center" timestamp="1611711599751">
      <screen x="0" y="0" width="1536" height="824" />
    </state>
    <state width="1031" height="417" key="GridCell.Tab.2.center/0.0.1536.824@0.0.1536.824" timestamp="1611652976540" />
    <state width="1031" height="417" key="GridCell.Tab.2.left" timestamp="1611652976540">
    <state width="1031" height="417" key="GridCell.Tab.2.center/0.0.1536.824@0.0.1536.824" timestamp="1611711599751" />
    <state width="1031" height="417" key="GridCell.Tab.2.left" timestamp="1611711599751">
      <screen x="0" y="0" width="1536" height="824" />
    </state>
    <state width="1031" height="417" key="GridCell.Tab.2.left/0.0.1536.824@0.0.1536.824" timestamp="1611652976540" />
    <state width="1031" height="417" key="GridCell.Tab.2.right" timestamp="1611652976540">
    <state width="1031" height="417" key="GridCell.Tab.2.left/0.0.1536.824@0.0.1536.824" timestamp="1611711599751" />
    <state width="1031" height="417" key="GridCell.Tab.2.right" timestamp="1611711599751">
      <screen x="0" y="0" width="1536" height="824" />
    </state>
    <state width="1031" height="417" key="GridCell.Tab.2.right/0.0.1536.824@0.0.1536.824" timestamp="1611652976540" />
    <state width="1031" height="417" key="GridCell.Tab.2.right/0.0.1536.824@0.0.1536.824" timestamp="1611711599751" />
    <state x="299" y="67" key="Maven.ArtifactSearchDialog" timestamp="1610611848124">
      <screen x="0" y="0" width="1536" height="824" />
    </state>
@@ -540,10 +543,10 @@
      <screen x="0" y="0" width="1536" height="824" />
    </state>
    <state x="93" y="93" width="1350" height="638" key="com.intellij.history.integration.ui.views.SelectionHistoryDialog/0.0.1536.824@0.0.1536.824" timestamp="1611623127978" />
    <state x="233" y="42" width="921" height="782" key="find.popup" timestamp="1611649849541">
    <state x="233" y="42" width="921" height="782" key="find.popup" timestamp="1611655628745">
      <screen x="0" y="0" width="1536" height="824" />
    </state>
    <state x="233" y="42" width="921" height="782" key="find.popup/0.0.1536.824@0.0.1536.824" timestamp="1611649849541" />
    <state x="233" y="42" width="921" height="782" key="find.popup/0.0.1536.824@0.0.1536.824" timestamp="1611655628745" />
    <state width="600" height="428" key="javadoc.popup" timestamp="1610005781618">
      <screen x="0" y="0" width="1536" height="824" />
    </state>
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComActActivityDAO.java
@@ -68,6 +68,12 @@
            "<if test='comActActivityVO.beginAt != null '>" +
            "AND a.begin_at <![CDATA[ >= ]]> #{comActActivityVO.beginAt} AND a.end_at <![CDATA[ <= ]]> #{comActActivityVO.endAt} \n" +
            " </if> " +
            "<if test='comActActivityVO.type != null and comActActivityVO.type==1 '>" +
            "AND a.participant_max=0 \n" +
            " </if> " +
            "<if test='comActActivityVO.type != null and comActActivityVO.type==2 '>" +
            "AND a.volunteer_max=0 \n" +
            " </if> " +
            " group by a.id "+
            " order by a.status asc,a.publish_at desc "+
            "</script>")
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComActDiscussOptionUserDAO.java
@@ -3,6 +3,8 @@
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.panzhihua.service_community.model.dos.ComActDiscussOptionUserDO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
/**
 * @program: springcloud_k8s_panzhihuazhihuishequ
@@ -22,4 +24,11 @@
//            " </if> " +
//            " </where>" +
//            "</script>")
    @Select("SELECT \n" +
            "COUNT(ou.id)\n" +
            "FROM\n" +
            "com_act_discuss d\n" +
            "JOIN com_act_discuss_option o ON d.id = o.discuss_id and d.id=#{id}\n" +
            "JOIN com_act_discuss_option_user ou ON o.id = ou.discuss_option_id and ou.user_id=#{loginUserId}")
    int selectHaveVote(@Param("id") Long id, @Param("loginUserId") Long loginUserId);
}
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActDiscussServiceImpl.java
@@ -318,6 +318,7 @@
        Page page = new Page<>();
        Long pageNum = pageComActDiscussDTO.getPageNum();
        Long pageSize = pageComActDiscussDTO.getPageSize();
        Long loginUserId = pageComActDiscussDTO.getLoginUserId();
        if (null==pageNum||0==pageNum) {
            pageNum = 1l;
        }
@@ -345,12 +346,15 @@
                    });
                    comActDiscussVO.setComActDiscussOptionVOS(comActDiscussOptionVOS);
                }
                Integer integer = comActDiscussUserDAO.selectCount(new QueryWrapper<ComActDiscussUserDO>().lambda().eq(ComActDiscussUserDO::getDiscussId, comActDiscussVO.getId()).eq(ComActDiscussUserDO::getUserId, pageComActDiscussDTO.getLoginUserId()));
                Integer integer = comActDiscussUserDAO.selectCount(new QueryWrapper<ComActDiscussUserDO>().lambda().eq(ComActDiscussUserDO::getDiscussId, comActDiscussVO.getId()).eq(ComActDiscussUserDO::getUserId, loginUserId));
                if (integer>0) {
                    comActDiscussVO.setHaveSign(1);
                }else{
                    comActDiscussVO.setHaveSign(0);
                }
//                判断是否已经投票
                int haveVote=comActDiscussOptionUserDAO.selectHaveVote(id,loginUserId);
                comActDiscussVO.setHaveVote(haveVote>0?1:0);
            });
        }
        return R.ok(iPage);