huanghongfa
2021-02-03 91f5824136b8a70551c95cad2ad624aa41939ddf
Merge branch 'master' of http://gitlab.nhys.cdnhxx.com/root/zhihuishequ
1个文件已删除
3个文件已修改
179 ■■■■ 已修改文件
springcloud_k8s_panzhihuazhihuishequ/.idea/workspace.xml 76 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_user/src/main/java/com/panzhihua/service_user/dao/UserDao.java 34 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_user/src/main/java/com/panzhihua/service_user/service/impl/UserServiceImpl.java 44 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/timejob/src/main/resources/application.properties 25 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/.idea/workspace.xml
@@ -22,7 +22,11 @@
    <select />
  </component>
  <component name="ChangeListManager">
    <list default="true" id="8ba27629-3e5d-4f42-993e-d0c055bc9371" name="Default Changelist" comment="" />
    <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_user/src/main/java/com/panzhihua/service_user/dao/UserDao.java" beforeDir="false" afterPath="$PROJECT_DIR$/service_user/src/main/java/com/panzhihua/service_user/dao/UserDao.java" afterDir="false" />
      <change beforePath="$PROJECT_DIR$/service_user/src/main/java/com/panzhihua/service_user/service/impl/UserServiceImpl.java" beforeDir="false" afterPath="$PROJECT_DIR$/service_user/src/main/java/com/panzhihua/service_user/service/impl/UserServiceImpl.java" afterDir="false" />
    </list>
    <option name="SHOW_DIALOG" value="false" />
    <option name="HIGHLIGHT_CONFLICTS" value="true" />
    <option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
@@ -109,7 +113,7 @@
      </set>
    </option>
  </component>
  <component name="RunManager" selected="Application.ComActActivityServiceImpl">
  <component name="RunManager" selected="Application.UserServiceImpl">
    <configuration name="ComActActivityServiceImpl" type="Application" factoryName="Application" temporary="true" nameIsGenerated="true">
      <option name="MAIN_CLASS_NAME" value="com.panzhihua.service_community.service.impl.ComActActivityServiceImpl" />
      <module name="service_community" />
@@ -283,10 +287,10 @@
    </list>
    <recent_temporary>
      <list>
        <item itemvalue="Application.UserServiceImpl" />
        <item itemvalue="Application.ComActActivityServiceImpl" />
        <item itemvalue="Application.PartyBuildingApi" />
        <item itemvalue="Application.RichTextUtil" />
        <item itemvalue="Application.UserServiceImpl" />
        <item itemvalue="Application.ComBpActivityServiceImpl" />
      </list>
    </recent_temporary>
@@ -409,7 +413,7 @@
      <workItem from="1611834131869" duration="1431000" />
      <workItem from="1611883117467" duration="13328000" />
      <workItem from="1611913457874" duration="966000" />
      <workItem from="1612141547518" duration="39515000" />
      <workItem from="1612141547518" duration="52901000" />
    </task>
    <servers />
  </component>
