huanghongfa
2020-12-24 40529f7d2cadd71c72cb89c7f79046a8ff689df5
springcloud_k8s_panzhihuazhihuishequ/service_user/src/main/java/com/panzhihua/service_user/dao/UserDao.java
@@ -5,6 +5,7 @@
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.panzhihua.common.model.vos.LoginUserInfoVO;
import com.panzhihua.common.model.vos.user.AdministratorsUserVO;
import com.panzhihua.service_user.model.dos.SysUserDO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
@@ -52,12 +53,13 @@
            "and u.`name` = #{loginUserInfoVO.communityName} \n" +
            " </if> " +
            "<if test='loginUserInfoVO.phone != null and loginUserInfoVO.phone.trim() != &quot;&quot;'>" +
            "AND u.phone = #{loginUserInfoVO.phone}"+
            "AND u.phone = #{loginUserInfoVO.phone}" +
            " </if> " +
            " </where>" +
            " order by u.face_state asc,u.create_at asc "+
            " order by u.face_state asc,u.create_at asc " +
            "</script>")
    IPage<LoginUserInfoVO> pageUserFace(Page page, @Param("loginUserInfoVO") LoginUserInfoVO loginUserInfoVO);
    @Select("<script> " +
            "SELECT\n" +
            "u.user_id,\n" +
@@ -81,9 +83,40 @@
            " and u.`name` = #{loginUserInfoVO.name} \n" +
            " </if> " +
            "<if test='loginUserInfoVO.phone != null and loginUserInfoVO.phone.trim() != &quot;&quot;'>" +
            "AND u.phone = #{loginUserInfoVO.phone}"+
            "AND u.phone = #{loginUserInfoVO.phone}" +
            " </if> " +
        " </where>" +
        "</script>")
    IPage<LoginUserInfoVO> pageUser(Page page, @Param("loginUserInfoVO")LoginUserInfoVO loginUserInfoVO);
            " </where>" +
            "</script>")
    IPage<LoginUserInfoVO> pageUser(Page page, @Param("loginUserInfoVO") LoginUserInfoVO loginUserInfoVO);
    @Select("<script> " +
            "SELECT\n" +
            "u.user_id,\n" +
            "u.account,\n" +
            "u.`name`,\n" +
            "u.phone,\n" +
            "e.role_name,\n" +
            "u.`status`,\n" +
            "u.create_at,\n" +
            "u.last_login_time \n" +
            "FROM\n" +
            "sys_user u\n" +
            "JOIN sys_user_role r ON u.user_id = r.user_id\n" +
            "JOIN sys_role e ON r.role_id = e.role_id \n" +
            "<if test='administratorsUserVO.roleId != null and administratorsUserVO.roleId!=0'>" +
            " and e.role_id=#{administratorsUserVO.roleId}"+
            " </if> " +
            " <where>" +
            "<if test='administratorsUserVO.communityId != null '>" +
            "AND u.community_id = #{administratorsUserVO.communityId} \n" +
            " </if> " +
            "<if test='administratorsUserVO.name != null and administratorsUserVO.name.trim() != &quot;&quot;'>" +
            "AND u.name = #{administratorsUserVO.name} \n" +
            " </if> " +
            "<if test='administratorsUserVO.account != null and administratorsUserVO.account.trim() != &quot;&quot;'>" +
            "AND u.account = #{administratorsUserVO.account}" +
            " </if> " +
            " </where>" +
            "</script>")
    IPage<AdministratorsUserVO> pageUserBackstage(Page page, @Param("administratorsUserVO") AdministratorsUserVO administratorsUserVO);
}