| | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | 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.LoginUserInfoVO; |
| | | import com.panzhihua.common.model.vos.user.AdministratorsUserVO; |
| | | import com.panzhihua.common.model.vos.user.SysUserNoticeVO; |
| | | import com.panzhihua.common.model.vos.user.SysUserVO; |
| | | import com.panzhihua.service_user.model.dos.SysUserDO; |
| | | import com.panzhihua.service_user.model.dtos.DataKanbanDTO; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | import org.apache.ibatis.annotations.Select; |
| | | import org.apache.ibatis.annotations.Update; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @program: springcloud_k8s_panzhihuazhihuishequ |
| | |
| | | "from sys_user u\n" + |
| | | "left join com_act a on u.community_id=a.community_id\n" + |
| | | " where\n" + |
| | | "u.type=1\n"+ |
| | | "u.type=1\n" + |
| | | "<if test='pageUserAppletsBackstageDTO.phone != null and pageUserAppletsBackstageDTO.phone.trim() != ""'>" + |
| | | "and u.phone=#{pageUserAppletsBackstageDTO.phone}\n" + |
| | | " </if> " + |
| | |
| | | "order by u.create_at desc \n" + |
| | | "</script>") |
| | | IPage<SysUserVO> pageUserAppletsBackstage(Page page, @Param("pageUserAppletsBackstageDTO") PageUserAppletsBackstageDTO pageUserAppletsBackstageDTO); |
| | | |
| | | @Update("update sys_user set nick_name=null ,community_id=null,area_id=null where user_id=#{userId}") |
| | | int deleteUserTest(Long userId); |
| | | @Select("select * from sys_user_notice where user_id=#{pageDTO.userId} order by create_at desc ") |
| | | |
| | | @Select("<script> " + |
| | | "select * from \n" + |
| | | "sys_user_notice \n" + |
| | | "where \n" + |
| | | "user_id=#{pageDTO.userId} \n" + |
| | | "<if test='pageDTO.type != null and pageDTO.type != 0'>" + |
| | | "and type=#{pageDTO.type}\n" + |
| | | " </if> " + |
| | | "order by create_at desc\n" + |
| | | "</script>") |
| | | IPage<SysUserNoticeVO> pageNotice(Page page, @Param("pageDTO") PageDTO pageDTO); |
| | | |
| | | @Select("SELECT \n" + |
| | | "COUNT(user_id)allUser,\n" + |
| | | "COUNT(case WHEN DATE_FORMAT(create_at,'%m-%d-%Y')=DATE_FORMAT(SYSDATE(),'%m-%d-%Y') then user_id else null end )addUser,\n" + |
| | | "COUNT(case WHEN DATE_FORMAT(last_login_time,'%m-%d-%Y')=DATE_FORMAT(SYSDATE(),'%m-%d-%Y') then user_id else null end )activeDayUser,\n" + |
| | | "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") |
| | | IndexDataKanbanVO selectIndexDataKanban(); |
| | | |
| | | @Select("select t.`name`,t.num from (\n" + |
| | | "SELECT \n" + |
| | | "COUNT(u.user_id)num,\n" + |
| | | "c.`name`\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") |
| | | List<DataKanbanDTO> selectCommunityUserOrder(); |
| | | |
| | | @Select("select t.`name`,t.num from (\n" + |
| | | "SELECT \n" + |
| | | "COUNT(u.user_id)num,\n" + |
| | | "c.`name`\n" + |
| | | "FROM\n" + |
| | | "sys_user u \n" + |
| | | "join com_act c on u.community_id=c.community_id\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(); |
| | | } |