@@ -453,70 +457,70 @@
      <screen x="0" y="0" width="1536" height="824" />
    </state>
    <state x="0" y="0" key="#com.intellij.refactoring.rename.AutomaticRenamingDialog/0.0.1536.824@0.0.1536.824" timestamp="1611214700095" />
    <state x="499" y="159" key="#com.intellij.refactoring.safeDelete.UnsafeUsagesDialog" timestamp="1608878808962">
    <state x="499" y="159" key="#com.intellij.refactoring.safeDelete.UnsafeUsagesDialog" timestamp="1612314058774">
      <screen x="0" y="0" width="1536" height="824" />
    </state>
    <state x="499" y="159" key="#com.intellij.refactoring.safeDelete.UnsafeUsagesDialog/0.0.1536.824@0.0.1536.824" timestamp="1608878808962" />
    <state x="499" y="159" key="#com.intellij.refactoring.safeDelete.UnsafeUsagesDialog/0.0.1536.824@0.0.1536.824" timestamp="1612314058774" />
    <state width="562" height="466" key="DebuggerActiveHint" timestamp="1611891031616">
      <screen x="0" y="0" width="1536" height="824" />
    </state>
    <state width="562" height="466" key="DebuggerActiveHint/0.0.1536.824@0.0.1536.824" timestamp="1611891031616" />
    <state x="93" y="93" width="1350" height="638" key="DiffContextDialog" timestamp="1609316182000">
    <state x="93" y="93" width="1350" height="638" key="DiffContextDialog" timestamp="1612321934878">
      <screen x="0" y="0" width="1536" height="824" />
    </state>
    <state x="93" y="93" width="1350" height="638" key="DiffContextDialog/0.0.1536.824@0.0.1536.824" timestamp="1609316182000" />
    <state x="93" y="93" width="1350" height="638" key="DiffContextDialog/0.0.1536.824@0.0.1536.824" timestamp="1612321934878" />
    <state x="549" y="167" key="FileChooserDialogImpl" timestamp="1612172752103">
      <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="1612172752103" />
    <state width="1031" height="366" key="GridCell.Tab.0.bottom" timestamp="1612245775965">
    <state width="1493" height="196" key="GridCell.Tab.0.bottom" timestamp="1612321035564">
      <screen x="0" y="0" width="1536" height="824" />
    </state>
    <state width="1031" height="366" key="GridCell.Tab.0.bottom/0.0.1536.824@0.0.1536.824" timestamp="1612245775965" />
    <state width="1031" height="366" key="GridCell.Tab.0.center" timestamp="1612245775965">
    <state width="1493" height="196" key="GridCell.Tab.0.bottom/0.0.1536.824@0.0.1536.824" timestamp="1612321035564" />
    <state width="1493" height="196" key="GridCell.Tab.0.center" timestamp="1612321035564">
      <screen x="0" y="0" width="1536" height="824" />
    </state>
    <state width="1031" height="366" key="GridCell.Tab.0.center/0.0.1536.824@0.0.1536.824" timestamp="1612245775965" />
    <state width="1031" height="366" key="GridCell.Tab.0.left" timestamp="1612245775965">
    <state width="1493" height="196" key="GridCell.Tab.0.center/0.0.1536.824@0.0.1536.824" timestamp="1612321035564" />
    <state width="1493" height="196" key="GridCell.Tab.0.left" timestamp="1612321035564">
      <screen x="0" y="0" width="1536" height="824" />
    </state>
    <state width="1031" height="366" key="GridCell.Tab.0.left/0.0.1536.824@0.0.1536.824" timestamp="1612245775965" />
    <state width="1031" height="366" key="GridCell.Tab.0.right" timestamp="1612245775965">
    <state width="1493" height="196" key="GridCell.Tab.0.left/0.0.1536.824@0.0.1536.824" timestamp="1612321035564" />
    <state width="1493" height="196" key="GridCell.Tab.0.right" timestamp="1612321035564">
      <screen x="0" y="0" width="1536" height="824" />
    </state>
    <state width="1031" height="366" key="GridCell.Tab.0.right/0.0.1536.824@0.0.1536.824" timestamp="1612245775965" />
    <state width="1031" height="366" key="GridCell.Tab.1.bottom" timestamp="1612245775965">
    <state width="1493" height="196" key="GridCell.Tab.0.right/0.0.1536.824@0.0.1536.824" timestamp="1612321035564" />
    <state width="1031" height="507" key="GridCell.Tab.1.bottom" timestamp="1612319928260">
      <screen x="0" y="0" width="1536" height="824" />
    </state>
    <state width="1031" height="366" key="GridCell.Tab.1.bottom/0.0.1536.824@0.0.1536.824" timestamp="1612245775965" />
    <state width="1031" height="366" key="GridCell.Tab.1.center" timestamp="1612245775965">
    <state width="1031" height="507" key="GridCell.Tab.1.bottom/0.0.1536.824@0.0.1536.824" timestamp="1612319928260" />
    <state width="1031" height="507" key="GridCell.Tab.1.center" timestamp="1612319928260">
      <screen x="0" y="0" width="1536" height="824" />
    </state>
    <state width="1031" height="366" key="GridCell.Tab.1.center/0.0.1536.824@0.0.1536.824" timestamp="1612245775965" />
    <state width="1031" height="366" key="GridCell.Tab.1.left" timestamp="1612245775965">
    <state width="1031" height="507" key="GridCell.Tab.1.center/0.0.1536.824@0.0.1536.824" timestamp="1612319928260" />
    <state width="1031" height="507" key="GridCell.Tab.1.left" timestamp="1612319928260">
      <screen x="0" y="0" width="1536" height="824" />
    </state>
    <state width="1031" height="366" key="GridCell.Tab.1.left/0.0.1536.824@0.0.1536.824" timestamp="1612245775965" />
    <state width="1031" height="366" key="GridCell.Tab.1.right" timestamp="1612245775965">
    <state width="1031" height="507" key="GridCell.Tab.1.left/0.0.1536.824@0.0.1536.824" timestamp="1612319928260" />
    <state width="1031" height="507" key="GridCell.Tab.1.right" timestamp="1612319928260">
      <screen x="0" y="0" width="1536" height="824" />
    </state>
    <state width="1031" height="366" key="GridCell.Tab.1.right/0.0.1536.824@0.0.1536.824" timestamp="1612245775965" />
    <state width="1031" height="366" key="GridCell.Tab.2.bottom" timestamp="1612245775966">
    <state width="1031" height="507" key="GridCell.Tab.1.right/0.0.1536.824@0.0.1536.824" timestamp="1612319928260" />
    <state width="1031" height="507" key="GridCell.Tab.2.bottom" timestamp="1612319928260">
      <screen x="0" y="0" width="1536" height="824" />
    </state>
    <state width="1031" height="366" key="GridCell.Tab.2.bottom/0.0.1536.824@0.0.1536.824" timestamp="1612245775966" />
    <state width="1031" height="366" key="GridCell.Tab.2.center" timestamp="1612245775966">
    <state width="1031" height="507" key="GridCell.Tab.2.bottom/0.0.1536.824@0.0.1536.824" timestamp="1612319928260" />
    <state width="1031" height="507" key="GridCell.Tab.2.center" timestamp="1612319928260">
      <screen x="0" y="0" width="1536" height="824" />
    </state>
    <state width="1031" height="366" key="GridCell.Tab.2.center/0.0.1536.824@0.0.1536.824" timestamp="1612245775966" />
    <state width="1031" height="366" key="GridCell.Tab.2.left" timestamp="1612245775966">
    <state width="1031" height="507" key="GridCell.Tab.2.center/0.0.1536.824@0.0.1536.824" timestamp="1612319928260" />
    <state width="1031" height="507" key="GridCell.Tab.2.left" timestamp="1612319928260">
      <screen x="0" y="0" width="1536" height="824" />
    </state>
    <state width="1031" height="366" key="GridCell.Tab.2.left/0.0.1536.824@0.0.1536.824" timestamp="1612245775966" />
    <state width="1031" height="366" key="GridCell.Tab.2.right" timestamp="1612245775966">
    <state width="1031" height="507" key="GridCell.Tab.2.left/0.0.1536.824@0.0.1536.824" timestamp="1612319928260" />
    <state width="1031" height="507" key="GridCell.Tab.2.right" timestamp="1612319928260">
      <screen x="0" y="0" width="1536" height="824" />
    </state>
    <state width="1031" height="366" key="GridCell.Tab.2.right/0.0.1536.824@0.0.1536.824" timestamp="1612245775966" />
    <state width="1031" height="507" key="GridCell.Tab.2.right/0.0.1536.824@0.0.1536.824" timestamp="1612319928260" />
    <state x="299" y="67" key="Maven.ArtifactSearchDialog" timestamp="1610611848124">
      <screen x="0" y="0" width="1536" height="824" />
    </state>
