huanghongfa
2021-01-07 ae33fef700e5d2558dffb03c8f66358da2545791
springcloud_k8s_panzhihuazhihuishequ/service_user/src/main/java/com/panzhihua/service_user/dao/UserDao.java
@@ -7,6 +7,7 @@
import com.panzhihua.common.model.dtos.PageDTO;
import com.panzhihua.common.model.dtos.user.PageUserAppletsBackstageDTO;
import com.panzhihua.common.model.vos.IndexDataKanbanVO;
import com.panzhihua.common.model.vos.IndexDataVO;
import com.panzhihua.common.model.vos.LoginUserInfoVO;
import com.panzhihua.common.model.vos.user.AdministratorsUserVO;
import com.panzhihua.common.model.vos.user.SysUserNoticeVO;
@@ -211,4 +212,24 @@
            "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();
    @Select("SELECT \n" +
            "COUNT(u.user_id)allUser,\n" +
            "COUNT(case when u.is_volunteer=1 then u.user_id else null end )volunteerUser,\n" +
            "COUNT(case when u.is_partymember=1 then u.user_id else null end )partymemberUser,\n" +
            "COUNT(h.id)house\n" +
            "FROM\n" +
            "sys_user u\n" +
            "JOIN com_act c ON u.community_id = c.community_id \n" +
            "LEFT JOIN com_mng_struct_house_user h on u.user_id=h.user_id\n" +
            "WHERE\n" +
            "u.community_id =#{communityId} and u.type=1")
    IndexDataVO indexDataCommunityBackstage(Long communityId);
    @Update("UPDATE sys_user u \n" +
            "SET u.continuous_landing_days =\n" +
            "IF\n" +
            "(\n" +
            "DATE_FORMAT( u.last_login_time, '%m-%d-%Y' )= DATE_FORMAT( SYSDATE(), '%m-%d-%Y' ),\n" +
            "u.continuous_landing_days + 1,\n" +
            "0)")
    int timedTaskContinuousLandingDays();
}