!224 refactor: 时间区间查询传入数组-测试模块

Merge pull request !224 from xingyu/master
pull/2/head
芋道源码 2022-07-22 05:22:48 +00:00 committed by Gitee
commit 57cdb017d9
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
39 changed files with 116 additions and 181 deletions

View File

@ -16,7 +16,7 @@
<properties>
<revision>1.6.2-snapshot</revision>
<!-- 统一依赖管理 -->
<spring.boot.version>2.6.8</spring.boot.version>
<spring.boot.version>2.6.9</spring.boot.version>
<!-- Web 相关 -->
<knife4j.version>3.0.3</knife4j.version>
<swagger-annotations.version>1.6.6</swagger-annotations.version>
@ -26,7 +26,7 @@
<mybatis-plus.version>3.5.2</mybatis-plus.version>
<mybatis-plus-generator.version>3.5.2</mybatis-plus-generator.version>
<dynamic-datasource.version>3.5.0</dynamic-datasource.version>
<redisson.version>3.17.3</redisson.version>
<redisson.version>3.17.4</redisson.version>
<!-- Config 配置中心相关 -->
<apollo.version>1.9.2</apollo.version>
<!-- Job 定时任务相关 -->
@ -48,8 +48,8 @@
<jasypt-spring-boot-starter.version>3.0.4</jasypt-spring-boot-starter.version>
<lombok.version>1.18.20</lombok.version>
<mapstruct.version>1.4.1.Final</mapstruct.version>
<hutool.version>5.6.1</hutool.version>
<easyexcel.verion>2.2.7</easyexcel.verion>
<hutool.version>5.7.22</hutool.version>
<easyexcel.verion>3.1.1</easyexcel.verion>
<velocity.version>2.2</velocity.version>
<screw.version>1.0.5</screw.version>
<fastjson.version>2.0.5</fastjson.version>

View File

@ -132,7 +132,7 @@ public class JsonUtils {
}
public static boolean isJson(String text) {
return JSONUtil.isJson(text);
return JSONUtil.isTypeJSON(text);
}
}

View File

