当前位置: 首页 > news >正文

河间做网站价格/百度一下 官方网

河间做网站价格,百度一下 官方网,怎么建设小说网站,做八闽最好的中学网站需求,根据用户角色列表 查询用户列表信息之前我们传入的参数是Array,一个数组的形式,现在我们传入的是一个List集合,其他条件没有变化。/*** 需求:传入指定的用户角色,用户角色有1-n,获取这些用户角色下的…

需求,根据用户角色列表  查询用户列表信息

之前我们传入的参数是Array,一个数组的形式,现在我们传入的是一个List集合,其他条件没有变化。

/**

* 需求:传入指定的用户角色,用户角色有1-n,获取这些用户角色下的用户列表信息

* @param roleids

* @return

*/

public List getUserListByRoleid_List(List roleList);

select * from smbms_user where userRole in

#{roleList}

1 //传入List集合的方式

2 @Test3 public voidtestGetUserByForeach_List(){4 SqlSession sqlSession = null;5 List userList = new ArrayList();6 userList.add(2);7 userList.add(3);8 List userListShow=new ArrayList();9 try{10 sqlSession =MyBatisUtil.createSqlSession();11 userListShow = sqlSession.getMapper(UserMapper.class).getUserListByRoleid_List(userList);12

13 } catch(Exception e) {14 //TODO: handle exception

15 e.printStackTrace();16 }finally{17 MyBatisUtil.closeSqlSession(sqlSession);18 }19 for(User user: userListShow){20 logger.debug("testGetUserListAddressByUserId UserCode: " + user.getUserCode() + " and UserName: " + user.getUserName()+"and userRole:"+user.getUserRole());21 }22

23

24 }

运行结果:

1 [DEBUG] 2019-12-22 15:13:43,496 cn.smbms.dao.user.UserMapper.getUserListByRoleid_List -ooo Using Connection [[email protected]]2 [DEBUG] 2019-12-22 15:13:43,496 cn.smbms.dao.user.UserMapper.getUserListByRoleid_List - ==> Preparing: select * from smbms_user where userRole in ( ? , ?)3 [DEBUG] 2019-12-22 15:13:43,514 cn.smbms.dao.user.UserMapper.getUserListByRoleid_List - ==> Parameters: 2(Integer), 3(Integer)4 [DEBUG] 2019-12-22 15:13:43,550 org.apache.ibatis.transaction.jdbc.JdbcTransaction - Resetting autocommit to trueon JDBC Connection [[email protected]]5 [DEBUG] 2019-12-22 15:13:43,551 org.apache.ibatis.transaction.jdbc.JdbcTransaction -Closing JDBC Connection [[email protected]]6 [DEBUG] 2019-12-22 15:13:43,551 org.apache.ibatis.datasource.pooled.PooledDataSource - Returned connection 683362635to pool.7 [DEBUG] 2019-12-22 15:13:43,551 cn.smbms.dao.user.UserMapperTest - testGetUserListAddressByUserId UserCode: liming and UserName: 李明and userRole:2

8 [DEBUG] 2019-12-22 15:13:43,551 cn.smbms.dao.user.UserMapperTest - testGetUserListAddressByUserId UserCode: hanlubiao and UserName: 韩路彪and userRole:2

9 [DEBUG] 2019-12-22 15:13:43,551 cn.smbms.dao.user.UserMapperTest - testGetUserListAddressByUserId UserCode: zhanghua and UserName: 张华and userRole:3

10 [DEBUG] 2019-12-22 15:13:43,551 cn.smbms.dao.user.UserMapperTest - testGetUserListAddressByUserId UserCode: wangyang and UserName: 王洋and userRole:3

11 [DEBUG] 2019-12-22 15:13:43,551 cn.smbms.dao.user.UserMapperTest - testGetUserListAddressByUserId UserCode: zhaoyan and UserName: 赵燕and userRole:3

12 [DEBUG] 2019-12-22 15:13:43,551 cn.smbms.dao.user.UserMapperTest - testGetUserListAddressByUserId UserCode: sunlei and UserName: 孙磊and userRole:3

13 [DEBUG] 2019-12-22 15:13:43,551 cn.smbms.dao.user.UserMapperTest - testGetUserListAddressByUserId UserCode: sunxing and UserName: 孙兴and userRole:3

14 [DEBUG] 2019-12-22 15:13:43,551 cn.smbms.dao.user.UserMapperTest - testGetUserListAddressByUserId UserCode: zhangchen and UserName: 张晨and userRole:3

15 [DEBUG] 2019-12-22 15:13:43,551 cn.smbms.dao.user.UserMapperTest - testGetUserListAddressByUserId UserCode: dengchao and UserName: 邓超and userRole:3

16 [DEBUG] 2019-12-22 15:13:43,551 cn.smbms.dao.user.UserMapperTest - testGetUserListAddressByUserId UserCode: yangguo and UserName: 杨过and userRole:3

17 [DEBUG] 2019-12-22 15:13:43,551 cn.smbms.dao.user.UserMapperTest - testGetUserListAddressByUserId UserCode: zhaomin and UserName: 赵敏and userRole:2

原文:https://www.cnblogs.com/dongyaotou/p/12079917.html

http://www.lbrq.cn/news/1552483.html

相关文章:

  • 昆明网站建设优化/上海seo网站推广公司
  • 做视频好用的素材网站/长沙竞价优化
  • 湖州住房和城乡建设部网站/百度网盘资源搜索
  • 网站后台开发步骤/百度竞价排名是以什么形式来计费的广告?
  • 比较国内外政府门户网站建设特点/广州百度seo代理
  • wordpress 登录失败/seo优化网站百度技术
  • 网页制作教程视频简单/郑州关键词网站优化排名
  • seo营销策划/济宁seo推广
  • 在建立网站站点的过程中/网站关键词百度自然排名优化
  • 鞍山哪里做网站/网络营销环境的分析主要是
  • 企业网站四大类型/dz论坛如何seo
  • 网络教学网站建设/百度推广一般要多少钱
  • 国外网站设计参考/百度sem竞价推广
  • 国内优秀网站网页设计/营销网站
  • 汽配出口做哪个网站好/注册google账号
  • 网站制作教程:初学者/长沙seo推广优化
  • 免费自助小型网站/域名解析查询
  • 网站注册地址查询/dz论坛seo设置
  • 煤炭网站建设企业/网站seo是什么意思
  • 微信网站是什么意思/杭州企业seo
  • 浙江网站建设推广公司找哪家/seo程序
  • 知名网站建设推广/世界搜索引擎大全
  • 做网站推广汉狮网络/关键词热度分析工具
  • 莘县网站制作/网络seo优化
  • wordpress4.9.5/东莞网络推广及优化
  • 网站制作内容文案/怎么在百度做宣传广告
  • 做网站大约要多少钱/更厉害的病毒2024
  • 微信小程序网站模板/搜狗友链交换
  • 做电影网站哪个系统好/电子商务网站建设论文
  • 网站开发是什么意思啊/百度学术论文查重
  • 【速通】深度学习模型调试系统化方法论:从问题定位到性能优化
  • ChatGPT-5 对教育行业的影响与案例研究
  • 问答社区运营优化:cpolar 提升 Answer 平台远程访问速度方案
  • go基础学习笔记
  • STL 容器
  • 机器学习——PCA算法