@@ -533,10 +537,10 @@
      <screen x="0" y="0" width="1536" height="824" />
    </state>
    <state width="498" height="540" key="SwitcherDM/0.0.1536.824@0.0.1536.824" timestamp="1611823082750" />
    <state x="93" y="93" width="1350" height="638" key="com.intellij.history.integration.ui.views.DirectoryHistoryDialog" timestamp="1609398421992">
    <state x="93" y="93" width="1350" height="638" key="com.intellij.history.integration.ui.views.DirectoryHistoryDialog" timestamp="1612321934878">
      <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.DirectoryHistoryDialog/0.0.1536.824@0.0.1536.824" timestamp="1609398421992" />
    <state x="93" y="93" width="1350" height="638" key="com.intellij.history.integration.ui.views.DirectoryHistoryDialog/0.0.1536.824@0.0.1536.824" timestamp="1612321934878" />
    <state x="93" y="93" width="1350" height="639" key="com.intellij.history.integration.ui.views.FileHistoryDialog" timestamp="1611623127978">
      <screen x="0" y="0" width="1536" height="824" />
    </state>
@@ -545,10 +549,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="1612246937054">
    <state x="233" y="42" width="921" height="782" key="find.popup" timestamp="1612318003112">
      <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="1612246937054" />
    <state x="233" y="42" width="921" height="782" key="find.popup/0.0.1536.824@0.0.1536.824" timestamp="1612318003112" />
    <state width="600" height="428" key="javadoc.popup" timestamp="1610005781618">
      <screen x="0" y="0" width="1536" height="824" />
    </state>