@ -8,7 +8,7 @@ import com.ctrip.framework.apollo.tracer.Tracer;
import com.ctrip.framework.apollo.util.ConfigUtil;
import com.ctrip.framework.apollo.util.factory.DefaultPropertiesFactory;
import com.ctrip.framework.apollo.util.factory.PropertiesFactory;
import com.ctrip.framework.apollo.util.http.HttpUtil;
import com.ctrip.framework.apollo.util.http.DefaultHttpClient;
import com.ctrip.framework.apollo.util.yaml.YamlParser;
import com.google.inject.AbstractModule;
import com.google.inject.Guice;
@ -63,7 +63,7 @@ public class DefaultXInjector implements Injector {
bind(ConfigFactory.class).to(DBConfigFactory.class).in(Singleton.class);
bind(ConfigUtil.class).in(Singleton.class);
bind(HttpUtil.class).in(Singleton.class);
bind(DefaultHttpClient.class).in(Singleton.class);
bind(ConfigServiceLocator.class).in(Singleton.class);
bind(RemoteConfigLongPollService.class).in(Singleton.class);
bind(YamlParser.class).in(Singleton.class);

View File

@ -5,8 +5,9 @@ import cn.iocoder.yudao.framework.dict.core.util.DictFrameworkUtils;
import cn.iocoder.yudao.framework.excel.core.annotations.DictFormat;
import com.alibaba.excel.converters.Converter;
import com.alibaba.excel.enums.CellDataTypeEnum;
import com.alibaba.excel.metadata.CellData;
import com.alibaba.excel.metadata.GlobalConfiguration;
import com.alibaba.excel.metadata.data.ReadCellData;
import com.alibaba.excel.metadata.data.WriteCellData;
import com.alibaba.excel.metadata.property.ExcelContentProperty;
import lombok.extern.slf4j.Slf4j;
@ -29,11 +30,11 @@ public class DictConvert implements Converter<Object> {
}
@Override
public Object convertToJavaData(CellData cellData, ExcelContentProperty contentProperty,
public Object convertToJavaData(ReadCellData readCellData, ExcelContentProperty contentProperty,
GlobalConfiguration globalConfiguration) {
// 使用字典解析
String type = getType(contentProperty);
String label = cellData.getStringValue();
String label = readCellData.getStringValue();
String value = DictFrameworkUtils.parseDictDataValue(type, label);
if (value == null) {
log.error("[convertToJavaData][type({}) 解析不掉 label({})]", type, label);
@ -45,11 +46,11 @@ public class DictConvert implements Converter<Object> {
}
@Override
public CellData<String> convertToExcelData(Object object, ExcelContentProperty contentProperty,
GlobalConfiguration globalConfiguration) {
public WriteCellData<String> convertToExcelData(Object object, ExcelContentProperty contentProperty,
GlobalConfiguration globalConfiguration) {
// 空时,返回空
if (object == null) {
return new CellData<>("");
return new WriteCellData<>("");
}
// 使用字典格式化
@ -58,10 +59,10 @@ public class DictConvert implements Converter<Object> {
String label = DictFrameworkUtils.getDictDataLabel(type, value);
if (label == null) {
log.error("[convertToExcelData][type({}) 转换不了 label({})]", type, value);
return new CellData<>("");
return new WriteCellData<>("");
}
// 生成 Excel 小表格
return new CellData<>(label);
return new WriteCellData<>(label);
}
private static String getType(ExcelContentProperty contentProperty) {

View File

@ -3,8 +3,8 @@ package cn.iocoder.yudao.framework.excel.core.convert;
import cn.iocoder.yudao.framework.common.util.json.JsonUtils;
import com.alibaba.excel.converters.Converter;
import com.alibaba.excel.enums.CellDataTypeEnum;
import com.alibaba.excel.metadata.CellData;
import com.alibaba.excel.metadata.GlobalConfiguration;
import com.alibaba.excel.metadata.data.WriteCellData;
import com.alibaba.excel.metadata.property.ExcelContentProperty;
/**
@ -25,15 +25,10 @@ public class JsonConvert implements Converter<Object> {
}
@Override
public Object convertToJavaData(CellData cellData, ExcelContentProperty contentProperty, GlobalConfiguration globalConfiguration) {
throw new UnsupportedOperationException("暂不支持,也不需要");
}
@Override
public CellData<String> convertToExcelData(Object value, ExcelContentProperty contentProperty,
GlobalConfiguration globalConfiguration) {
public WriteCellData<String> convertToExcelData(Object value, ExcelContentProperty contentProperty,
GlobalConfiguration globalConfiguration) {
// 生成 Excel 小表格
return new CellData<>(JsonUtils.toJsonString(value));
return new WriteCellData<>(JsonUtils.toJsonString(value));
}
}

View File

@ -38,7 +38,7 @@ public class BizTraceAspect {
String operationName = getOperationName(joinPoint, trace);
Span span = tracer.buildSpan(operationName)
.withTag(Tags.COMPONENT.getKey(), "biz")
.startManual();
.start();
try {
// 执行原有方法
return joinPoint.proceed();

View File

@ -40,7 +40,7 @@ public class RandomUtils {
// Integer
PODAM_FACTORY.getStrategy().addOrReplaceTypeManufacturer(Integer.class, (dataProviderStrategy, attributeMetadata, map) -> {
// 如果是 status 的字段,返回 0 或 1
if (attributeMetadata.getAttributeName().equals("status")) {
if ("status".equals(attributeMetadata.getAttributeName())) {
return RandomUtil.randomEle(CommonStatusEnum.values()).getStatus();
}
// 如果是 type、status 结尾的字段,返回 tinyint 范围
@ -53,7 +53,7 @@ public class RandomUtils {
// Boolean
PODAM_FACTORY.getStrategy().addOrReplaceTypeManufacturer(Boolean.class, (dataProviderStrategy, attributeMetadata, map) -> {
// 如果是 deleted 的字段,返回非删除
if (attributeMetadata.getAttributeName().equals("deleted")) {
if ("deleted".equals(attributeMetadata.getAttributeName())) {
return false;
}
return RandomUtil.randomBoolean();

View File

@ -95,7 +95,7 @@ public class YudaoSwaggerAutoConfiguration {
return Collections.singletonList(SecurityContext.builder()
.securityReferences(securityReferences())
// 通过 PathSelectors.regex("^(?!auth).*$"),排除包含 "auth" 的接口不需要使用securitySchemes
.forPaths(PathSelectors.regex("^(?!auth).*$"))
.operationSelector(o -> o.requestMappingPattern().matches("^(?!auth).*$"))
.build());
}

View File

@ -17,6 +17,9 @@ import org.springframework.context.annotation.Import;
import javax.annotation.Resource;
import java.util.Date;
import static cn.iocoder.yudao.framework.common.util.date.DateUtils.buildTime;
import static cn.iocoder.yudao.framework.common.util.object.ObjectUtils.cloneIgnoreId;
import static cn.iocoder.yudao.module.bpm.enums.ErrorCodeConstants.USER_GROUP_NOT_EXISTS;
@ -116,8 +119,7 @@ public class BpmUserGroupServiceTest extends BaseDbUnitTest {
BpmUserGroupPageReqVO reqVO = new BpmUserGroupPageReqVO();
reqVO.setName("源码");
reqVO.setStatus(CommonStatusEnum.ENABLE.getStatus());
reqVO.setBeginCreateTime(DateUtils.buildTime(2021, 11, 10));
reqVO.setEndCreateTime(DateUtils.buildTime(2021, 11, 12));
reqVO.setCreateTime((new Date[]{buildTime(2021, 11, 10),buildTime(2021, 11, 12)}));
// 调用
PageResult<BpmUserGroupDO> pageResult = userGroupService.getUserGroupPage(reqVO);

View File

@ -51,8 +51,7 @@ import static org.mockito.Mockito.*;
#if (${column.listOperation})
#set ($JavaField = $column.javaField.substring(0,1).toUpperCase() + ${column.javaField.substring(1)})##首字母大写
#if (${column.listOperationCondition} == "BETWEEN")## BETWEEN 的情况
reqVO.setBegin${JavaField}(null);
reqVO.setEnd${JavaField}(null);
reqVO.set${JavaField}((new Date[]{}));
#else
reqVO.set$JavaField(null);
#end

View File

@ -30,9 +30,9 @@
<el-date-picker clearable v-model="queryParams.${javaField}" type="date" value-format="yyyy-MM-dd" placeholder="选择${comment}" />
</el-form-item>
#else## 范围
<el-form-item label="${comment}">
<el-date-picker v-model="dateRange${AttrName}" style="width: 240px" value-format="yyyy-MM-dd"
type="daterange" range-separator="-" start-placeholder="开始日期" end-placeholder="结束日期" />
<el-form-item label="${comment}" prop="${javaField}">
<el-date-picker v-model="queryParams.${javaField}" style="width: 240px" value-format="yyyy-MM-dd HH:mm:ss" type="daterange"
range-separator="-" start-placeholder="开始日期" end-placeholder="结束日期" :default-time="['00:00:00', '23:59:59']" />
</el-form-item>
#end
#end
@ -234,6 +234,9 @@ export default {
#foreach ($column in $columns)
#if ($column.listOperation && $column.listOperationCondition != 'BETWEEN')
$column.javaField: null,
#else if ($column.htmlType == "datetime" && $column.listOperationCondition == "BETWEEN")
$column.javaField: [],
#end
#end
#end
},
@ -257,18 +260,8 @@ export default {
/** 查询列表 */
getList() {
this.loading = true;
// 处理查询参数
let params = {...this.queryParams};
#foreach ($column in $columns)
#if ($column.listOperation)
#if ($column.htmlType == "datetime" && $column.listOperationCondition == "BETWEEN")
#set ($AttrName = $column.javaField.substring(0,1).toUpperCase() + ${column.javaField.substring(1)})
this.addBeginAndEndTime(params, this.dateRange${AttrName}, '${column.javaField}');
#end
#end
#end
// 执行查询
get${simpleClassName}Page(params).then(response => {
get${simpleClassName}Page(this.queryParams).then(response => {
this.list = response.data.list;
this.total = response.data.total;
this.loading = false;
@ -301,14 +294,6 @@ export default {
},
/** 重置按钮操作 */
resetQuery() {
#foreach ($column in $columns)
#if ($column.listOperation)
#if ($column.htmlType == "datetime" && $column.listOperationCondition == "BETWEEN")
#set ($AttrName = $column.javaField.substring(0,1).toUpperCase() + ${column.javaField.substring(1)})
this.dateRange${AttrName} = [];
#end
#end
#end
this.resetForm("queryForm");
this.handleQuery();
},
@ -377,15 +362,6 @@ export default {
let params = {...this.queryParams};
params.pageNo = undefined;
params.pageSize = undefined;
#foreach ($column in $columns)
#if ($column.listOperation)
#if ($column.htmlType == "datetime" && $column.listOperationCondition == "BETWEEN")
#set ($AttrName = $column.javaField.substring(0,1).toUpperCase() + ${column.javaField.substring(1)})
this.addBeginAndEndTime(params, this.dateRange${AttrName}, '${column.javaField}');
#end
#end
#end
// 执行导出
this.#[[$modal]]#.confirm('是否确认导出所有${table.classComment}数据项?').then(() => {
this.exportLoading = true;
return export${simpleClassName}Excel(params);

View File

@ -19,6 +19,7 @@ import org.springframework.boot.test.mock.mockito.MockBean;
import org.springframework.context.annotation.Import;
import javax.annotation.Resource;
import java.util.Date;
import java.util.List;
import java.util.function.Consumer;
@ -180,8 +181,7 @@ public class ConfigServiceTest extends BaseDbUnitTest {
reqVO.setName("艿");
reqVO.setKey("nai");
reqVO.setType(ConfigTypeEnum.SYSTEM.getType());
reqVO.setBeginTime(buildTime(2021, 1, 15));
reqVO.setEndTime(buildTime(2021, 2, 15));
reqVO.setCreateTime((new Date[]{buildTime(2021, 1, 15),buildTime(2021, 2, 15)}));
// 调用
PageResult<ConfigDO> pageResult = configService.getConfigPage(reqVO);
@ -214,8 +214,7 @@ public class ConfigServiceTest extends BaseDbUnitTest {
reqVO.setName("艿");
reqVO.setKey("nai");
reqVO.setType(ConfigTypeEnum.SYSTEM.getType());
reqVO.setBeginTime(buildTime(2021, 1, 15));
reqVO.setEndTime(buildTime(2021, 2, 15));
reqVO.setCreateTime((new Date[]{buildTime(2021, 1, 15),buildTime(2021, 2, 15)}));
// 调用
List<ConfigDO> list = configService.getConfigList(reqVO);

View File

@ -22,6 +22,7 @@ import org.springframework.context.annotation.Import;
import javax.annotation.Resource;
import javax.validation.Validator;
import java.io.Serializable;
import java.util.Date;
import java.util.Map;
import static cn.hutool.core.util.RandomUtil.randomEle;
@ -216,8 +217,7 @@ public class FileConfigServiceImplTest extends BaseDbUnitTest {
FileConfigPageReqVO reqVO = new FileConfigPageReqVO();
reqVO.setName("芋道");
reqVO.setStorage(FileStorageEnum.LOCAL.getStorage());
reqVO.setBeginCreateTime(buildTime(2022, 11, 10));
reqVO.setEndCreateTime(buildTime(2022, 11, 12));
reqVO.setCreateTime((new Date[]{buildTime(2022, 11, 10),buildTime(2022, 11, 12)}));
// 调用
PageResult<FileConfigDO> pageResult = fileConfigService.getFileConfigPage(reqVO);

View File

@ -15,6 +15,8 @@ import org.springframework.context.annotation.Import;
import javax.annotation.Resource;
import java.util.Date;
import static cn.iocoder.yudao.framework.common.util.date.DateUtils.buildTime;
import static cn.iocoder.yudao.framework.test.core.util.AssertUtils.assertServiceException;
import static cn.iocoder.yudao.framework.test.core.util.RandomUtils.*;
@ -58,8 +60,7 @@ public class FileServiceTest extends BaseDbUnitTest {
FilePageReqVO reqVO = new FilePageReqVO();
reqVO.setPath("yunai");
reqVO.setType("jp");
reqVO.setBeginCreateTime(buildTime(2021, 1, 10));
reqVO.setEndCreateTime(buildTime(2021, 1, 20));
reqVO.setCreateTime((new Date[]{buildTime(2021, 1, 10),buildTime(2021, 1, 20)}));
// 调用
PageResult<FileDO> pageResult = fileService.getFilePage(reqVO);

View File

@ -77,8 +77,7 @@ public class ApiAccessLogServiceImplTest extends BaseDbUnitTest {
reqVO.setUserType(userType);
reqVO.setApplicationName(applicationName);
reqVO.setRequestUrl(requestUrl);
reqVO.setBeginBeginTime(buildTime(2021, 3, 12));
reqVO.setEndBeginTime(buildTime(2021, 3, 14));
reqVO.setBeginTime((new Date[]{buildTime(2021, 3, 12),buildTime(2021, 3, 14)}));
reqVO.setDuration(duration);
reqVO.setResultCode(resultCode);
@ -135,8 +134,7 @@ public class ApiAccessLogServiceImplTest extends BaseDbUnitTest {
reqVO.setUserType(userType);
reqVO.setApplicationName(applicationName);
reqVO.setRequestUrl(requestUrl);
reqVO.setBeginBeginTime(buildTime(2021, 3, 12));
reqVO.setEndBeginTime(buildTime(2021, 3, 14));
reqVO.setBeginTime((new Date[]{buildTime(2021, 3, 12),buildTime(2021, 3, 14)}));
reqVO.setDuration(duration);
reqVO.setResultCode(resultCode);

View File

@ -77,8 +77,7 @@ public class ApiErrorLogServiceImplTest extends BaseDbUnitTest {
reqVO.setUserType(userType);
reqVO.setApplicationName(applicationName);
reqVO.setRequestUrl(requestUrl);
reqVO.setBeginExceptionTime(buildTime(2021, 3, 12));
reqVO.setEndExceptionTime(buildTime(2021, 3, 14));
reqVO.setExceptionTime((new Date[]{buildTime(2021, 3, 12),buildTime(2021, 3, 14)}));
reqVO.setProcessStatus(progressStatus);
// 调用service方法
@ -130,8 +129,7 @@ public class ApiErrorLogServiceImplTest extends BaseDbUnitTest {
reqVO.setUserType(userType);
reqVO.setApplicationName(applicationName);
reqVO.setRequestUrl(requestUrl);
reqVO.setBeginExceptionTime(buildTime(2021, 3, 12));
reqVO.setEndExceptionTime(buildTime(2021, 3, 14));
reqVO.setExceptionTime((new Date[]{buildTime(2021, 3, 12),buildTime(2021, 3, 14)}));
reqVO.setProcessStatus(progressStatus);
// 调用service方法

View File

@ -14,8 +14,10 @@ import org.junit.jupiter.api.Test;
import org.springframework.context.annotation.Import;
import javax.annotation.Resource;
import java.util.Date;
import java.util.List;
import static cn.iocoder.yudao.framework.common.util.date.DateUtils.buildTime;
import static cn.iocoder.yudao.framework.common.util.object.ObjectUtils.cloneIgnoreId;
import static cn.iocoder.yudao.framework.test.core.util.AssertUtils.assertPojoEquals;
import static cn.iocoder.yudao.framework.test.core.util.AssertUtils.assertServiceException;
@ -132,8 +134,7 @@ public class TestDemoServiceImplTest extends BaseDbUnitTest {
reqVO.setType(1);
reqVO.setCategory(2);
reqVO.setRemark("哈哈哈");
reqVO.setBeginCreateTime(DateUtils.buildTime(2021, 11, 10));
reqVO.setEndCreateTime(DateUtils.buildTime(2021, 11, 12));
reqVO.setCreateTime((new Date[]{buildTime(2021, 11, 10),buildTime(2021, 11, 12)}));
// 调用
PageResult<TestDemoDO> pageResult = testDemoService.getTestDemoPage(reqVO);
@ -174,8 +175,7 @@ public class TestDemoServiceImplTest extends BaseDbUnitTest {
reqVO.setType(1);
reqVO.setCategory(2);
reqVO.setRemark("哈哈哈");
reqVO.setBeginCreateTime(DateUtils.buildTime(2021, 11, 10));
reqVO.setEndCreateTime(DateUtils.buildTime(2021, 11, 12));
reqVO.setCreateTime((new Date[]{buildTime(2021, 11, 10),buildTime(2021, 11, 12)}));
// 调用
List<TestDemoDO> list = testDemoService.getTestDemoList(reqVO);

View File

@ -139,18 +139,13 @@ public class ActivityServiceImplTest extends BaseDbUnitTest {
reqVO.setTitle(null);
reqVO.setActivityType(null);
reqVO.setStatus(null);
reqVO.setBeginStartTime(null);
reqVO.setEndStartTime(null);
reqVO.setBeginEndTime(null);
reqVO.setEndEndTime(null);
reqVO.setBeginInvalidTime(null);
reqVO.setEndInvalidTime(null);
reqVO.setBeginDeleteTime(null);
reqVO.setEndDeleteTime(null);
reqVO.setStartTime(null);
reqVO.setEndTime(null);
reqVO.setInvalidTime(null);
reqVO.setDeleteTime(null);
reqVO.setTimeLimitedDiscount(null);
reqVO.setFullPrivilege(null);
reqVO.setBeginCreateTime(null);
reqVO.setEndCreateTime(null);
reqVO.setCreateTime(null);
// 调用
PageResult<ActivityDO> pageResult = activityService.getActivityPage(reqVO);

View File

@ -127,8 +127,7 @@ public class BrandServiceImplTest extends BaseDbUnitTest {
reqVO.setCategoryId(null);
reqVO.setName(null);
reqVO.setStatus(null);
reqVO.setBeginCreateTime(null);
reqVO.setEndCreateTime(null);
reqVO.setCreateTime((new Date[]{}));
// 调用
PageResult<BrandDO> pageResult = brandService.getBrandPage(reqVO);
@ -162,8 +161,7 @@ public class BrandServiceImplTest extends BaseDbUnitTest {
reqVO.setCategoryId(null);
reqVO.setName(null);
reqVO.setStatus(null);
reqVO.setBeginCreateTime(null);
reqVO.setEndCreateTime(null);
reqVO.setCreateTime((new Date[]{}));
// 调用
List<BrandDO> list = brandService.getBrandList(reqVO);

View File

@ -135,8 +135,7 @@ public class CategoryServiceImplTest extends BaseDbUnitTest {
CategoryPageReqVO reqVO = new CategoryPageReqVO();
reqVO.setName(null);
reqVO.setStatus(null);
reqVO.setBeginCreateTime(null);
reqVO.setEndCreateTime(null);
reqVO.setCreateTime(null);
// 调用
PageResult<CategoryDO> pageResult = categoryService.getCategoryPage(reqVO);
@ -181,8 +180,7 @@ public class CategoryServiceImplTest extends BaseDbUnitTest {
CategoryExportReqVO reqVO = new CategoryExportReqVO();
reqVO.setName(null);
reqVO.setStatus(null);
reqVO.setBeginCreateTime(null);
reqVO.setEndCreateTime(null);
reqVO.setCreateTime(null);
// 调用
List<CategoryDO> list = categoryService.getCategoryList(reqVO);

View File

@ -147,8 +147,7 @@ public class SkuServiceImplTest extends BaseDbUnitTest {
reqVO.setBarCode(null);
reqVO.setPicUrl(null);
reqVO.setStatus(null);
reqVO.setBeginCreateTime(null);
reqVO.setEndCreateTime(null);
reqVO.setCreateTime(null);
// 调用
PageResult<ProductSkuDO> pageResult = ProductSkuService.getSkuPage(reqVO);
@ -202,8 +201,7 @@ public class SkuServiceImplTest extends BaseDbUnitTest {
reqVO.setBarCode(null);
reqVO.setPicUrl(null);
reqVO.setStatus(null);
reqVO.setBeginCreateTime(null);
reqVO.setEndCreateTime(null);
reqVO.setCreateTime(null);
// 调用
List<ProductSkuDO> list = ProductSkuService.getSkuList(reqVO);

View File

@ -155,8 +155,7 @@ public class ProductSpuServiceImplTest extends BaseDbUnitTest {
reqVO.setPrice(null);
reqVO.setQuantity(null);
reqVO.setStatus(null);
reqVO.setBeginCreateTime(null);
reqVO.setEndCreateTime(null);
reqVO.setCreateTime(null);
// 调用
PageResult<SpuRespVO> pageResult = spuService.getSpuPage(reqVO);
@ -218,8 +217,7 @@ public class ProductSpuServiceImplTest extends BaseDbUnitTest {
reqVO.setPrice(null);
reqVO.setQuantity(null);
reqVO.setStatus(null);
reqVO.setBeginCreateTime(null);
reqVO.setEndCreateTime(null);
reqVO.setCreateTime(null);
// 调用
List<ProductSpuDO> list = spuService.getSpuList(reqVO);

View File

@ -19,6 +19,7 @@ import org.springframework.context.annotation.Import;
import javax.annotation.Resource;
import java.util.Collections;
import java.util.Date;
import java.util.List;
import static cn.iocoder.yudao.framework.common.util.date.DateUtils.buildTime;
@ -162,8 +163,7 @@ public class PayAppServiceTest extends BaseDbUnitTest {
reqVO.setPayNotifyUrl("https://www.hc.com");
reqVO.setRefundNotifyUrl("https://www.xm.com");
reqVO.setMerchantName(dbMerchant.getName());
reqVO.setBeginCreateTime(buildTime(2021,11,19));
reqVO.setEndCreateTime(buildTime(2021,11,21));
reqVO.setCreateTime((new Date[]{buildTime(2021,11,19),buildTime(2021,11,21)}));
// 调用
PageResult<PayAppDO> pageResult = appService.getAppPage(reqVO);
@ -226,8 +226,7 @@ public class PayAppServiceTest extends BaseDbUnitTest {
reqVO.setPayNotifyUrl("https://www.hc.com");
reqVO.setRefundNotifyUrl("https://www.xm.com");
reqVO.setMerchantName(dbMerchant.getName());
reqVO.setBeginCreateTime(buildTime(2021,11,19));
reqVO.setEndCreateTime(buildTime(2021,11,21));
reqVO.setCreateTime((new Date[]{buildTime(2021,11,19),buildTime(2021,11,21)}));
// 调用
List<PayAppDO> list = appService.getAppList(reqVO);

View File

@ -20,6 +20,7 @@ import org.springframework.context.annotation.Import;
import javax.annotation.Resource;
import javax.validation.Validator;
import java.util.Date;
import java.util.List;
import static cn.iocoder.yudao.framework.common.util.date.DateUtils.buildTime;
@ -263,8 +264,7 @@ public class PayChannelServiceTest extends BaseDbUnitTest {
reqVO.setMerchantId(1L);
reqVO.setAppId(1L);
reqVO.setConfig(JSON.toJSONString(payClientConfig));
reqVO.setBeginCreateTime(buildTime(2021,11,19));
reqVO.setEndCreateTime(buildTime(2021,11,21));
reqVO.setCreateTime((new Date[]{buildTime(2021,11,19),buildTime(2021,11,21)}));
// 调用
PageResult<PayChannelDO> pageResult = channelService.getChannelPage(reqVO);
@ -337,8 +337,7 @@ public class PayChannelServiceTest extends BaseDbUnitTest {
reqVO.setMerchantId(1L);
reqVO.setAppId(1L);
reqVO.setConfig(JSON.toJSONString(payClientConfig));
reqVO.setBeginCreateTime(buildTime(2021,11,19));
reqVO.setEndCreateTime(buildTime(2021,11,21));
reqVO.setCreateTime((new Date[]{buildTime(2021,11,19),buildTime(2021,11,21)}));
// 调用
List<PayChannelDO> list = channelService.getChannelList(reqVO);

View File

@ -14,6 +14,7 @@ import org.junit.jupiter.api.Test;
import org.springframework.context.annotation.Import;
import javax.annotation.Resource;
import java.util.Date;
import java.util.List;
import static cn.iocoder.yudao.framework.common.util.date.DateUtils.buildTime;
@ -137,8 +138,7 @@ public class PayMerchantServiceTest extends BaseDbUnitTest {
reqVO.setShortName("灿灿子");
reqVO.setStatus(CommonStatusEnum.ENABLE.getStatus());
reqVO.setRemark("灿哥的杂货铺");
reqVO.setBeginCreateTime(buildTime(2021,11,2));
reqVO.setEndCreateTime(buildTime(2021,11,4));
reqVO.setCreateTime((new Date[]{buildTime(2021,11,2),buildTime(2021,11,4)}));
// 调用
PageResult<PayMerchantDO> pageResult = merchantService.getMerchantPage(reqVO);
@ -179,8 +179,7 @@ public class PayMerchantServiceTest extends BaseDbUnitTest {
reqVO.setShortName("灿灿子");
reqVO.setStatus(CommonStatusEnum.ENABLE.getStatus());
reqVO.setRemark("灿哥的杂货铺");
reqVO.setBeginCreateTime(buildTime(2021,11,2));
reqVO.setEndCreateTime(buildTime(2021,11,4));
reqVO.setCreateTime((new Date[]{buildTime(2021,11,2),buildTime(2021,11,4)}));
// 调用
List<PayMerchantDO> list = merchantService.getMerchantList(reqVO);

View File

@ -26,6 +26,7 @@ import javax.annotation.Resource;
import java.util.Date;
import java.util.List;
import static cn.iocoder.yudao.framework.common.util.date.DateUtils.buildTime;
import static cn.iocoder.yudao.framework.common.util.object.ObjectUtils.cloneIgnoreId;
import static cn.iocoder.yudao.framework.test.core.util.AssertUtils.assertPojoEquals;
import static cn.iocoder.yudao.framework.test.core.util.RandomUtils.randomPojo;
@ -124,9 +125,7 @@ public class PayOrderServiceTest extends BaseDbUnitTest {
reqVO.setNotifyStatus(PayOrderNotifyStatusEnum.SUCCESS.getStatus());
reqVO.setStatus(PayOrderStatusEnum.SUCCESS.getStatus());
reqVO.setRefundStatus(PayRefundTypeEnum.NO.getStatus());
reqVO.setBeginCreateTime(DateUtils.buildTime(2018, 1, 1, 10, 1, 0));
reqVO.setEndCreateTime(DateUtils.buildTime(2018, 1, 1, 10, 1, 0));
reqVO.setCreateTime((new Date[]{buildTime(2018, 1, 1, 10, 1, 0),buildTime(2018, 1, 1, 10, 1, 0)}));
// 调用
PageResult<PayOrderDO> pageResult = orderService.getOrderPage(reqVO);
// 断言
@ -199,8 +198,7 @@ public class PayOrderServiceTest extends BaseDbUnitTest {
reqVO.setNotifyStatus(PayOrderNotifyStatusEnum.SUCCESS.getStatus());
reqVO.setStatus(PayOrderStatusEnum.SUCCESS.getStatus());
reqVO.setRefundStatus(PayRefundTypeEnum.NO.getStatus());
reqVO.setBeginCreateTime(DateUtils.buildTime(2018, 1, 1, 10, 1, 0));
reqVO.setEndCreateTime(DateUtils.buildTime(2018, 1, 1, 10, 1, 0));
reqVO.setCreateTime((new Date[]{buildTime(2018, 1, 1, 10, 1, 0),buildTime(2018, 1, 1, 10, 1, 0)}));
// 调用
List<PayOrderDO> list = orderService.getOrderList(reqVO);

View File

@ -22,8 +22,10 @@ import org.springframework.boot.test.mock.mockito.MockBean;
import org.springframework.context.annotation.Import;
import javax.annotation.Resource;
import java.util.Date;
import java.util.List;
import static cn.iocoder.yudao.framework.common.util.date.DateUtils.buildTime;
import static cn.iocoder.yudao.framework.common.util.object.ObjectUtils.cloneIgnoreId;
import static cn.iocoder.yudao.framework.test.core.util.AssertUtils.assertPojoEquals;
import static cn.iocoder.yudao.framework.test.core.util.RandomUtils.randomPojo;
@ -110,9 +112,7 @@ public class PayRefundServiceTest extends BaseDbUnitTest {
reqVO.setNotifyStatus(PayOrderNotifyStatusEnum.SUCCESS.getStatus());
reqVO.setStatus(PayRefundStatusEnum.SUCCESS.getStatus());
reqVO.setType(PayRefundTypeEnum.SOME.getStatus());
reqVO.setBeginCreateTime(DateUtils.buildTime(2021, 1, 1, 10, 10, 10));
reqVO.setEndCreateTime(DateUtils.buildTime(2021, 1, 1, 10, 10, 12));
reqVO.setCreateTime((new Date[]{buildTime(2021, 1, 1, 10, 10, 10),buildTime(2021, 1, 1, 10, 10, 12)}));
// 调用
PageResult<PayRefundDO> pageResult = refundService.getRefundPage(reqVO);
@ -182,8 +182,7 @@ public class PayRefundServiceTest extends BaseDbUnitTest {
reqVO.setNotifyStatus(PayOrderNotifyStatusEnum.SUCCESS.getStatus());
reqVO.setStatus(PayRefundStatusEnum.SUCCESS.getStatus());
reqVO.setType(PayRefundTypeEnum.SOME.getStatus());
reqVO.setBeginCreateTime(DateUtils.buildTime(2021, 1, 1, 10, 10, 10));
reqVO.setEndCreateTime(DateUtils.buildTime(2021, 1, 1, 10, 10, 12));
reqVO.setCreateTime((new Date[]{buildTime(2021, 1, 1, 10, 10, 10),buildTime(2021, 1, 1, 10, 10, 12)}));
// 调用
List<PayRefundDO> list = refundService.getRefundList(reqVO);

View File

@ -16,6 +16,7 @@ import org.springframework.boot.test.mock.mockito.MockBean;
import org.springframework.context.annotation.Import;
import javax.annotation.Resource;
import java.util.Date;
import java.util.List;
import java.util.function.Consumer;
@ -63,8 +64,7 @@ public class DictTypeServiceTest extends BaseDbUnitTest {
reqVO.setName("nai");
reqVO.setType("艿");
reqVO.setStatus(CommonStatusEnum.ENABLE.getStatus());
reqVO.setBeginCreateTime(buildTime(2021, 1, 10));
reqVO.setEndCreateTime(buildTime(2021, 1, 20));
reqVO.setCreateTime((new Date[]{buildTime(2021, 1, 10),buildTime(2021, 1, 20)}));
// 调用
PageResult<DictTypeDO> pageResult = dictTypeService.getDictTypePage(reqVO);
@ -97,8 +97,7 @@ public class DictTypeServiceTest extends BaseDbUnitTest {
reqVO.setName("nai");
reqVO.setType("艿");
reqVO.setStatus(CommonStatusEnum.ENABLE.getStatus());
reqVO.setBeginCreateTime(buildTime(2021, 1, 10));
reqVO.setEndCreateTime(buildTime(2021, 1, 20));
reqVO.setCreateTime((new Date[]{buildTime(2021, 1, 10),buildTime(2021, 1, 20)}));
// 调用
List<DictTypeDO> list = dictTypeService.getDictTypeList(reqVO);

View File

@ -17,6 +17,7 @@ import org.junit.jupiter.api.Test;
import org.springframework.context.annotation.Import;
import javax.annotation.Resource;
import java.util.Date;
import java.util.List;
import java.util.function.Consumer;
@ -95,8 +96,7 @@ public class ErrorCodeServiceTest extends BaseDbUnitTest {
reqVO.setApplicationName("tu");
reqVO.setCode(1);
reqVO.setMessage("ma");
reqVO.setBeginCreateTime(buildTime(2020, 11, 1));
reqVO.setEndCreateTime(buildTime(2020, 11, 30));
reqVO.setCreateTime((new Date[]{buildTime(2020, 11, 1),buildTime(2020, 11, 30)}));
// 调用
PageResult<ErrorCodeDO> pageResult = errorCodeService.getErrorCodePage(reqVO);
@ -141,8 +141,7 @@ public class ErrorCodeServiceTest extends BaseDbUnitTest {
reqVO.setApplicationName("tu");
reqVO.setCode(1);
reqVO.setMessage("ma");
reqVO.setBeginCreateTime(buildTime(2020, 11, 1));
reqVO.setEndCreateTime(buildTime(2020, 11, 30));
reqVO.setCreateTime((new Date[]{buildTime(2020, 11, 1),buildTime(2020, 11, 30)}));
// 调用
List<ErrorCodeDO> list = errorCodeService.getErrorCodeList(reqVO);

View File

@ -18,6 +18,7 @@ import org.junit.jupiter.api.Test;
import org.springframework.context.annotation.Import;
import javax.annotation.Resource;
import java.util.Date;
import java.util.List;
import static cn.hutool.core.util.RandomUtil.randomEle;
@ -66,8 +67,7 @@ public class LoginLogServiceImplTest extends BaseDbUnitTest {
reqVO.setUsername("wangkai");
reqVO.setUserIp("192.168.199");
reqVO.setStatus(true);
reqVO.setBeginTime(buildTime(2021, 3, 5));
reqVO.setEndTime(buildTime(2021, 3, 7));
reqVO.setCreateTime((new Date[]{buildTime(2021, 3, 5),buildTime(2021, 3, 5)}));
// 调用service方法
PageResult<LoginLogDO> pageResult = loginLogService.getLoginLogPage(reqVO);
@ -105,15 +105,12 @@ public class LoginLogServiceImplTest extends BaseDbUnitTest {
// 构造一个早期时间 2021-02-06 00:00:00
loginLogMapper.insert(ObjectUtils.cloneIgnoreId(loginLogDO, logDO -> logDO.setCreateTime(buildTime(2021, 2, 6))));
// 构造调用参数
LoginLogExportReqVO reqVO = new LoginLogExportReqVO();
reqVO.setUsername("wangxiaokai");
reqVO.setUserIp("192.168.111");
reqVO.setStatus(true);
reqVO.setBeginTime(buildTime(2021, 3, 5));
reqVO.setEndTime(buildTime(2021, 3, 7));
reqVO.setCreateTime((new Date[]{buildTime(2021, 3, 5),buildTime(2021, 3, 5)}));
// 调用service方法
List<LoginLogDO> loginLogList = loginLogService.getLoginLogList(reqVO);

View File

@ -24,6 +24,7 @@ import org.springframework.context.annotation.Import;
import javax.annotation.Resource;
import java.util.Collections;
import java.util.Date;
import java.util.List;
import static cn.hutool.core.util.RandomUtil.randomEle;
@ -103,8 +104,7 @@ public class OperateLogServiceImplTest extends BaseDbUnitTest {
reqVO.setUserNickname("wangkai");
reqVO.setModule("order");
reqVO.setType(OperateTypeEnum.CREATE.getType());
reqVO.setBeginTime(buildTime(2021, 3, 5));
reqVO.setEndTime(buildTime(2021, 3, 7));
reqVO.setStartTime((new Date[]{buildTime(2021, 3, 5),buildTime(2021, 3, 7)}));
reqVO.setSuccess(true);
// 调用service方法
@ -155,8 +155,7 @@ public class OperateLogServiceImplTest extends BaseDbUnitTest {
reqVO.setUserNickname("wangkai");
reqVO.setModule("order");
reqVO.setType(OperateTypeEnum.CREATE.getType());
reqVO.setBeginTime(buildTime(2021, 3, 5));
reqVO.setEndTime(buildTime(2021, 3, 7));
reqVO.setStartTime((new Date[]{buildTime(2021, 3, 5),buildTime(2021, 3, 7)}));
reqVO.setSuccess(true);
// 调用 service 方法

View File

@ -22,6 +22,7 @@ import javax.annotation.Resource;
import java.util.*;
import java.util.stream.Collectors;
import static cn.iocoder.yudao.framework.common.util.date.DateUtils.buildTime;
import static cn.iocoder.yudao.framework.common.util.object.ObjectUtils.cloneIgnoreId;
import static cn.iocoder.yudao.framework.common.util.object.ObjectUtils.max;
import static cn.iocoder.yudao.framework.test.core.util.AssertUtils.assertPojoEquals;
@ -178,8 +179,7 @@ public class RoleServiceTest extends BaseDbUnitTest {
reqVO.setName("土豆");
reqVO.setCode("tu");
reqVO.setStatus(CommonStatusEnum.ENABLE.getStatus());
reqVO.setBeginTime(DateUtils.buildTime(2022, 2, 1));
reqVO.setEndTime(DateUtils.buildTime(2022, 2, 12));
reqVO.setCreateTime((new Date[]{buildTime(2022, 2, 1),buildTime(2022, 2, 12)}));
// 调用
List<RoleDO> list = roleService.getRoleList(reqVO);
@ -209,8 +209,7 @@ public class RoleServiceTest extends BaseDbUnitTest {
reqVO.setName("土豆");
reqVO.setCode("tu");
reqVO.setStatus(CommonStatusEnum.ENABLE.getStatus());
reqVO.setBeginTime(DateUtils.buildTime(2022, 2, 1));
reqVO.setEndTime(DateUtils.buildTime(2022, 2, 12));
reqVO.setCreateTime((new Date[]{buildTime(2022, 2, 1),buildTime(2022, 2, 12)}));
// 调用
PageResult<RoleDO> pageResult = roleService.getRolePage(reqVO);

View File

@ -18,8 +18,10 @@ import org.springframework.context.annotation.Import;
import javax.annotation.Resource;
import java.util.Arrays;
import java.util.Date;
import java.util.List;
import static cn.iocoder.yudao.framework.common.util.date.DateUtils.buildTime;
import static cn.iocoder.yudao.framework.common.util.object.ObjectUtils.cloneIgnoreId;
import static cn.iocoder.yudao.framework.common.util.object.ObjectUtils.max;
import static cn.iocoder.yudao.framework.test.core.util.AssertUtils.assertPojoEquals;
@ -157,8 +159,7 @@ public class SensitiveWordServiceImplTest extends BaseDbUnitTest {
reqVO.setName("笨");
reqVO.setTag("论坛");
reqVO.setStatus(CommonStatusEnum.ENABLE.getStatus());
reqVO.setBeginCreateTime(DateUtils.buildTime(2022, 2, 1));
reqVO.setEndCreateTime(DateUtils.buildTime(2022, 2, 12));
reqVO.setCreateTime((new Date[]{buildTime(2022, 2, 1),buildTime(2022, 2, 12)}));
// 调用
PageResult<SensitiveWordDO> pageResult = sensitiveWordService.getSensitiveWordPage(reqVO);
@ -189,8 +190,7 @@ public class SensitiveWordServiceImplTest extends BaseDbUnitTest {
reqVO.setName("笨");
reqVO.setTag("论坛");
reqVO.setStatus(CommonStatusEnum.ENABLE.getStatus());
reqVO.setBeginCreateTime(DateUtils.buildTime(2022, 2, 1));
reqVO.setEndCreateTime(DateUtils.buildTime(2022, 2, 12));
reqVO.setCreateTime((new Date[]{buildTime(2022, 2, 1),buildTime(2022, 2, 12)}));
// 调用
List<SensitiveWordDO> list = sensitiveWordService.getSensitiveWordList(reqVO);

View File

@ -172,8 +172,7 @@ public class SmsChannelServiceTest extends BaseDbUnitTest {
SmsChannelPageReqVO reqVO = new SmsChannelPageReqVO();
reqVO.setSignature("芋道");
reqVO.setStatus(CommonStatusEnum.ENABLE.getStatus());
reqVO.setBeginCreateTime(buildTime(2020, 12, 1));
reqVO.setEndCreateTime(buildTime(2020, 12, 24));
reqVO.setCreateTime((new Date[]{buildTime(2020, 12, 1),buildTime(2020, 12, 24)}));
// 调用
PageResult<SmsChannelDO> pageResult = smsChannelService.getSmsChannelPage(reqVO);

View File

@ -74,11 +74,9 @@ public class SmsLogServiceTest extends BaseDbUnitTest {
reqVO.setTemplateId(10L);
reqVO.setMobile("156");
reqVO.setSendStatus(SmsSendStatusEnum.INIT.getStatus());
reqVO.setBeginSendTime(buildTime(2020, 11, 1));
reqVO.setEndSendTime(buildTime(2020, 11, 30));
reqVO.setSendTime((new Date[]{buildTime(2020, 11, 1),buildTime(2020, 11, 30)}));
reqVO.setReceiveStatus(SmsReceiveStatusEnum.INIT.getStatus());
reqVO.setBeginReceiveTime(buildTime(2021, 11, 1));
reqVO.setEndReceiveTime(buildTime(2021, 11, 30));
reqVO.setReceiveTime((new Date[]{buildTime(2021, 11, 1),buildTime(2021, 11, 30)}));
// 调用
PageResult<SmsLogDO> pageResult = smsLogService.getSmsLogPage(reqVO);
@ -121,11 +119,9 @@ public class SmsLogServiceTest extends BaseDbUnitTest {
reqVO.setTemplateId(10L);
reqVO.setMobile("156");
reqVO.setSendStatus(SmsSendStatusEnum.INIT.getStatus());
reqVO.setBeginSendTime(buildTime(2020, 11, 1));
reqVO.setEndSendTime(buildTime(2020, 11, 30));
reqVO.setSendTime((new Date[]{buildTime(2020, 11, 1),buildTime(2020, 11, 30)}));
reqVO.setReceiveStatus(SmsReceiveStatusEnum.INIT.getStatus());
reqVO.setBeginReceiveTime(buildTime(2021, 11, 1));
reqVO.setEndReceiveTime(buildTime(2021, 11, 30));
reqVO.setReceiveTime((new Date[]{buildTime(2021, 11, 1),buildTime(2021, 11, 30)}));
// 调用
List<SmsLogDO> list = smsLogService.getSmsLogList(reqVO);

View File

@ -230,8 +230,7 @@ public class SmsTemplateServiceTest extends BaseDbUnitTest {
reqVO.setContent("芋道");
reqVO.setApiTemplateId("yu");
reqVO.setChannelId(1L);
reqVO.setBeginCreateTime(buildTime(2021, 11, 1));
reqVO.setEndCreateTime(buildTime(2021, 12, 1));
reqVO.setCreateTime((new Date[]{buildTime(2021, 11, 1),buildTime(2021, 12, 1)}));
// 调用
PageResult<SmsTemplateDO> pageResult = smsTemplateService.getSmsTemplatePage(reqVO);
@ -276,8 +275,7 @@ public class SmsTemplateServiceTest extends BaseDbUnitTest {
reqVO.setContent("芋道");
reqVO.setApiTemplateId("yu");
reqVO.setChannelId(1L);
reqVO.setBeginCreateTime(buildTime(2021, 11, 1));
reqVO.setEndCreateTime(buildTime(2021, 12, 1));
reqVO.setCreateTime((new Date[]{buildTime(2021, 11, 1),buildTime(2021, 12, 1)}));
// 调用
List<SmsTemplateDO> list = smsTemplateService.getSmsTemplateList(reqVO);

View File

@ -15,6 +15,8 @@ import org.springframework.context.annotation.Import;
import javax.annotation.Resource;
import java.util.Date;
import static cn.iocoder.yudao.framework.common.util.date.DateUtils.buildTime;
import static cn.iocoder.yudao.framework.common.util.object.ObjectUtils.cloneIgnoreId;
import static cn.iocoder.yudao.framework.test.core.util.AssertUtils.assertPojoEquals;
@ -156,8 +158,7 @@ public class TenantPackageServiceImplTest extends BaseDbUnitTest {
reqVO.setName("芋道");
reqVO.setStatus(CommonStatusEnum.ENABLE.getStatus());
reqVO.setRemark("源码");
reqVO.setBeginCreateTime(buildTime(2022, 10, 9));
reqVO.setEndCreateTime(buildTime(2022, 10, 11));
reqVO.setCreateTime((new Date[]{buildTime(2022, 10, 9),buildTime(2022, 10, 11)}));
// 调用
PageResult<TenantPackageDO> pageResult = tenantPackageService.getTenantPackagePage(reqVO);

View File

@ -31,6 +31,7 @@ import javax.annotation.Resource;
import java.time.Duration;
import java.util.Arrays;
import java.util.Collections;
import java.util.Date;
import java.util.List;
import static cn.iocoder.yudao.framework.common.util.collection.SetUtils.asSet;
@ -311,8 +312,7 @@ public class TenantServiceImplTest extends BaseDbUnitTest {
reqVO.setContactName("艿");
reqVO.setContactMobile("1560");
reqVO.setStatus(CommonStatusEnum.ENABLE.getStatus());
reqVO.setBeginCreateTime(buildTime(2020, 12, 1));
reqVO.setEndCreateTime(buildTime(2020, 12, 24));
reqVO.setCreateTime(new Date[]{buildTime(2020, 12, 1),buildTime(2020, 12, 24)});
// 调用
PageResult<TenantDO> pageResult = tenantService.getTenantPage(reqVO);
@ -349,8 +349,7 @@ public class TenantServiceImplTest extends BaseDbUnitTest {
reqVO.setContactName("艿");
reqVO.setContactMobile("1560");
reqVO.setStatus(CommonStatusEnum.ENABLE.getStatus());
reqVO.setBeginCreateTime(buildTime(2020, 12, 1));
reqVO.setEndCreateTime(buildTime(2020, 12, 24));
reqVO.setCreateTime(new Date[]{buildTime(2020, 12, 1),buildTime(2020, 12, 24)});
// 调用
List<TenantDO> list = tenantService.getTenantList(reqVO);

View File

@ -33,6 +33,7 @@ import org.springframework.security.crypto.password.PasswordEncoder;
import javax.annotation.Resource;
import java.io.ByteArrayInputStream;
import java.util.Collection;
import java.util.Date;
import java.util.List;
import java.util.function.Consumer;
@ -294,8 +295,7 @@ public class AdminUserServiceImplTest extends BaseDbUnitTest {
reqVO.setUsername("tu");
reqVO.setMobile("1560");
reqVO.setStatus(CommonStatusEnum.ENABLE.getStatus());
reqVO.setBeginTime(buildTime(2020, 12, 1));
reqVO.setEndTime(buildTime(2020, 12, 24));
reqVO.setCreateTime((new Date[]{buildTime(2020, 12, 1),buildTime(2020, 12, 24)}));
reqVO.setDeptId(1L); // 其中1L 是 2L 的父部门
// mock 方法
List<DeptDO> deptList = newArrayList(randomPojo(DeptDO.class, o -> o.setId(2L)));
@ -318,8 +318,7 @@ public class AdminUserServiceImplTest extends BaseDbUnitTest {
reqVO.setUsername("tu");
reqVO.setMobile("1560");
reqVO.setStatus(CommonStatusEnum.ENABLE.getStatus());
reqVO.setBeginTime(buildTime(2020, 12, 1));
reqVO.setEndTime(buildTime(2020, 12, 24));
reqVO.setCreateTime((new Date[]{buildTime(2020, 12, 1),buildTime(2020, 12, 24)}));
reqVO.setDeptId(1L); // 其中1L 是 2L 的父部门
// mock 方法
List<DeptDO> deptList = newArrayList(randomPojo(DeptDO.class, o -> o.setId(2L)));