From 5f36b7bb9fb215908b1b9b39a972dfe312016bf9 Mon Sep 17 00:00:00 2001 From: Null <281575458@qq.com> Date: 星期三, 17 三月 2021 12:32:17 +0800 Subject: [PATCH] 后台车辆新增和查询接口 --- springcloud_k8s_panzhihuazhihuishequ/service_user/src/main/java/com/panzhihua/service_user/dao/UserDao.java | 24 +++++++++++++++++++++++- 1 files changed, 23 insertions(+), 1 deletions(-) diff --git a/springcloud_k8s_panzhihuazhihuishequ/service_user/src/main/java/com/panzhihua/service_user/dao/UserDao.java b/springcloud_k8s_panzhihuazhihuishequ/service_user/src/main/java/com/panzhihua/service_user/dao/UserDao.java index 45648be..63790e5 100644 --- a/springcloud_k8s_panzhihuazhihuishequ/service_user/src/main/java/com/panzhihua/service_user/dao/UserDao.java +++ b/springcloud_k8s_panzhihuazhihuishequ/service_user/src/main/java/com/panzhihua/service_user/dao/UserDao.java @@ -266,7 +266,7 @@ @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" + - "COUNT(case when u.is_partymember=1 then u.user_id else null end )partymemberUser,\n" + + "COUNT(DISTINCT 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" + @@ -393,4 +393,26 @@ " </if> " + "</script>") List<EexcelUserDTO> selectExport(@Param("exportUserDTO") ExportUserDTO exportUserDTO); + + @Select("SELECT\n" + + "\t COUNT(a.id)\n" + + "FROM\n" + + "\t com_pb_member_role a \n" + + "WHERE\n" + + "\t a.phone = #{phone}") + Integer selectCountMemberRole(@Param("phone")String phone); + + @Select("SELECT\n" + + "\t COUNT(a.id)\n" + + "FROM\n" + + "\t com_pb_service_team a \n" + + "WHERE\n" + + "\t a.phone = #{phone}") + Integer selectCountTeam(@Param("phone")String phone); + + + @Update("update com_pb_member_role u set u.phone=#{newphone},is_reg=1 where u.phone=#{oldphone}") + void updateMemberRole(@Param("newphone")String newphone,@Param("oldphone")String oldphone); + @Update("update com_pb_service_team u set u.phone=#{newphone},is_reg=1 where u.phone=#{oldphone}") + void updateServiceTeam(@Param("newphone")String newphone,@Param("oldphone")String oldphone); } -- Gitblit v1.7.1