huanghongfa
2021-06-17 aa8159e4e1b5f479043eb596efc8841e33459314
Merge remote-tracking branch 'origin/test_screen' into test_screen
2个文件已修改
23 ■■■■ 已修改文件
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/BigScreenDAO.java 21 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/BigScreenServiceImpl.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/BigScreenDAO.java
@@ -119,9 +119,15 @@
    BigScreenStatisticPartyBuild partybuild(@Param("communityId") Long communityId);
    @Select("<script> " +
            " SELECT pm.id, pm.member_id, pm.user_id, pm.name, pm.photo_path, COUNT(pa.id) AS total   " +
            " FROM com_pb_activity_member  pm  LEFT JOIN com_pb_activity pa  ON pm.activity_id = pa.id   " +
            " WHERE pa.community_id = #{communityId}   " +
            " SELECT pm.id, pm.member_id, pm.user_id, pm.name, " +
            " case " +
            " when me.photo_path is NOT NULL then  me.photo_path \n" +
            " when CAST(SUBSTRING(me.id_card , 17, 1) AS SIGNED)%2=1 then 'https://www.psciio.com/idcard/tst/idcard/a723e5bcbd594a48956ef9354c8b477c.jpg' " +
            " ELSE 'https://www.psciio.com/idcard/tst/idcard/cfb9b58913074068bba8c7002f91e7ff.jpg' END AS photo_path " +
            " ,COUNT(pa.id) AS total   " +
            " FROM com_pb_activity_member  pm  LEFT JOIN com_pb_activity pa  ON pm.activity_id = pa.id  " +
            " LEFT JOIN com_pb_member me ON pm.member_id = me.id  " +
            " WHERE pa.community_id = #{communityId}  AND me.id IS NOT null  " +
            " GROUP BY pm.member_id  " +
            " ORDER BY total DESC  " +
            " LIMIT 3  " +
@@ -129,10 +135,15 @@
    List<PartyBuildingMemberVO> bigscreenPartyactivitytopuser(@Param("communityId")Long communityId);
    @Select("<script> " +
            "  SELECT id AS member_id, user_id, NAME, photo_path, 0 AS total  " +
            "  SELECT id AS member_id, user_id, NAME, " +
            " case " +
            " when photo_path IS NOT NULL then  photo_path  " +
            " when CAST(SUBSTRING(id_card , 17, 1) AS SIGNED)%2=1 then 'https://www.psciio.com/idcard/tst/idcard/a723e5bcbd594a48956ef9354c8b477c.jpg' " +
            " ELSE 'https://www.psciio.com/idcard/tst/idcard/cfb9b58913074068bba8c7002f91e7ff.jpg' END AS photo_path , " +
            " 0 AS total  " +
            " FROM  com_pb_member " +
            " WHERE community_id=#{communityId}  " +
            " ORDER BY join_time DESC  " +
            " ORDER BY join_time ASC  " +
            " LIMIT 3  " +
            "</script>")
    List<PartyBuildingMemberVO> defaultPartyactivity(@Param("communityId")Long communityId);
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/BigScreenServiceImpl.java
@@ -76,7 +76,7 @@
    @Override
    public R<List<PartyBuildingMemberVO>> bigscreenPartyactivitytopuser(Long communityId) {
        List<PartyBuildingMemberVO> listRt = bigScreenDAO.bigscreenPartyactivitytopuser(communityId);
        if(listRt==null || listRt.size()< 0){
        if(listRt==null || listRt.size()< 3){
            //选择默认的党员列表
            List<PartyBuildingMemberVO>  defaultPartyactivity = bigScreenDAO.defaultPartyactivity(communityId);
            listRt.addAll(defaultPartyactivity);