|
@@ -3,8 +3,9 @@ package com.nokia.dao;
|
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
|
import com.nokia.pojo.Role;
|
|
import com.nokia.pojo.Role;
|
|
import com.nokia.pojo.User;
|
|
import com.nokia.pojo.User;
|
|
-import com.nokia.vo.FlowRoleVo;
|
|
|
|
-import com.nokia.vo.FlowUserVo;
|
|
|
|
|
|
+import com.nokia.vo.flow.FlowRoleVo;
|
|
|
|
+import com.nokia.vo.flow.FlowUserVo;
|
|
|
|
+
|
|
import org.apache.ibatis.annotations.*;
|
|
import org.apache.ibatis.annotations.*;
|
|
import java.util.List;
|
|
import java.util.List;
|
|
|
|
|
|
@@ -32,9 +33,9 @@ public interface UserDao extends BaseMapper<User> {
|
|
@Result(column = "org_name", property = "org.orgName"),
|
|
@Result(column = "org_name", property = "org.orgName"),
|
|
})
|
|
})
|
|
@Select("select a.user_id as user_id, a.login_name as login_id, a.user_name as user_name, a.phone as mobile, a.email as email,"
|
|
@Select("select a.user_id as user_id, a.login_name as login_id, a.user_name as user_name, a.phone as mobile, a.email as email,"
|
|
- + " a.city_id as org_id, c.city_name_zh as org_name, a.district as area"
|
|
|
|
- + " from sqmdb_rpt.acl_user a, sqmdb_rpt.acl_city c"
|
|
|
|
- + " where a.city_id = c.city_id")
|
|
|
|
|
|
+ + " a.city_id as org_id, c1.area_name as org_name, a.area_id as area"
|
|
|
|
+ + " from sqmdb_rpt.acl_user a, sqmdb_rpt.acl_area c1"
|
|
|
|
+ + " where a.city_id = c1.area_id")
|
|
List<FlowUserVo> findToPage();
|
|
List<FlowUserVo> findToPage();
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -45,9 +46,9 @@ public interface UserDao extends BaseMapper<User> {
|
|
@Result(column = "org_name", property = "org.orgName"),
|
|
@Result(column = "org_name", property = "org.orgName"),
|
|
})
|
|
})
|
|
@Select("select a.user_id as user_id, a.login_name as login_id, a.user_name as user_name, a.phone as mobile, a.email as email,"
|
|
@Select("select a.user_id as user_id, a.login_name as login_id, a.user_name as user_name, a.phone as mobile, a.email as email,"
|
|
- + " a.city_id as org_id, c.city_name_zh as org_name, a.district as area"
|
|
|
|
- + " from sqmdb_rpt.acl_user a, sqmdb_rpt.acl_city c"
|
|
|
|
- + " where a.city_id = c.city_id and login_name=#{loginId}")
|
|
|
|
|
|
+ + " a.city_id as org_id, c.area_name as org_name, a.area_id as area"
|
|
|
|
+ + " from sqmdb_rpt.acl_user a, sqmdb_rpt.acl_area c"
|
|
|
|
+ + " where a.city_id = c.area_id and a.login_name=#{loginId}")
|
|
FlowUserVo getFlowUserVoByLoginId(String loginId);
|
|
FlowUserVo getFlowUserVoByLoginId(String loginId);
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -58,9 +59,9 @@ public interface UserDao extends BaseMapper<User> {
|
|
@Result(column = "org_name", property = "org.orgName"),
|
|
@Result(column = "org_name", property = "org.orgName"),
|
|
})
|
|
})
|
|
@Select("select a.user_id as user_id, a.login_name as login_id, a.user_name as user_name, a.phone as mobile, a.email as email,"
|
|
@Select("select a.user_id as user_id, a.login_name as login_id, a.user_name as user_name, a.phone as mobile, a.email as email,"
|
|
- + " a.city_id as org_id, c.city_name_zh as org_name, a.district as area"
|
|
|
|
- + " from sqmdb_rpt.acl_user a, sqmdb_rpt.acl_city c"
|
|
|
|
- + " where a.city_id = c.city_id and user_id=#{userId}")
|
|
|
|
|
|
+ + " a.city_id as org_id, c.area_name as org_name, a.area_id as area"
|
|
|
|
+ + " from sqmdb_rpt.acl_user a, sqmdb_rpt.acl_area c"
|
|
|
|
+ + " where a.city_id = c.area_id and user_id=#{userId}")
|
|
FlowUserVo getFlowUserVoByUserId(Integer userId);
|
|
FlowUserVo getFlowUserVoByUserId(Integer userId);
|
|
|
|
|
|
@Select("select r.role_id from sqmdb_rpt.acl_role r, sqmdb_rpt.acl_user_role_city ur where r.role_id = ur.role_id and r.system='flow' and ur.user_id=#{userId}")
|
|
@Select("select r.role_id from sqmdb_rpt.acl_role r, sqmdb_rpt.acl_user_role_city ur where r.role_id = ur.role_id and r.system='flow' and ur.user_id=#{userId}")
|
|
@@ -69,18 +70,15 @@ public interface UserDao extends BaseMapper<User> {
|
|
@Select("select u.user_id from sqmdb_rpt.acl_user u, sqmdb_rpt.acl_user_role_city ur where u.user_id = ur.user_id and ur.role_id=#{roleId}")
|
|
@Select("select u.user_id from sqmdb_rpt.acl_user u, sqmdb_rpt.acl_user_role_city ur where u.user_id = ur.user_id and ur.role_id=#{roleId}")
|
|
List<Integer> findUserIdByRoleId(Integer roleId);
|
|
List<Integer> findUserIdByRoleId(Integer roleId);
|
|
|
|
|
|
- /**
|
|
|
|
- *
|
|
|
|
- */
|
|
|
|
@Results({
|
|
@Results({
|
|
@Result(column = "org_id", property = "org.orgId"),
|
|
@Result(column = "org_id", property = "org.orgId"),
|
|
@Result(column = "org_name", property = "org.orgName"),
|
|
@Result(column = "org_name", property = "org.orgName"),
|
|
})
|
|
})
|
|
@Select("<script>"
|
|
@Select("<script>"
|
|
+ "select a.user_id as user_id, a.login_name as login_id, a.user_name as user_name, a.phone as mobile, a.email as email,"
|
|
+ "select a.user_id as user_id, a.login_name as login_id, a.user_name as user_name, a.phone as mobile, a.email as email,"
|
|
- + " a.city_id as org_id, c.city_name_zh as org_name, a.district as area"
|
|
|
|
- + " from sqmdb_rpt.acl_user a, sqmdb_rpt.acl_city c, sqmdb_rpt.acl_user_role_city ur "
|
|
|
|
- + " where a.user_id = ur.user_id and a.city_id = c.city_id"
|
|
|
|
|
|
+ + " a.city_id as org_id, c.area_name as org_name, a.area_id as area"
|
|
|
|
+ + " from sqmdb_rpt.acl_user a, sqmdb_rpt.acl_area c, sqmdb_rpt.acl_user_role_city ur "
|
|
|
|
+ + " where a.user_id = ur.user_id and a.city_id = c.area_id"
|
|
+ "<if test=\"loginId != null and loginId !=''\">"
|
|
+ "<if test=\"loginId != null and loginId !=''\">"
|
|
+ " and a.login_name=#{loginId} "
|
|
+ " and a.login_name=#{loginId} "
|
|
+ "</if>"
|
|
+ "</if>"
|
|
@@ -99,4 +97,6 @@ public interface UserDao extends BaseMapper<User> {
|
|
|
|
|
|
@Select("select user_id from sqmdb_rpt.acl_user au where au.login_name = #{loginName}")
|
|
@Select("select user_id from sqmdb_rpt.acl_user au where au.login_name = #{loginName}")
|
|
Integer hasLoginName(String loginName);
|
|
Integer hasLoginName(String loginName);
|
|
|
|
+
|
|
|
|
+ List<User> getByRoleIds(List<Integer> roleIds, List<Integer> cityIds);
|
|
}
|
|
}
|