springcloud_k8s_panzhihuazhihuishequ/service_user/src/main/java/com/panzhihua/service_user/dao/UserDao.java
@@ -21,6 +21,7 @@
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;
import java.util.Date;
import java.util.List;
/**
@@ -193,32 +194,29 @@
            "COUNT(case WHEN DATE_FORMAT(last_login_time,'%m-%d-%Y')=DATE_FORMAT(SYSDATE(),'%m-%d-%Y') and continuous_landing_days>=7 then user_id else null end )activeWeekUser\n" +
            "FROM\n" +
            "sys_user\n" +
            "where type=1")
            "where type=1 and community_id is not null")
    IndexDataKanbanVO selectIndexDataKanban();
    @Select("select t.`name`,t.num from (\n" +
    @Select("select t.* from (\n" +
            "SELECT \n" +
            "COUNT(u.user_id)num,\n" +
            "c.`name`\n" +
            "a.`name`,\n" +
            "COUNT(u.user_id)num\n" +
            "FROM\n" +
            "sys_user u \n" +
            "join com_act c on u.community_id=c.community_id\n" +
            "WHERE\n" +
            "u.type =1\n" +
            "GROUP BY u.community_id)t ORDER BY t.num desc limit 10")
            "com_act a\n" +
            "LEFT JOIN sys_user u ON a.community_id = u.community_id and u.type=1\n" +
            "GROUP BY a.community_id)t ORDER BY t.num desc  ")
    List<DataKanbanDTO>  selectCommunityUserOrder();
    @Select("select t.`name`,t.num from (\n" +
            "SELECT \n" +
            "COUNT(u.user_id)num,\n" +
            "c.`name`\n" +
    @Select("SELECT\n" +
            "\tCOUNT( a.id ) num \n" +
            "FROM\n" +
            "sys_user u \n" +
            "join com_act c on u.community_id=c.community_id\n" +
            "\tcom_act_activity a \n" +
            "WHERE\n" +
            "u.type =1 and DATE_FORMAT(u.last_login_time,'%m-%d-%Y')=DATE_FORMAT(SYSDATE(),'%m-%d-%Y') and u.continuous_landing_days>=7\n" +
            "GROUP BY u.community_id)t ORDER BY t.num desc limit 10")
    List<DataKanbanDTO> selectCommunityActiveUserOrder();
            "\tDATE_FORMAT( #{date1}, '%Y-%m-%d' )= DATE_FORMAT(\n" +
            "\t\ta.create_at,\n" +
            "\t'%Y-%m-%d')\n" +
            "\t")
    DataKanbanDTO selectCommunityActiveUserOrder(Date date1);
    @Select("SELECT \n" +
            "COUNT(DISTINCT u.user_id)allUser,\n" +
            "(select COUNT(m.id) from com_mng_volunteer_mng m where m.community_id=#{communityId} and m.`state`=2)volunteerUser,\n" +
springcloud_k8s_panzhihuazhihuishequ/service_user/src/main/java/com/panzhihua/service_user/service/impl/UserServiceImpl.java
@@ -23,6 +23,8 @@
import com.panzhihua.service_user.model.dtos.DataKanbanDTO;
import com.panzhihua.service_user.service.UserService;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.time.DateFormatUtils;
import org.apache.commons.lang3.time.DateUtils;
import org.springframework.beans.BeanUtils;
import org.springframework.data.redis.core.StringRedisTemplate;
import org.springframework.data.redis.core.ValueOperations;
@@ -1204,7 +1206,7 @@
    public R dataKanban() {
        IndexDataKanbanVO indexDataKanbanVO=userDao.selectIndexDataKanban();
        List<DataKanbanDTO> dataKanbanDTOS=userDao.selectCommunityUserOrder();
        List<DataKanbanDTO> dataKanbanDTOS1=userDao.selectCommunityActiveUserOrder();
        List<String> communityUserX=new ArrayList<>();
        List<Integer> communityUserY=new ArrayList<>();
        List<String> communityActiveUserX=new ArrayList<>();
@@ -1215,17 +1217,33 @@
                communityUserY.add(dataKanbanDTO.getNum());
            });
        }
        if (!ObjectUtils.isEmpty(dataKanbanDTOS1)) {
            dataKanbanDTOS1.forEach(dataKanbanDTO -> {
                communityActiveUserX.add(dataKanbanDTO.getName());
                communityActiveUserY.add(dataKanbanDTO.getNum());
            });
        }
//        获取最近七天数据
        List<Date> serverndays=this.getServenDays();
        serverndays.forEach(date -> {
            //        查询社区活动数量
            DataKanbanDTO dataKanbanDTO=userDao.selectCommunityActiveUserOrder(date);
            communityActiveUserX.add(DateFormatUtils.format(date,"MM-dd"));
            communityActiveUserY.add(dataKanbanDTO.getNum());
        });
        indexDataKanbanVO.setCommunityActiveUserX(communityActiveUserX);
        indexDataKanbanVO.setCommunityActiveUserY(communityActiveUserY);
        indexDataKanbanVO.setCommunityUserX(communityUserX);
        indexDataKanbanVO.setCommunityUserY(communityUserY);
        return R.ok(indexDataKanbanVO);
    }
    /**
     * 获取最近七天数据
     * @return
     */
    private List<Date> getServenDays() {
        List<Date>dates=new ArrayList<>();
        Date date=new Date();
        for(int i=6;i>=0;i--){
            Date date1= DateUtils.addDays(date,-i);
            dates.add(date1);
        }
        return dates;
    }
    /**
@@ -1341,10 +1359,16 @@
    public static void main(String[] args) {
        String encode = new BCryptPasswordEncoder().encode("lbsq123456");
        System.out.println(encode);
//        String encode = new BCryptPasswordEncoder().encode("lbsq123456");
//        System.out.println(encode);
        List<Date>dates=new ArrayList<>();
        Date date=new Date();
        for(int i=6;i>=0;i--){
            Date date1= DateUtils.addDays(date,-i);
            dates.add(date1);
        }
        System.out.println(dates);
//        BCryptPasswordEncoder encoder = new BCryptPasswordEncoder();
//        boolean matches = encoder.matches("admin1234567", encode);
springcloud_k8s_panzhihuazhihuishequ/timejob/src/main/resources/application.properties
File was deleted