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

网站带数据库下载上海今天最新新闻10条

网站带数据库下载,上海今天最新新闻10条,网站开发实训课程的总结,马鞍山网站建设制作场景 在IDEA中的SpringBoot项目使用Junit进行单元测试。 1.使用Test标明的方法不能有参数和返回值。 2.使用Autowired实现自动注入时需要在测试类上添加注解。 实现 在test目录下新建单元测试类 package com.ws.test.common;import com.baomidou.mybatisplus.core.conditi…

 场景

在IDEA中的SpringBoot项目使用Junit进行单元测试。

1.使用@Test标明的方法不能有参数和返回值。

2.使用@Autowired实现自动注入时需要在测试类上添加注解。

实现

在test目录下新建单元测试类

package com.ws.test.common;import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.ws.sys.entity.SysEnterpriseOrg;
import com.ws.sys.mapper.SysEnterpriseOrgMapper;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
import org.springframework.test.context.web.WebAppConfiguration;import java.util.ArrayList;
import java.util.List;@RunWith(SpringJUnit4ClassRunner.class)
@SpringBootTest
@WebAppConfiguration
public class diguiTest  {@Autowiredprivate SysEnterpriseOrgMapper sysEnterpriseOrgMapper;List<Long> result = new ArrayList<Long>();@Testpublic void test(){List<Long> canshu = new ArrayList<Long>();canshu.add(1l);selectChild(canshu);for (Long s :result) {System.out.print(s);}}public void selectChild(List<Long> ids){List<Long> temp= new ArrayList<Long>();List<SysEnterpriseOrg> sysEnterpriseOrgList = new ArrayList<SysEnterpriseOrg>();for (Long id :ids) {//查询子级架构QueryWrapper<SysEnterpriseOrg> sysEnterpriseOrgChildQueryWrapper = new QueryWrapper<SysEnterpriseOrg>();sysEnterpriseOrgChildQueryWrapper.eq("pid",id.toString());sysEnterpriseOrgList= sysEnterpriseOrgMapper.selectList(sysEnterpriseOrgChildQueryWrapper);for (SysEnterpriseOrg s:sysEnterpriseOrgList) {temp.add(s.getId());result.add(s.getId());}}if(temp.size()!=0&&temp!=null)selectChild(temp);}
}

http://www.dtcms.com/wzjs/792298.html

相关文章:

  • 东莞家政网站建设网页设计师工作职责
  • 平台网站开发方案单位做核酸检测的通知
  • 想兼职做网站推广泉州建设网站
  • 网站做美食视频挣钱吗新建网站怎么保存
  • 网站建设策划ppt网站的设计方法有哪些内容
  • 紫金公司网站制作响水县住房和城乡建设局网站
  • 什么网站可以找到防水工程做背投广告典型网站
  • 专门做商标的网站有哪些中山网站建设文化信息
  • 免费情感网站哪个好天津建筑信息网
  • p2p的网站建设设计师建站网站
  • 网站建设先有域名然后呢荆州网络推广
  • 宁波网站建设地址网站怎么百度收录
  • 网站建设及推广费用怎么入账如何做360网站优化
  • 网站定制 天津道路建设去什么网站能看到
  • 木渎建设局网站网页编辑软件绿色
  • wordpress php转html代码宁波seo推广哪家好
  • 网站建设开发费入什么科目什么是在线设计平台
  • 海淀区网站制作公司建立的读音
  • wap自助建站排板wordpress左侧产品分类目录
  • 销售网站的销量统计怎么做天津微信网站
  • 提供零基础网站建设教学深圳全网推广平台
  • 东莞专业网站设计建站酷家乐软件下载电脑版
  • 太原网站建设技术外包廊坊市广阳区建设局网站
  • 郑州网站排名优化外包网站建设售价多少钱
  • 安徽网站建站系统哪家好能用的免费proxy网页
  • 网站建设需要什么岗位我做淘宝网站卖东西怎么激活
  • 网站设计方案报价wordpress popup
  • 佛山网站建设与设计郑州网红打卡地
  • 广州高端网站制作公司哪家好如何做积分商城网站
  • 免费的域名和网站wordpress网站做h5分类