Commit f84f3a363171315c84b0e6221977e04becb9da68
1 parent
dad10d85
refactor: 时间区间查询传入数组-测试模块
Showing
31 changed files
with
92 additions
and
153 deletions
yudao-module-bpm/yudao-module-bpm-biz/src/test/java/cn/iocoder/yudao/module/bpm/service/definition/BpmUserGroupServiceTest.java
| @@ -17,6 +17,9 @@ import org.springframework.context.annotation.Import; | @@ -17,6 +17,9 @@ import org.springframework.context.annotation.Import; | ||
| 17 | 17 | ||
| 18 | import javax.annotation.Resource; | 18 | import javax.annotation.Resource; |
| 19 | 19 | ||
| 20 | +import java.util.Date; | ||
| 21 | + | ||
| 22 | +import static cn.iocoder.yudao.framework.common.util.date.DateUtils.buildTime; | ||
| 20 | import static cn.iocoder.yudao.framework.common.util.object.ObjectUtils.cloneIgnoreId; | 23 | import static cn.iocoder.yudao.framework.common.util.object.ObjectUtils.cloneIgnoreId; |
| 21 | import static cn.iocoder.yudao.module.bpm.enums.ErrorCodeConstants.USER_GROUP_NOT_EXISTS; | 24 | import static cn.iocoder.yudao.module.bpm.enums.ErrorCodeConstants.USER_GROUP_NOT_EXISTS; |
| 22 | 25 | ||
| @@ -116,8 +119,7 @@ public class BpmUserGroupServiceTest extends BaseDbUnitTest { | @@ -116,8 +119,7 @@ public class BpmUserGroupServiceTest extends BaseDbUnitTest { | ||
| 116 | BpmUserGroupPageReqVO reqVO = new BpmUserGroupPageReqVO(); | 119 | BpmUserGroupPageReqVO reqVO = new BpmUserGroupPageReqVO(); |
| 117 | reqVO.setName("源码"); | 120 | reqVO.setName("源码"); |
| 118 | reqVO.setStatus(CommonStatusEnum.ENABLE.getStatus()); | 121 | reqVO.setStatus(CommonStatusEnum.ENABLE.getStatus()); |
| 119 | - reqVO.setBeginCreateTime(DateUtils.buildTime(2021, 11, 10)); | ||
| 120 | - reqVO.setEndCreateTime(DateUtils.buildTime(2021, 11, 12)); | 122 | + reqVO.setCreateTime((new Date[]{buildTime(2021, 11, 10),buildTime(2021, 11, 12)})); |
| 121 | 123 | ||
| 122 | // 调用 | 124 | // 调用 |
| 123 | PageResult<BpmUserGroupDO> pageResult = userGroupService.getUserGroupPage(reqVO); | 125 | PageResult<BpmUserGroupDO> pageResult = userGroupService.getUserGroupPage(reqVO); |
yudao-module-infra/yudao-module-infra-biz/src/main/resources/codegen/java/test/serviceTest.vm
| @@ -51,8 +51,7 @@ import static org.mockito.Mockito.*; | @@ -51,8 +51,7 @@ import static org.mockito.Mockito.*; | ||
| 51 | #if (${column.listOperation}) | 51 | #if (${column.listOperation}) |
| 52 | #set ($JavaField = $column.javaField.substring(0,1).toUpperCase() + ${column.javaField.substring(1)})##首字母大写 | 52 | #set ($JavaField = $column.javaField.substring(0,1).toUpperCase() + ${column.javaField.substring(1)})##首字母大写 |
| 53 | #if (${column.listOperationCondition} == "BETWEEN")## BETWEEN 的情况 | 53 | #if (${column.listOperationCondition} == "BETWEEN")## BETWEEN 的情况 |
| 54 | - reqVO.setBegin${JavaField}(null); | ||
| 55 | - reqVO.setEnd${JavaField}(null); | 54 | + reqVO.set${JavaField}((new Date[]{})); |
| 56 | #else | 55 | #else |
| 57 | reqVO.set$JavaField(null); | 56 | reqVO.set$JavaField(null); |
| 58 | #end | 57 | #end |
yudao-module-infra/yudao-module-infra-biz/src/main/resources/codegen/vue/views/index.vue.vm
| @@ -30,9 +30,9 @@ | @@ -30,9 +30,9 @@ | ||
| 30 | <el-date-picker clearable v-model="queryParams.${javaField}" type="date" value-format="yyyy-MM-dd" placeholder="选择${comment}" /> | 30 | <el-date-picker clearable v-model="queryParams.${javaField}" type="date" value-format="yyyy-MM-dd" placeholder="选择${comment}" /> |
| 31 | </el-form-item> | 31 | </el-form-item> |
| 32 | #else## 范围 | 32 | #else## 范围 |
| 33 | - <el-form-item label="${comment}"> | ||
| 34 | - <el-date-picker v-model="dateRange${AttrName}" style="width: 240px" value-format="yyyy-MM-dd" | ||
| 35 | - type="daterange" range-separator="-" start-placeholder="开始日期" end-placeholder="结束日期" /> | 33 | + <el-form-item label="${comment}" prop="${javaField}"> |
| 34 | + <el-date-picker v-model="queryParams.${javaField}" style="width: 240px" value-format="yyyy-MM-dd HH:mm:ss" type="daterange" | ||
| 35 | + range-separator="-" start-placeholder="开始日期" end-placeholder="结束日期" :default-time="['00:00:00', '23:59:59']" /> | ||
| 36 | </el-form-item> | 36 | </el-form-item> |
| 37 | #end | 37 | #end |
| 38 | #end | 38 | #end |
| @@ -234,6 +234,9 @@ export default { | @@ -234,6 +234,9 @@ export default { | ||
| 234 | #foreach ($column in $columns) | 234 | #foreach ($column in $columns) |
| 235 | #if ($column.listOperation && $column.listOperationCondition != 'BETWEEN') | 235 | #if ($column.listOperation && $column.listOperationCondition != 'BETWEEN') |
| 236 | $column.javaField: null, | 236 | $column.javaField: null, |
| 237 | + #else if ($column.htmlType == "datetime" && $column.listOperationCondition == "BETWEEN") | ||
| 238 | + $column.javaField: [], | ||
| 239 | + #end | ||
| 237 | #end | 240 | #end |
| 238 | #end | 241 | #end |
| 239 | }, | 242 | }, |
| @@ -257,18 +260,8 @@ export default { | @@ -257,18 +260,8 @@ export default { | ||
| 257 | /** 查询列表 */ | 260 | /** 查询列表 */ |
| 258 | getList() { | 261 | getList() { |
| 259 | this.loading = true; | 262 | this.loading = true; |
| 260 | - // 处理查询参数 | ||
| 261 | - let params = {...this.queryParams}; | ||
| 262 | - #foreach ($column in $columns) | ||
| 263 | - #if ($column.listOperation) | ||
| 264 | - #if ($column.htmlType == "datetime" && $column.listOperationCondition == "BETWEEN") | ||
| 265 | - #set ($AttrName = $column.javaField.substring(0,1).toUpperCase() + ${column.javaField.substring(1)}) | ||
| 266 | - this.addBeginAndEndTime(params, this.dateRange${AttrName}, '${column.javaField}'); | ||
| 267 | - #end | ||
| 268 | - #end | ||
| 269 | - #end | ||
| 270 | // 执行查询 | 263 | // 执行查询 |
| 271 | - get${simpleClassName}Page(params).then(response => { | 264 | + get${simpleClassName}Page(this.queryParams).then(response => { |
| 272 | this.list = response.data.list; | 265 | this.list = response.data.list; |
| 273 | this.total = response.data.total; | 266 | this.total = response.data.total; |
| 274 | this.loading = false; | 267 | this.loading = false; |
| @@ -301,14 +294,6 @@ export default { | @@ -301,14 +294,6 @@ export default { | ||
| 301 | }, | 294 | }, |
| 302 | /** 重置按钮操作 */ | 295 | /** 重置按钮操作 */ |
| 303 | resetQuery() { | 296 | resetQuery() { |
| 304 | - #foreach ($column in $columns) | ||
| 305 | - #if ($column.listOperation) | ||
| 306 | - #if ($column.htmlType == "datetime" && $column.listOperationCondition == "BETWEEN") | ||
| 307 | - #set ($AttrName = $column.javaField.substring(0,1).toUpperCase() + ${column.javaField.substring(1)}) | ||
| 308 | - this.dateRange${AttrName} = []; | ||
| 309 | - #end | ||
| 310 | - #end | ||
| 311 | - #end | ||
| 312 | this.resetForm("queryForm"); | 297 | this.resetForm("queryForm"); |
| 313 | this.handleQuery(); | 298 | this.handleQuery(); |
| 314 | }, | 299 | }, |
| @@ -377,15 +362,6 @@ export default { | @@ -377,15 +362,6 @@ export default { | ||
| 377 | let params = {...this.queryParams}; | 362 | let params = {...this.queryParams}; |
| 378 | params.pageNo = undefined; | 363 | params.pageNo = undefined; |
| 379 | params.pageSize = undefined; | 364 | params.pageSize = undefined; |
| 380 | - #foreach ($column in $columns) | ||
| 381 | - #if ($column.listOperation) | ||
| 382 | - #if ($column.htmlType == "datetime" && $column.listOperationCondition == "BETWEEN") | ||
| 383 | - #set ($AttrName = $column.javaField.substring(0,1).toUpperCase() + ${column.javaField.substring(1)}) | ||
| 384 | - this.addBeginAndEndTime(params, this.dateRange${AttrName}, '${column.javaField}'); | ||
| 385 | - #end | ||
| 386 | - #end | ||
| 387 | - #end | ||
| 388 | - // 执行导出 | ||
| 389 | this.#[[$modal]]#.confirm('是否确认导出所有${table.classComment}数据项?').then(() => { | 365 | this.#[[$modal]]#.confirm('是否确认导出所有${table.classComment}数据项?').then(() => { |
| 390 | this.exportLoading = true; | 366 | this.exportLoading = true; |
| 391 | return export${simpleClassName}Excel(params); | 367 | return export${simpleClassName}Excel(params); |
yudao-module-infra/yudao-module-infra-biz/src/test/java/cn/iocoder/yudao/module/infra/service/config/ConfigServiceTest.java
| @@ -19,6 +19,7 @@ import org.springframework.boot.test.mock.mockito.MockBean; | @@ -19,6 +19,7 @@ import org.springframework.boot.test.mock.mockito.MockBean; | ||
| 19 | import org.springframework.context.annotation.Import; | 19 | import org.springframework.context.annotation.Import; |
| 20 | 20 | ||
| 21 | import javax.annotation.Resource; | 21 | import javax.annotation.Resource; |
| 22 | +import java.util.Date; | ||
| 22 | import java.util.List; | 23 | import java.util.List; |
| 23 | import java.util.function.Consumer; | 24 | import java.util.function.Consumer; |
| 24 | 25 | ||
| @@ -180,8 +181,7 @@ public class ConfigServiceTest extends BaseDbUnitTest { | @@ -180,8 +181,7 @@ public class ConfigServiceTest extends BaseDbUnitTest { | ||
| 180 | reqVO.setName("艿"); | 181 | reqVO.setName("艿"); |
| 181 | reqVO.setKey("nai"); | 182 | reqVO.setKey("nai"); |
| 182 | reqVO.setType(ConfigTypeEnum.SYSTEM.getType()); | 183 | reqVO.setType(ConfigTypeEnum.SYSTEM.getType()); |
| 183 | - reqVO.setBeginTime(buildTime(2021, 1, 15)); | ||
| 184 | - reqVO.setEndTime(buildTime(2021, 2, 15)); | 184 | + reqVO.setCreateTime((new Date[]{buildTime(2021, 1, 15),buildTime(2021, 2, 15)})); |
| 185 | 185 | ||
| 186 | // 调用 | 186 | // 调用 |
| 187 | PageResult<ConfigDO> pageResult = configService.getConfigPage(reqVO); | 187 | PageResult<ConfigDO> pageResult = configService.getConfigPage(reqVO); |
| @@ -214,8 +214,7 @@ public class ConfigServiceTest extends BaseDbUnitTest { | @@ -214,8 +214,7 @@ public class ConfigServiceTest extends BaseDbUnitTest { | ||
| 214 | reqVO.setName("艿"); | 214 | reqVO.setName("艿"); |
| 215 | reqVO.setKey("nai"); | 215 | reqVO.setKey("nai"); |
| 216 | reqVO.setType(ConfigTypeEnum.SYSTEM.getType()); | 216 | reqVO.setType(ConfigTypeEnum.SYSTEM.getType()); |
| 217 | - reqVO.setBeginTime(buildTime(2021, 1, 15)); | ||
| 218 | - reqVO.setEndTime(buildTime(2021, 2, 15)); | 217 | + reqVO.setCreateTime((new Date[]{buildTime(2021, 1, 15),buildTime(2021, 2, 15)})); |
| 219 | 218 | ||
| 220 | // 调用 | 219 | // 调用 |
| 221 | List<ConfigDO> list = configService.getConfigList(reqVO); | 220 | List<ConfigDO> list = configService.getConfigList(reqVO); |
yudao-module-infra/yudao-module-infra-biz/src/test/java/cn/iocoder/yudao/module/infra/service/file/FileConfigServiceImplTest.java
| @@ -22,6 +22,7 @@ import org.springframework.context.annotation.Import; | @@ -22,6 +22,7 @@ import org.springframework.context.annotation.Import; | ||
| 22 | import javax.annotation.Resource; | 22 | import javax.annotation.Resource; |
| 23 | import javax.validation.Validator; | 23 | import javax.validation.Validator; |
| 24 | import java.io.Serializable; | 24 | import java.io.Serializable; |
| 25 | +import java.util.Date; | ||
| 25 | import java.util.Map; | 26 | import java.util.Map; |
| 26 | 27 | ||
| 27 | import static cn.hutool.core.util.RandomUtil.randomEle; | 28 | import static cn.hutool.core.util.RandomUtil.randomEle; |
| @@ -216,8 +217,7 @@ public class FileConfigServiceImplTest extends BaseDbUnitTest { | @@ -216,8 +217,7 @@ public class FileConfigServiceImplTest extends BaseDbUnitTest { | ||
| 216 | FileConfigPageReqVO reqVO = new FileConfigPageReqVO(); | 217 | FileConfigPageReqVO reqVO = new FileConfigPageReqVO(); |
| 217 | reqVO.setName("芋道"); | 218 | reqVO.setName("芋道"); |
| 218 | reqVO.setStorage(FileStorageEnum.LOCAL.getStorage()); | 219 | reqVO.setStorage(FileStorageEnum.LOCAL.getStorage()); |
| 219 | - reqVO.setBeginCreateTime(buildTime(2022, 11, 10)); | ||
| 220 | - reqVO.setEndCreateTime(buildTime(2022, 11, 12)); | 220 | + reqVO.setCreateTime((new Date[]{buildTime(2022, 11, 10),buildTime(2022, 11, 12)})); |
| 221 | 221 | ||
| 222 | // 调用 | 222 | // 调用 |
| 223 | PageResult<FileConfigDO> pageResult = fileConfigService.getFileConfigPage(reqVO); | 223 | PageResult<FileConfigDO> pageResult = fileConfigService.getFileConfigPage(reqVO); |
yudao-module-infra/yudao-module-infra-biz/src/test/java/cn/iocoder/yudao/module/infra/service/file/FileServiceTest.java
| @@ -15,6 +15,8 @@ import org.springframework.context.annotation.Import; | @@ -15,6 +15,8 @@ import org.springframework.context.annotation.Import; | ||
| 15 | 15 | ||
| 16 | import javax.annotation.Resource; | 16 | import javax.annotation.Resource; |
| 17 | 17 | ||
| 18 | +import java.util.Date; | ||
| 19 | + | ||
| 18 | import static cn.iocoder.yudao.framework.common.util.date.DateUtils.buildTime; | 20 | import static cn.iocoder.yudao.framework.common.util.date.DateUtils.buildTime; |
| 19 | import static cn.iocoder.yudao.framework.test.core.util.AssertUtils.assertServiceException; | 21 | import static cn.iocoder.yudao.framework.test.core.util.AssertUtils.assertServiceException; |
| 20 | import static cn.iocoder.yudao.framework.test.core.util.RandomUtils.*; | 22 | import static cn.iocoder.yudao.framework.test.core.util.RandomUtils.*; |
| @@ -58,8 +60,7 @@ public class FileServiceTest extends BaseDbUnitTest { | @@ -58,8 +60,7 @@ public class FileServiceTest extends BaseDbUnitTest { | ||
| 58 | FilePageReqVO reqVO = new FilePageReqVO(); | 60 | FilePageReqVO reqVO = new FilePageReqVO(); |
| 59 | reqVO.setPath("yunai"); | 61 | reqVO.setPath("yunai"); |
| 60 | reqVO.setType("jp"); | 62 | reqVO.setType("jp"); |
| 61 | - reqVO.setBeginCreateTime(buildTime(2021, 1, 10)); | ||
| 62 | - reqVO.setEndCreateTime(buildTime(2021, 1, 20)); | 63 | + reqVO.setCreateTime((new Date[]{buildTime(2021, 1, 10),buildTime(2021, 1, 20)})); |
| 63 | 64 | ||
| 64 | // 调用 | 65 | // 调用 |
| 65 | PageResult<FileDO> pageResult = fileService.getFilePage(reqVO); | 66 | PageResult<FileDO> pageResult = fileService.getFilePage(reqVO); |
yudao-module-infra/yudao-module-infra-biz/src/test/java/cn/iocoder/yudao/module/infra/service/logger/ApiAccessLogServiceImplTest.java
| @@ -77,8 +77,7 @@ public class ApiAccessLogServiceImplTest extends BaseDbUnitTest { | @@ -77,8 +77,7 @@ public class ApiAccessLogServiceImplTest extends BaseDbUnitTest { | ||
| 77 | reqVO.setUserType(userType); | 77 | reqVO.setUserType(userType); |
| 78 | reqVO.setApplicationName(applicationName); | 78 | reqVO.setApplicationName(applicationName); |
| 79 | reqVO.setRequestUrl(requestUrl); | 79 | reqVO.setRequestUrl(requestUrl); |
| 80 | - reqVO.setBeginBeginTime(buildTime(2021, 3, 12)); | ||
| 81 | - reqVO.setEndBeginTime(buildTime(2021, 3, 14)); | 80 | + reqVO.setBeginTime((new Date[]{buildTime(2021, 3, 12),buildTime(2021, 3, 14)})); |
| 82 | reqVO.setDuration(duration); | 81 | reqVO.setDuration(duration); |
| 83 | reqVO.setResultCode(resultCode); | 82 | reqVO.setResultCode(resultCode); |
| 84 | 83 | ||
| @@ -135,8 +134,7 @@ public class ApiAccessLogServiceImplTest extends BaseDbUnitTest { | @@ -135,8 +134,7 @@ public class ApiAccessLogServiceImplTest extends BaseDbUnitTest { | ||
| 135 | reqVO.setUserType(userType); | 134 | reqVO.setUserType(userType); |
| 136 | reqVO.setApplicationName(applicationName); | 135 | reqVO.setApplicationName(applicationName); |
| 137 | reqVO.setRequestUrl(requestUrl); | 136 | reqVO.setRequestUrl(requestUrl); |
| 138 | - reqVO.setBeginBeginTime(buildTime(2021, 3, 12)); | ||
| 139 | - reqVO.setEndBeginTime(buildTime(2021, 3, 14)); | 137 | + reqVO.setBeginTime((new Date[]{buildTime(2021, 3, 12),buildTime(2021, 3, 14)})); |
| 140 | reqVO.setDuration(duration); | 138 | reqVO.setDuration(duration); |
| 141 | reqVO.setResultCode(resultCode); | 139 | reqVO.setResultCode(resultCode); |
| 142 | 140 |
yudao-module-infra/yudao-module-infra-biz/src/test/java/cn/iocoder/yudao/module/infra/service/logger/ApiErrorLogServiceImplTest.java
| @@ -77,8 +77,7 @@ public class ApiErrorLogServiceImplTest extends BaseDbUnitTest { | @@ -77,8 +77,7 @@ public class ApiErrorLogServiceImplTest extends BaseDbUnitTest { | ||
| 77 | reqVO.setUserType(userType); | 77 | reqVO.setUserType(userType); |
| 78 | reqVO.setApplicationName(applicationName); | 78 | reqVO.setApplicationName(applicationName); |
| 79 | reqVO.setRequestUrl(requestUrl); | 79 | reqVO.setRequestUrl(requestUrl); |
| 80 | - reqVO.setBeginExceptionTime(buildTime(2021, 3, 12)); | ||
| 81 | - reqVO.setEndExceptionTime(buildTime(2021, 3, 14)); | 80 | + reqVO.setExceptionTime((new Date[]{buildTime(2021, 3, 12),buildTime(2021, 3, 14)})); |
| 82 | reqVO.setProcessStatus(progressStatus); | 81 | reqVO.setProcessStatus(progressStatus); |
| 83 | 82 | ||
| 84 | // 调用service方法 | 83 | // 调用service方法 |
| @@ -130,8 +129,7 @@ public class ApiErrorLogServiceImplTest extends BaseDbUnitTest { | @@ -130,8 +129,7 @@ public class ApiErrorLogServiceImplTest extends BaseDbUnitTest { | ||
| 130 | reqVO.setUserType(userType); | 129 | reqVO.setUserType(userType); |
| 131 | reqVO.setApplicationName(applicationName); | 130 | reqVO.setApplicationName(applicationName); |
| 132 | reqVO.setRequestUrl(requestUrl); | 131 | reqVO.setRequestUrl(requestUrl); |
| 133 | - reqVO.setBeginExceptionTime(buildTime(2021, 3, 12)); | ||
| 134 | - reqVO.setEndExceptionTime(buildTime(2021, 3, 14)); | 132 | + reqVO.setExceptionTime((new Date[]{buildTime(2021, 3, 12),buildTime(2021, 3, 14)})); |
| 135 | reqVO.setProcessStatus(progressStatus); | 133 | reqVO.setProcessStatus(progressStatus); |
| 136 | 134 | ||
| 137 | // 调用service方法 | 135 | // 调用service方法 |
yudao-module-infra/yudao-module-infra-biz/src/test/java/cn/iocoder/yudao/module/infra/service/test/TestDemoServiceImplTest.java
| @@ -14,8 +14,10 @@ import org.junit.jupiter.api.Test; | @@ -14,8 +14,10 @@ import org.junit.jupiter.api.Test; | ||
| 14 | import org.springframework.context.annotation.Import; | 14 | import org.springframework.context.annotation.Import; |
| 15 | 15 | ||
| 16 | import javax.annotation.Resource; | 16 | import javax.annotation.Resource; |
| 17 | +import java.util.Date; | ||
| 17 | import java.util.List; | 18 | import java.util.List; |
| 18 | 19 | ||
| 20 | +import static cn.iocoder.yudao.framework.common.util.date.DateUtils.buildTime; | ||
| 19 | import static cn.iocoder.yudao.framework.common.util.object.ObjectUtils.cloneIgnoreId; | 21 | import static cn.iocoder.yudao.framework.common.util.object.ObjectUtils.cloneIgnoreId; |
| 20 | import static cn.iocoder.yudao.framework.test.core.util.AssertUtils.assertPojoEquals; | 22 | import static cn.iocoder.yudao.framework.test.core.util.AssertUtils.assertPojoEquals; |
| 21 | import static cn.iocoder.yudao.framework.test.core.util.AssertUtils.assertServiceException; | 23 | import static cn.iocoder.yudao.framework.test.core.util.AssertUtils.assertServiceException; |
| @@ -132,8 +134,7 @@ public class TestDemoServiceImplTest extends BaseDbUnitTest { | @@ -132,8 +134,7 @@ public class TestDemoServiceImplTest extends BaseDbUnitTest { | ||
| 132 | reqVO.setType(1); | 134 | reqVO.setType(1); |
| 133 | reqVO.setCategory(2); | 135 | reqVO.setCategory(2); |
| 134 | reqVO.setRemark("哈哈哈"); | 136 | reqVO.setRemark("哈哈哈"); |
| 135 | - reqVO.setBeginCreateTime(DateUtils.buildTime(2021, 11, 10)); | ||
| 136 | - reqVO.setEndCreateTime(DateUtils.buildTime(2021, 11, 12)); | 137 | + reqVO.setCreateTime((new Date[]{buildTime(2021, 11, 10),buildTime(2021, 11, 12)})); |
| 137 | 138 | ||
| 138 | // 调用 | 139 | // 调用 |
| 139 | PageResult<TestDemoDO> pageResult = testDemoService.getTestDemoPage(reqVO); | 140 | PageResult<TestDemoDO> pageResult = testDemoService.getTestDemoPage(reqVO); |
| @@ -174,8 +175,7 @@ public class TestDemoServiceImplTest extends BaseDbUnitTest { | @@ -174,8 +175,7 @@ public class TestDemoServiceImplTest extends BaseDbUnitTest { | ||
| 174 | reqVO.setType(1); | 175 | reqVO.setType(1); |
| 175 | reqVO.setCategory(2); | 176 | reqVO.setCategory(2); |
| 176 | reqVO.setRemark("哈哈哈"); | 177 | reqVO.setRemark("哈哈哈"); |
| 177 | - reqVO.setBeginCreateTime(DateUtils.buildTime(2021, 11, 10)); | ||
| 178 | - reqVO.setEndCreateTime(DateUtils.buildTime(2021, 11, 12)); | 178 | + reqVO.setCreateTime((new Date[]{buildTime(2021, 11, 10),buildTime(2021, 11, 12)})); |
| 179 | 179 | ||
| 180 | // 调用 | 180 | // 调用 |
| 181 | List<TestDemoDO> list = testDemoService.getTestDemoList(reqVO); | 181 | List<TestDemoDO> list = testDemoService.getTestDemoList(reqVO); |
yudao-module-mall/yudao-module-market-biz/src/test/java/cn/iocoder/yudao/module/market/service/activity/ActivityServiceImplTest.java
| @@ -139,18 +139,13 @@ public class ActivityServiceImplTest extends BaseDbUnitTest { | @@ -139,18 +139,13 @@ public class ActivityServiceImplTest extends BaseDbUnitTest { | ||
| 139 | reqVO.setTitle(null); | 139 | reqVO.setTitle(null); |
| 140 | reqVO.setActivityType(null); | 140 | reqVO.setActivityType(null); |
| 141 | reqVO.setStatus(null); | 141 | reqVO.setStatus(null); |
| 142 | - reqVO.setBeginStartTime(null); | ||
| 143 | - reqVO.setEndStartTime(null); | ||
| 144 | - reqVO.setBeginEndTime(null); | ||
| 145 | - reqVO.setEndEndTime(null); | ||
| 146 | - reqVO.setBeginInvalidTime(null); | ||
| 147 | - reqVO.setEndInvalidTime(null); | ||
| 148 | - reqVO.setBeginDeleteTime(null); | ||
| 149 | - reqVO.setEndDeleteTime(null); | 142 | + reqVO.setStartTime(null); |
| 143 | + reqVO.setEndTime(null); | ||
| 144 | + reqVO.setInvalidTime(null); | ||
| 145 | + reqVO.setDeleteTime(null); | ||
| 150 | reqVO.setTimeLimitedDiscount(null); | 146 | reqVO.setTimeLimitedDiscount(null); |
| 151 | reqVO.setFullPrivilege(null); | 147 | reqVO.setFullPrivilege(null); |
| 152 | - reqVO.setBeginCreateTime(null); | ||
| 153 | - reqVO.setEndCreateTime(null); | 148 | + reqVO.setCreateTime(null); |
| 154 | 149 | ||
| 155 | // 调用 | 150 | // 调用 |
| 156 | PageResult<ActivityDO> pageResult = activityService.getActivityPage(reqVO); | 151 | PageResult<ActivityDO> pageResult = activityService.getActivityPage(reqVO); |
yudao-module-mall/yudao-module-product-biz/src/test/java/cn/iocoder/yudao/module/product/service/brand/BrandServiceImplTest.java
| @@ -127,8 +127,7 @@ public class BrandServiceImplTest extends BaseDbUnitTest { | @@ -127,8 +127,7 @@ public class BrandServiceImplTest extends BaseDbUnitTest { | ||
| 127 | reqVO.setCategoryId(null); | 127 | reqVO.setCategoryId(null); |
| 128 | reqVO.setName(null); | 128 | reqVO.setName(null); |
| 129 | reqVO.setStatus(null); | 129 | reqVO.setStatus(null); |
| 130 | - reqVO.setBeginCreateTime(null); | ||
| 131 | - reqVO.setEndCreateTime(null); | 130 | + reqVO.setCreateTime((new Date[]{})); |
| 132 | 131 | ||
| 133 | // 调用 | 132 | // 调用 |
| 134 | PageResult<BrandDO> pageResult = brandService.getBrandPage(reqVO); | 133 | PageResult<BrandDO> pageResult = brandService.getBrandPage(reqVO); |
| @@ -162,8 +161,7 @@ public class BrandServiceImplTest extends BaseDbUnitTest { | @@ -162,8 +161,7 @@ public class BrandServiceImplTest extends BaseDbUnitTest { | ||
| 162 | reqVO.setCategoryId(null); | 161 | reqVO.setCategoryId(null); |
| 163 | reqVO.setName(null); | 162 | reqVO.setName(null); |
| 164 | reqVO.setStatus(null); | 163 | reqVO.setStatus(null); |
| 165 | - reqVO.setBeginCreateTime(null); | ||
| 166 | - reqVO.setEndCreateTime(null); | 164 | + reqVO.setCreateTime((new Date[]{})); |
| 167 | 165 | ||
| 168 | // 调用 | 166 | // 调用 |
| 169 | List<BrandDO> list = brandService.getBrandList(reqVO); | 167 | List<BrandDO> list = brandService.getBrandList(reqVO); |
yudao-module-mall/yudao-module-product-biz/src/test/java/cn/iocoder/yudao/module/product/service/category/CategoryServiceImplTest.java
| @@ -135,8 +135,7 @@ public class CategoryServiceImplTest extends BaseDbUnitTest { | @@ -135,8 +135,7 @@ public class CategoryServiceImplTest extends BaseDbUnitTest { | ||
| 135 | CategoryPageReqVO reqVO = new CategoryPageReqVO(); | 135 | CategoryPageReqVO reqVO = new CategoryPageReqVO(); |
| 136 | reqVO.setName(null); | 136 | reqVO.setName(null); |
| 137 | reqVO.setStatus(null); | 137 | reqVO.setStatus(null); |
| 138 | - reqVO.setBeginCreateTime(null); | ||
| 139 | - reqVO.setEndCreateTime(null); | 138 | + reqVO.setCreateTime(null); |
| 140 | 139 | ||
| 141 | // 调用 | 140 | // 调用 |
| 142 | PageResult<CategoryDO> pageResult = categoryService.getCategoryPage(reqVO); | 141 | PageResult<CategoryDO> pageResult = categoryService.getCategoryPage(reqVO); |
| @@ -181,8 +180,7 @@ public class CategoryServiceImplTest extends BaseDbUnitTest { | @@ -181,8 +180,7 @@ public class CategoryServiceImplTest extends BaseDbUnitTest { | ||
| 181 | CategoryExportReqVO reqVO = new CategoryExportReqVO(); | 180 | CategoryExportReqVO reqVO = new CategoryExportReqVO(); |
| 182 | reqVO.setName(null); | 181 | reqVO.setName(null); |
| 183 | reqVO.setStatus(null); | 182 | reqVO.setStatus(null); |
| 184 | - reqVO.setBeginCreateTime(null); | ||
| 185 | - reqVO.setEndCreateTime(null); | 183 | + reqVO.setCreateTime(null); |
| 186 | 184 | ||
| 187 | // 调用 | 185 | // 调用 |
| 188 | List<CategoryDO> list = categoryService.getCategoryList(reqVO); | 186 | List<CategoryDO> list = categoryService.getCategoryList(reqVO); |
yudao-module-mall/yudao-module-product-biz/src/test/java/cn/iocoder/yudao/module/product/service/sku/SkuServiceImplTest.java
| @@ -147,8 +147,7 @@ public class SkuServiceImplTest extends BaseDbUnitTest { | @@ -147,8 +147,7 @@ public class SkuServiceImplTest extends BaseDbUnitTest { | ||
| 147 | reqVO.setBarCode(null); | 147 | reqVO.setBarCode(null); |
| 148 | reqVO.setPicUrl(null); | 148 | reqVO.setPicUrl(null); |
| 149 | reqVO.setStatus(null); | 149 | reqVO.setStatus(null); |
| 150 | - reqVO.setBeginCreateTime(null); | ||
| 151 | - reqVO.setEndCreateTime(null); | 150 | + reqVO.setCreateTime(null); |
| 152 | 151 | ||
| 153 | // 调用 | 152 | // 调用 |
| 154 | PageResult<ProductSkuDO> pageResult = ProductSkuService.getSkuPage(reqVO); | 153 | PageResult<ProductSkuDO> pageResult = ProductSkuService.getSkuPage(reqVO); |
| @@ -202,8 +201,7 @@ public class SkuServiceImplTest extends BaseDbUnitTest { | @@ -202,8 +201,7 @@ public class SkuServiceImplTest extends BaseDbUnitTest { | ||
| 202 | reqVO.setBarCode(null); | 201 | reqVO.setBarCode(null); |
| 203 | reqVO.setPicUrl(null); | 202 | reqVO.setPicUrl(null); |
| 204 | reqVO.setStatus(null); | 203 | reqVO.setStatus(null); |
| 205 | - reqVO.setBeginCreateTime(null); | ||
| 206 | - reqVO.setEndCreateTime(null); | 204 | + reqVO.setCreateTime(null); |
| 207 | 205 | ||
| 208 | // 调用 | 206 | // 调用 |
| 209 | List<ProductSkuDO> list = ProductSkuService.getSkuList(reqVO); | 207 | List<ProductSkuDO> list = ProductSkuService.getSkuList(reqVO); |
yudao-module-mall/yudao-module-product-biz/src/test/java/cn/iocoder/yudao/module/product/service/spu/ProductSpuServiceImplTest.java
| @@ -155,8 +155,7 @@ public class ProductSpuServiceImplTest extends BaseDbUnitTest { | @@ -155,8 +155,7 @@ public class ProductSpuServiceImplTest extends BaseDbUnitTest { | ||
| 155 | reqVO.setPrice(null); | 155 | reqVO.setPrice(null); |
| 156 | reqVO.setQuantity(null); | 156 | reqVO.setQuantity(null); |
| 157 | reqVO.setStatus(null); | 157 | reqVO.setStatus(null); |
| 158 | - reqVO.setBeginCreateTime(null); | ||
| 159 | - reqVO.setEndCreateTime(null); | 158 | + reqVO.setCreateTime(null); |
| 160 | 159 | ||
| 161 | // 调用 | 160 | // 调用 |
| 162 | PageResult<SpuRespVO> pageResult = spuService.getSpuPage(reqVO); | 161 | PageResult<SpuRespVO> pageResult = spuService.getSpuPage(reqVO); |
| @@ -218,8 +217,7 @@ public class ProductSpuServiceImplTest extends BaseDbUnitTest { | @@ -218,8 +217,7 @@ public class ProductSpuServiceImplTest extends BaseDbUnitTest { | ||
| 218 | reqVO.setPrice(null); | 217 | reqVO.setPrice(null); |
| 219 | reqVO.setQuantity(null); | 218 | reqVO.setQuantity(null); |
| 220 | reqVO.setStatus(null); | 219 | reqVO.setStatus(null); |
| 221 | - reqVO.setBeginCreateTime(null); | ||
| 222 | - reqVO.setEndCreateTime(null); | 220 | + reqVO.setCreateTime(null); |
| 223 | 221 | ||
| 224 | // 调用 | 222 | // 调用 |
| 225 | List<ProductSpuDO> list = spuService.getSpuList(reqVO); | 223 | List<ProductSpuDO> list = spuService.getSpuList(reqVO); |
yudao-module-pay/yudao-module-pay-biz/src/test/java/cn/iocoder/yudao/module/pay/service/merchant/PayAppServiceTest.java
| @@ -19,6 +19,7 @@ import org.springframework.context.annotation.Import; | @@ -19,6 +19,7 @@ import org.springframework.context.annotation.Import; | ||
| 19 | 19 | ||
| 20 | import javax.annotation.Resource; | 20 | import javax.annotation.Resource; |
| 21 | import java.util.Collections; | 21 | import java.util.Collections; |
| 22 | +import java.util.Date; | ||
| 22 | import java.util.List; | 23 | import java.util.List; |
| 23 | 24 | ||
| 24 | import static cn.iocoder.yudao.framework.common.util.date.DateUtils.buildTime; | 25 | import static cn.iocoder.yudao.framework.common.util.date.DateUtils.buildTime; |
| @@ -162,8 +163,7 @@ public class PayAppServiceTest extends BaseDbUnitTest { | @@ -162,8 +163,7 @@ public class PayAppServiceTest extends BaseDbUnitTest { | ||
| 162 | reqVO.setPayNotifyUrl("https://www.hc.com"); | 163 | reqVO.setPayNotifyUrl("https://www.hc.com"); |
| 163 | reqVO.setRefundNotifyUrl("https://www.xm.com"); | 164 | reqVO.setRefundNotifyUrl("https://www.xm.com"); |
| 164 | reqVO.setMerchantName(dbMerchant.getName()); | 165 | reqVO.setMerchantName(dbMerchant.getName()); |
| 165 | - reqVO.setBeginCreateTime(buildTime(2021,11,19)); | ||
| 166 | - reqVO.setEndCreateTime(buildTime(2021,11,21)); | 166 | + reqVO.setCreateTime((new Date[]{buildTime(2021,11,19),buildTime(2021,11,21)})); |
| 167 | 167 | ||
| 168 | // 调用 | 168 | // 调用 |
| 169 | PageResult<PayAppDO> pageResult = appService.getAppPage(reqVO); | 169 | PageResult<PayAppDO> pageResult = appService.getAppPage(reqVO); |
| @@ -226,8 +226,7 @@ public class PayAppServiceTest extends BaseDbUnitTest { | @@ -226,8 +226,7 @@ public class PayAppServiceTest extends BaseDbUnitTest { | ||
| 226 | reqVO.setPayNotifyUrl("https://www.hc.com"); | 226 | reqVO.setPayNotifyUrl("https://www.hc.com"); |
| 227 | reqVO.setRefundNotifyUrl("https://www.xm.com"); | 227 | reqVO.setRefundNotifyUrl("https://www.xm.com"); |
| 228 | reqVO.setMerchantName(dbMerchant.getName()); | 228 | reqVO.setMerchantName(dbMerchant.getName()); |
| 229 | - reqVO.setBeginCreateTime(buildTime(2021,11,19)); | ||
| 230 | - reqVO.setEndCreateTime(buildTime(2021,11,21)); | 229 | + reqVO.setCreateTime((new Date[]{buildTime(2021,11,19),buildTime(2021,11,21)})); |
| 231 | 230 | ||
| 232 | // 调用 | 231 | // 调用 |
| 233 | List<PayAppDO> list = appService.getAppList(reqVO); | 232 | List<PayAppDO> list = appService.getAppList(reqVO); |
yudao-module-pay/yudao-module-pay-biz/src/test/java/cn/iocoder/yudao/module/pay/service/merchant/PayChannelServiceTest.java
| @@ -20,6 +20,7 @@ import org.springframework.context.annotation.Import; | @@ -20,6 +20,7 @@ import org.springframework.context.annotation.Import; | ||
| 20 | 20 | ||
| 21 | import javax.annotation.Resource; | 21 | import javax.annotation.Resource; |
| 22 | import javax.validation.Validator; | 22 | import javax.validation.Validator; |
| 23 | +import java.util.Date; | ||
| 23 | import java.util.List; | 24 | import java.util.List; |
| 24 | 25 | ||
| 25 | import static cn.iocoder.yudao.framework.common.util.date.DateUtils.buildTime; | 26 | import static cn.iocoder.yudao.framework.common.util.date.DateUtils.buildTime; |
| @@ -263,8 +264,7 @@ public class PayChannelServiceTest extends BaseDbUnitTest { | @@ -263,8 +264,7 @@ public class PayChannelServiceTest extends BaseDbUnitTest { | ||
| 263 | reqVO.setMerchantId(1L); | 264 | reqVO.setMerchantId(1L); |
| 264 | reqVO.setAppId(1L); | 265 | reqVO.setAppId(1L); |
| 265 | reqVO.setConfig(JSON.toJSONString(payClientConfig)); | 266 | reqVO.setConfig(JSON.toJSONString(payClientConfig)); |
| 266 | - reqVO.setBeginCreateTime(buildTime(2021,11,19)); | ||
| 267 | - reqVO.setEndCreateTime(buildTime(2021,11,21)); | 267 | + reqVO.setCreateTime((new Date[]{buildTime(2021,11,19),buildTime(2021,11,21)})); |
| 268 | 268 | ||
| 269 | // 调用 | 269 | // 调用 |
| 270 | PageResult<PayChannelDO> pageResult = channelService.getChannelPage(reqVO); | 270 | PageResult<PayChannelDO> pageResult = channelService.getChannelPage(reqVO); |
| @@ -337,8 +337,7 @@ public class PayChannelServiceTest extends BaseDbUnitTest { | @@ -337,8 +337,7 @@ public class PayChannelServiceTest extends BaseDbUnitTest { | ||
| 337 | reqVO.setMerchantId(1L); | 337 | reqVO.setMerchantId(1L); |
| 338 | reqVO.setAppId(1L); | 338 | reqVO.setAppId(1L); |
| 339 | reqVO.setConfig(JSON.toJSONString(payClientConfig)); | 339 | reqVO.setConfig(JSON.toJSONString(payClientConfig)); |
| 340 | - reqVO.setBeginCreateTime(buildTime(2021,11,19)); | ||
| 341 | - reqVO.setEndCreateTime(buildTime(2021,11,21)); | 340 | + reqVO.setCreateTime((new Date[]{buildTime(2021,11,19),buildTime(2021,11,21)})); |
| 342 | 341 | ||
| 343 | // 调用 | 342 | // 调用 |
| 344 | List<PayChannelDO> list = channelService.getChannelList(reqVO); | 343 | List<PayChannelDO> list = channelService.getChannelList(reqVO); |
yudao-module-pay/yudao-module-pay-biz/src/test/java/cn/iocoder/yudao/module/pay/service/merchant/PayMerchantServiceTest.java
| @@ -14,6 +14,7 @@ import org.junit.jupiter.api.Test; | @@ -14,6 +14,7 @@ import org.junit.jupiter.api.Test; | ||
| 14 | import org.springframework.context.annotation.Import; | 14 | import org.springframework.context.annotation.Import; |
| 15 | 15 | ||
| 16 | import javax.annotation.Resource; | 16 | import javax.annotation.Resource; |
| 17 | +import java.util.Date; | ||
| 17 | import java.util.List; | 18 | import java.util.List; |
| 18 | 19 | ||
| 19 | import static cn.iocoder.yudao.framework.common.util.date.DateUtils.buildTime; | 20 | import static cn.iocoder.yudao.framework.common.util.date.DateUtils.buildTime; |
| @@ -137,8 +138,7 @@ public class PayMerchantServiceTest extends BaseDbUnitTest { | @@ -137,8 +138,7 @@ public class PayMerchantServiceTest extends BaseDbUnitTest { | ||
| 137 | reqVO.setShortName("灿灿子"); | 138 | reqVO.setShortName("灿灿子"); |
| 138 | reqVO.setStatus(CommonStatusEnum.ENABLE.getStatus()); | 139 | reqVO.setStatus(CommonStatusEnum.ENABLE.getStatus()); |
| 139 | reqVO.setRemark("灿哥的杂货铺"); | 140 | reqVO.setRemark("灿哥的杂货铺"); |
| 140 | - reqVO.setBeginCreateTime(buildTime(2021,11,2)); | ||
| 141 | - reqVO.setEndCreateTime(buildTime(2021,11,4)); | 141 | + reqVO.setCreateTime((new Date[]{buildTime(2021,11,2),buildTime(2021,11,4)})); |
| 142 | 142 | ||
| 143 | // 调用 | 143 | // 调用 |
| 144 | PageResult<PayMerchantDO> pageResult = merchantService.getMerchantPage(reqVO); | 144 | PageResult<PayMerchantDO> pageResult = merchantService.getMerchantPage(reqVO); |
| @@ -179,8 +179,7 @@ public class PayMerchantServiceTest extends BaseDbUnitTest { | @@ -179,8 +179,7 @@ public class PayMerchantServiceTest extends BaseDbUnitTest { | ||
| 179 | reqVO.setShortName("灿灿子"); | 179 | reqVO.setShortName("灿灿子"); |
| 180 | reqVO.setStatus(CommonStatusEnum.ENABLE.getStatus()); | 180 | reqVO.setStatus(CommonStatusEnum.ENABLE.getStatus()); |
| 181 | reqVO.setRemark("灿哥的杂货铺"); | 181 | reqVO.setRemark("灿哥的杂货铺"); |
| 182 | - reqVO.setBeginCreateTime(buildTime(2021,11,2)); | ||
| 183 | - reqVO.setEndCreateTime(buildTime(2021,11,4)); | 182 | + reqVO.setCreateTime((new Date[]{buildTime(2021,11,2),buildTime(2021,11,4)})); |
| 184 | 183 | ||
| 185 | // 调用 | 184 | // 调用 |
| 186 | List<PayMerchantDO> list = merchantService.getMerchantList(reqVO); | 185 | List<PayMerchantDO> list = merchantService.getMerchantList(reqVO); |
yudao-module-pay/yudao-module-pay-biz/src/test/java/cn/iocoder/yudao/module/pay/service/order/PayOrderServiceTest.java
| @@ -26,6 +26,7 @@ import javax.annotation.Resource; | @@ -26,6 +26,7 @@ import javax.annotation.Resource; | ||
| 26 | import java.util.Date; | 26 | import java.util.Date; |
| 27 | import java.util.List; | 27 | import java.util.List; |
| 28 | 28 | ||
| 29 | +import static cn.iocoder.yudao.framework.common.util.date.DateUtils.buildTime; | ||
| 29 | import static cn.iocoder.yudao.framework.common.util.object.ObjectUtils.cloneIgnoreId; | 30 | import static cn.iocoder.yudao.framework.common.util.object.ObjectUtils.cloneIgnoreId; |
| 30 | import static cn.iocoder.yudao.framework.test.core.util.AssertUtils.assertPojoEquals; | 31 | import static cn.iocoder.yudao.framework.test.core.util.AssertUtils.assertPojoEquals; |
| 31 | import static cn.iocoder.yudao.framework.test.core.util.RandomUtils.randomPojo; | 32 | import static cn.iocoder.yudao.framework.test.core.util.RandomUtils.randomPojo; |
| @@ -124,9 +125,7 @@ public class PayOrderServiceTest extends BaseDbUnitTest { | @@ -124,9 +125,7 @@ public class PayOrderServiceTest extends BaseDbUnitTest { | ||
| 124 | reqVO.setNotifyStatus(PayOrderNotifyStatusEnum.SUCCESS.getStatus()); | 125 | reqVO.setNotifyStatus(PayOrderNotifyStatusEnum.SUCCESS.getStatus()); |
| 125 | reqVO.setStatus(PayOrderStatusEnum.SUCCESS.getStatus()); | 126 | reqVO.setStatus(PayOrderStatusEnum.SUCCESS.getStatus()); |
| 126 | reqVO.setRefundStatus(PayRefundTypeEnum.NO.getStatus()); | 127 | reqVO.setRefundStatus(PayRefundTypeEnum.NO.getStatus()); |
| 127 | - reqVO.setBeginCreateTime(DateUtils.buildTime(2018, 1, 1, 10, 1, 0)); | ||
| 128 | - reqVO.setEndCreateTime(DateUtils.buildTime(2018, 1, 1, 10, 1, 0)); | ||
| 129 | - | 128 | + reqVO.setCreateTime((new Date[]{buildTime(2018, 1, 1, 10, 1, 0),buildTime(2018, 1, 1, 10, 1, 0)})); |
| 130 | // 调用 | 129 | // 调用 |
| 131 | PageResult<PayOrderDO> pageResult = orderService.getOrderPage(reqVO); | 130 | PageResult<PayOrderDO> pageResult = orderService.getOrderPage(reqVO); |
| 132 | // 断言 | 131 | // 断言 |
| @@ -199,8 +198,7 @@ public class PayOrderServiceTest extends BaseDbUnitTest { | @@ -199,8 +198,7 @@ public class PayOrderServiceTest extends BaseDbUnitTest { | ||
| 199 | reqVO.setNotifyStatus(PayOrderNotifyStatusEnum.SUCCESS.getStatus()); | 198 | reqVO.setNotifyStatus(PayOrderNotifyStatusEnum.SUCCESS.getStatus()); |
| 200 | reqVO.setStatus(PayOrderStatusEnum.SUCCESS.getStatus()); | 199 | reqVO.setStatus(PayOrderStatusEnum.SUCCESS.getStatus()); |
| 201 | reqVO.setRefundStatus(PayRefundTypeEnum.NO.getStatus()); | 200 | reqVO.setRefundStatus(PayRefundTypeEnum.NO.getStatus()); |
| 202 | - reqVO.setBeginCreateTime(DateUtils.buildTime(2018, 1, 1, 10, 1, 0)); | ||
| 203 | - reqVO.setEndCreateTime(DateUtils.buildTime(2018, 1, 1, 10, 1, 0)); | 201 | + reqVO.setCreateTime((new Date[]{buildTime(2018, 1, 1, 10, 1, 0),buildTime(2018, 1, 1, 10, 1, 0)})); |
| 204 | 202 | ||
| 205 | // 调用 | 203 | // 调用 |
| 206 | List<PayOrderDO> list = orderService.getOrderList(reqVO); | 204 | List<PayOrderDO> list = orderService.getOrderList(reqVO); |
yudao-module-pay/yudao-module-pay-biz/src/test/java/cn/iocoder/yudao/module/pay/service/refund/PayRefundServiceTest.java
| @@ -22,8 +22,10 @@ import org.springframework.boot.test.mock.mockito.MockBean; | @@ -22,8 +22,10 @@ import org.springframework.boot.test.mock.mockito.MockBean; | ||
| 22 | import org.springframework.context.annotation.Import; | 22 | import org.springframework.context.annotation.Import; |
| 23 | 23 | ||
| 24 | import javax.annotation.Resource; | 24 | import javax.annotation.Resource; |
| 25 | +import java.util.Date; | ||
| 25 | import java.util.List; | 26 | import java.util.List; |
| 26 | 27 | ||
| 28 | +import static cn.iocoder.yudao.framework.common.util.date.DateUtils.buildTime; | ||
| 27 | import static cn.iocoder.yudao.framework.common.util.object.ObjectUtils.cloneIgnoreId; | 29 | import static cn.iocoder.yudao.framework.common.util.object.ObjectUtils.cloneIgnoreId; |
| 28 | import static cn.iocoder.yudao.framework.test.core.util.AssertUtils.assertPojoEquals; | 30 | import static cn.iocoder.yudao.framework.test.core.util.AssertUtils.assertPojoEquals; |
| 29 | import static cn.iocoder.yudao.framework.test.core.util.RandomUtils.randomPojo; | 31 | import static cn.iocoder.yudao.framework.test.core.util.RandomUtils.randomPojo; |
| @@ -110,9 +112,7 @@ public class PayRefundServiceTest extends BaseDbUnitTest { | @@ -110,9 +112,7 @@ public class PayRefundServiceTest extends BaseDbUnitTest { | ||
| 110 | reqVO.setNotifyStatus(PayOrderNotifyStatusEnum.SUCCESS.getStatus()); | 112 | reqVO.setNotifyStatus(PayOrderNotifyStatusEnum.SUCCESS.getStatus()); |
| 111 | reqVO.setStatus(PayRefundStatusEnum.SUCCESS.getStatus()); | 113 | reqVO.setStatus(PayRefundStatusEnum.SUCCESS.getStatus()); |
| 112 | reqVO.setType(PayRefundTypeEnum.SOME.getStatus()); | 114 | reqVO.setType(PayRefundTypeEnum.SOME.getStatus()); |
| 113 | - reqVO.setBeginCreateTime(DateUtils.buildTime(2021, 1, 1, 10, 10, 10)); | ||
| 114 | - reqVO.setEndCreateTime(DateUtils.buildTime(2021, 1, 1, 10, 10, 12)); | ||
| 115 | - | 115 | + reqVO.setCreateTime((new Date[]{buildTime(2021, 1, 1, 10, 10, 10),buildTime(2021, 1, 1, 10, 10, 12)})); |
| 116 | 116 | ||
| 117 | // 调用 | 117 | // 调用 |
| 118 | PageResult<PayRefundDO> pageResult = refundService.getRefundPage(reqVO); | 118 | PageResult<PayRefundDO> pageResult = refundService.getRefundPage(reqVO); |
| @@ -182,8 +182,7 @@ public class PayRefundServiceTest extends BaseDbUnitTest { | @@ -182,8 +182,7 @@ public class PayRefundServiceTest extends BaseDbUnitTest { | ||
| 182 | reqVO.setNotifyStatus(PayOrderNotifyStatusEnum.SUCCESS.getStatus()); | 182 | reqVO.setNotifyStatus(PayOrderNotifyStatusEnum.SUCCESS.getStatus()); |
| 183 | reqVO.setStatus(PayRefundStatusEnum.SUCCESS.getStatus()); | 183 | reqVO.setStatus(PayRefundStatusEnum.SUCCESS.getStatus()); |
| 184 | reqVO.setType(PayRefundTypeEnum.SOME.getStatus()); | 184 | reqVO.setType(PayRefundTypeEnum.SOME.getStatus()); |
| 185 | - reqVO.setBeginCreateTime(DateUtils.buildTime(2021, 1, 1, 10, 10, 10)); | ||
| 186 | - reqVO.setEndCreateTime(DateUtils.buildTime(2021, 1, 1, 10, 10, 12)); | 185 | + reqVO.setCreateTime((new Date[]{buildTime(2021, 1, 1, 10, 10, 10),buildTime(2021, 1, 1, 10, 10, 12)})); |
| 187 | 186 | ||
| 188 | // 调用 | 187 | // 调用 |
| 189 | List<PayRefundDO> list = refundService.getRefundList(reqVO); | 188 | List<PayRefundDO> list = refundService.getRefundList(reqVO); |
yudao-module-system/yudao-module-system-biz/src/test/java/cn/iocoder/yudao/module/system/service/dict/DictTypeServiceTest.java
| @@ -16,6 +16,7 @@ import org.springframework.boot.test.mock.mockito.MockBean; | @@ -16,6 +16,7 @@ import org.springframework.boot.test.mock.mockito.MockBean; | ||
| 16 | import org.springframework.context.annotation.Import; | 16 | import org.springframework.context.annotation.Import; |
| 17 | 17 | ||
| 18 | import javax.annotation.Resource; | 18 | import javax.annotation.Resource; |
| 19 | +import java.util.Date; | ||
| 19 | import java.util.List; | 20 | import java.util.List; |
| 20 | import java.util.function.Consumer; | 21 | import java.util.function.Consumer; |
| 21 | 22 | ||
| @@ -63,8 +64,7 @@ public class DictTypeServiceTest extends BaseDbUnitTest { | @@ -63,8 +64,7 @@ public class DictTypeServiceTest extends BaseDbUnitTest { | ||
| 63 | reqVO.setName("nai"); | 64 | reqVO.setName("nai"); |
| 64 | reqVO.setType("艿"); | 65 | reqVO.setType("艿"); |
| 65 | reqVO.setStatus(CommonStatusEnum.ENABLE.getStatus()); | 66 | reqVO.setStatus(CommonStatusEnum.ENABLE.getStatus()); |
| 66 | - reqVO.setBeginCreateTime(buildTime(2021, 1, 10)); | ||
| 67 | - reqVO.setEndCreateTime(buildTime(2021, 1, 20)); | 67 | + reqVO.setCreateTime((new Date[]{buildTime(2021, 1, 10),buildTime(2021, 1, 20)})); |
| 68 | 68 | ||
| 69 | // 调用 | 69 | // 调用 |
| 70 | PageResult<DictTypeDO> pageResult = dictTypeService.getDictTypePage(reqVO); | 70 | PageResult<DictTypeDO> pageResult = dictTypeService.getDictTypePage(reqVO); |
| @@ -97,8 +97,7 @@ public class DictTypeServiceTest extends BaseDbUnitTest { | @@ -97,8 +97,7 @@ public class DictTypeServiceTest extends BaseDbUnitTest { | ||
| 97 | reqVO.setName("nai"); | 97 | reqVO.setName("nai"); |
| 98 | reqVO.setType("艿"); | 98 | reqVO.setType("艿"); |
| 99 | reqVO.setStatus(CommonStatusEnum.ENABLE.getStatus()); | 99 | reqVO.setStatus(CommonStatusEnum.ENABLE.getStatus()); |
| 100 | - reqVO.setBeginCreateTime(buildTime(2021, 1, 10)); | ||
| 101 | - reqVO.setEndCreateTime(buildTime(2021, 1, 20)); | 100 | + reqVO.setCreateTime((new Date[]{buildTime(2021, 1, 10),buildTime(2021, 1, 20)})); |
| 102 | 101 | ||
| 103 | // 调用 | 102 | // 调用 |
| 104 | List<DictTypeDO> list = dictTypeService.getDictTypeList(reqVO); | 103 | List<DictTypeDO> list = dictTypeService.getDictTypeList(reqVO); |
yudao-module-system/yudao-module-system-biz/src/test/java/cn/iocoder/yudao/module/system/service/errorcode/ErrorCodeServiceTest.java
| @@ -17,6 +17,7 @@ import org.junit.jupiter.api.Test; | @@ -17,6 +17,7 @@ import org.junit.jupiter.api.Test; | ||
| 17 | import org.springframework.context.annotation.Import; | 17 | import org.springframework.context.annotation.Import; |
| 18 | 18 | ||
| 19 | import javax.annotation.Resource; | 19 | import javax.annotation.Resource; |
| 20 | +import java.util.Date; | ||
| 20 | import java.util.List; | 21 | import java.util.List; |
| 21 | import java.util.function.Consumer; | 22 | import java.util.function.Consumer; |
| 22 | 23 | ||
| @@ -95,8 +96,7 @@ public class ErrorCodeServiceTest extends BaseDbUnitTest { | @@ -95,8 +96,7 @@ public class ErrorCodeServiceTest extends BaseDbUnitTest { | ||
| 95 | reqVO.setApplicationName("tu"); | 96 | reqVO.setApplicationName("tu"); |
| 96 | reqVO.setCode(1); | 97 | reqVO.setCode(1); |
| 97 | reqVO.setMessage("ma"); | 98 | reqVO.setMessage("ma"); |
| 98 | - reqVO.setBeginCreateTime(buildTime(2020, 11, 1)); | ||
| 99 | - reqVO.setEndCreateTime(buildTime(2020, 11, 30)); | 99 | + reqVO.setCreateTime((new Date[]{buildTime(2020, 11, 1),buildTime(2020, 11, 30)})); |
| 100 | 100 | ||
| 101 | // 调用 | 101 | // 调用 |
| 102 | PageResult<ErrorCodeDO> pageResult = errorCodeService.getErrorCodePage(reqVO); | 102 | PageResult<ErrorCodeDO> pageResult = errorCodeService.getErrorCodePage(reqVO); |
| @@ -141,8 +141,7 @@ public class ErrorCodeServiceTest extends BaseDbUnitTest { | @@ -141,8 +141,7 @@ public class ErrorCodeServiceTest extends BaseDbUnitTest { | ||
| 141 | reqVO.setApplicationName("tu"); | 141 | reqVO.setApplicationName("tu"); |
| 142 | reqVO.setCode(1); | 142 | reqVO.setCode(1); |
| 143 | reqVO.setMessage("ma"); | 143 | reqVO.setMessage("ma"); |
| 144 | - reqVO.setBeginCreateTime(buildTime(2020, 11, 1)); | ||
| 145 | - reqVO.setEndCreateTime(buildTime(2020, 11, 30)); | 144 | + reqVO.setCreateTime((new Date[]{buildTime(2020, 11, 1),buildTime(2020, 11, 30)})); |
| 146 | 145 | ||
| 147 | // 调用 | 146 | // 调用 |
| 148 | List<ErrorCodeDO> list = errorCodeService.getErrorCodeList(reqVO); | 147 | List<ErrorCodeDO> list = errorCodeService.getErrorCodeList(reqVO); |
yudao-module-system/yudao-module-system-biz/src/test/java/cn/iocoder/yudao/module/system/service/logger/LoginLogServiceImplTest.java
| @@ -18,6 +18,7 @@ import org.junit.jupiter.api.Test; | @@ -18,6 +18,7 @@ import org.junit.jupiter.api.Test; | ||
| 18 | import org.springframework.context.annotation.Import; | 18 | import org.springframework.context.annotation.Import; |
| 19 | 19 | ||
| 20 | import javax.annotation.Resource; | 20 | import javax.annotation.Resource; |
| 21 | +import java.util.Date; | ||
| 21 | import java.util.List; | 22 | import java.util.List; |
| 22 | 23 | ||
| 23 | import static cn.hutool.core.util.RandomUtil.randomEle; | 24 | import static cn.hutool.core.util.RandomUtil.randomEle; |
| @@ -66,8 +67,7 @@ public class LoginLogServiceImplTest extends BaseDbUnitTest { | @@ -66,8 +67,7 @@ public class LoginLogServiceImplTest extends BaseDbUnitTest { | ||
| 66 | reqVO.setUsername("wangkai"); | 67 | reqVO.setUsername("wangkai"); |
| 67 | reqVO.setUserIp("192.168.199"); | 68 | reqVO.setUserIp("192.168.199"); |
| 68 | reqVO.setStatus(true); | 69 | reqVO.setStatus(true); |
| 69 | - reqVO.setBeginTime(buildTime(2021, 3, 5)); | ||
| 70 | - reqVO.setEndTime(buildTime(2021, 3, 7)); | 70 | + reqVO.setCreateTime((new Date[]{buildTime(2021, 3, 5),buildTime(2021, 3, 5)})); |
| 71 | 71 | ||
| 72 | // 调用service方法 | 72 | // 调用service方法 |
| 73 | PageResult<LoginLogDO> pageResult = loginLogService.getLoginLogPage(reqVO); | 73 | PageResult<LoginLogDO> pageResult = loginLogService.getLoginLogPage(reqVO); |
| @@ -105,15 +105,12 @@ public class LoginLogServiceImplTest extends BaseDbUnitTest { | @@ -105,15 +105,12 @@ public class LoginLogServiceImplTest extends BaseDbUnitTest { | ||
| 105 | // 构造一个早期时间 2021-02-06 00:00:00 | 105 | // 构造一个早期时间 2021-02-06 00:00:00 |
| 106 | loginLogMapper.insert(ObjectUtils.cloneIgnoreId(loginLogDO, logDO -> logDO.setCreateTime(buildTime(2021, 2, 6)))); | 106 | loginLogMapper.insert(ObjectUtils.cloneIgnoreId(loginLogDO, logDO -> logDO.setCreateTime(buildTime(2021, 2, 6)))); |
| 107 | 107 | ||
| 108 | - | ||
| 109 | // 构造调用参数 | 108 | // 构造调用参数 |
| 110 | LoginLogExportReqVO reqVO = new LoginLogExportReqVO(); | 109 | LoginLogExportReqVO reqVO = new LoginLogExportReqVO(); |
| 111 | reqVO.setUsername("wangxiaokai"); | 110 | reqVO.setUsername("wangxiaokai"); |
| 112 | reqVO.setUserIp("192.168.111"); | 111 | reqVO.setUserIp("192.168.111"); |
| 113 | reqVO.setStatus(true); | 112 | reqVO.setStatus(true); |
| 114 | - reqVO.setBeginTime(buildTime(2021, 3, 5)); | ||
| 115 | - reqVO.setEndTime(buildTime(2021, 3, 7)); | ||
| 116 | - | 113 | + reqVO.setCreateTime((new Date[]{buildTime(2021, 3, 5),buildTime(2021, 3, 5)})); |
| 117 | 114 | ||
| 118 | // 调用service方法 | 115 | // 调用service方法 |
| 119 | List<LoginLogDO> loginLogList = loginLogService.getLoginLogList(reqVO); | 116 | List<LoginLogDO> loginLogList = loginLogService.getLoginLogList(reqVO); |
yudao-module-system/yudao-module-system-biz/src/test/java/cn/iocoder/yudao/module/system/service/logger/OperateLogServiceImplTest.java
| @@ -24,6 +24,7 @@ import org.springframework.context.annotation.Import; | @@ -24,6 +24,7 @@ import org.springframework.context.annotation.Import; | ||
| 24 | 24 | ||
| 25 | import javax.annotation.Resource; | 25 | import javax.annotation.Resource; |
| 26 | import java.util.Collections; | 26 | import java.util.Collections; |
| 27 | +import java.util.Date; | ||
| 27 | import java.util.List; | 28 | import java.util.List; |
| 28 | 29 | ||
| 29 | import static cn.hutool.core.util.RandomUtil.randomEle; | 30 | import static cn.hutool.core.util.RandomUtil.randomEle; |
| @@ -103,8 +104,7 @@ public class OperateLogServiceImplTest extends BaseDbUnitTest { | @@ -103,8 +104,7 @@ public class OperateLogServiceImplTest extends BaseDbUnitTest { | ||
| 103 | reqVO.setUserNickname("wangkai"); | 104 | reqVO.setUserNickname("wangkai"); |
| 104 | reqVO.setModule("order"); | 105 | reqVO.setModule("order"); |
| 105 | reqVO.setType(OperateTypeEnum.CREATE.getType()); | 106 | reqVO.setType(OperateTypeEnum.CREATE.getType()); |
| 106 | - reqVO.setBeginTime(buildTime(2021, 3, 5)); | ||
| 107 | - reqVO.setEndTime(buildTime(2021, 3, 7)); | 107 | + reqVO.setStartTime((new Date[]{buildTime(2021, 3, 5),buildTime(2021, 3, 7)})); |
| 108 | reqVO.setSuccess(true); | 108 | reqVO.setSuccess(true); |
| 109 | 109 | ||
| 110 | // 调用service方法 | 110 | // 调用service方法 |
| @@ -155,8 +155,7 @@ public class OperateLogServiceImplTest extends BaseDbUnitTest { | @@ -155,8 +155,7 @@ public class OperateLogServiceImplTest extends BaseDbUnitTest { | ||
| 155 | reqVO.setUserNickname("wangkai"); | 155 | reqVO.setUserNickname("wangkai"); |
| 156 | reqVO.setModule("order"); | 156 | reqVO.setModule("order"); |
| 157 | reqVO.setType(OperateTypeEnum.CREATE.getType()); | 157 | reqVO.setType(OperateTypeEnum.CREATE.getType()); |
| 158 | - reqVO.setBeginTime(buildTime(2021, 3, 5)); | ||
| 159 | - reqVO.setEndTime(buildTime(2021, 3, 7)); | 158 | + reqVO.setStartTime((new Date[]{buildTime(2021, 3, 5),buildTime(2021, 3, 7)})); |
| 160 | reqVO.setSuccess(true); | 159 | reqVO.setSuccess(true); |
| 161 | 160 | ||
| 162 | // 调用 service 方法 | 161 | // 调用 service 方法 |
yudao-module-system/yudao-module-system-biz/src/test/java/cn/iocoder/yudao/module/system/service/permission/RoleServiceTest.java
| @@ -22,6 +22,7 @@ import javax.annotation.Resource; | @@ -22,6 +22,7 @@ import javax.annotation.Resource; | ||
| 22 | import java.util.*; | 22 | import java.util.*; |
| 23 | import java.util.stream.Collectors; | 23 | import java.util.stream.Collectors; |
| 24 | 24 | ||
| 25 | +import static cn.iocoder.yudao.framework.common.util.date.DateUtils.buildTime; | ||
| 25 | import static cn.iocoder.yudao.framework.common.util.object.ObjectUtils.cloneIgnoreId; | 26 | import static cn.iocoder.yudao.framework.common.util.object.ObjectUtils.cloneIgnoreId; |
| 26 | import static cn.iocoder.yudao.framework.common.util.object.ObjectUtils.max; | 27 | import static cn.iocoder.yudao.framework.common.util.object.ObjectUtils.max; |
| 27 | import static cn.iocoder.yudao.framework.test.core.util.AssertUtils.assertPojoEquals; | 28 | import static cn.iocoder.yudao.framework.test.core.util.AssertUtils.assertPojoEquals; |
| @@ -178,8 +179,7 @@ public class RoleServiceTest extends BaseDbUnitTest { | @@ -178,8 +179,7 @@ public class RoleServiceTest extends BaseDbUnitTest { | ||
| 178 | reqVO.setName("土豆"); | 179 | reqVO.setName("土豆"); |
| 179 | reqVO.setCode("tu"); | 180 | reqVO.setCode("tu"); |
| 180 | reqVO.setStatus(CommonStatusEnum.ENABLE.getStatus()); | 181 | reqVO.setStatus(CommonStatusEnum.ENABLE.getStatus()); |
| 181 | - reqVO.setBeginTime(DateUtils.buildTime(2022, 2, 1)); | ||
| 182 | - reqVO.setEndTime(DateUtils.buildTime(2022, 2, 12)); | 182 | + reqVO.setCreateTime((new Date[]{buildTime(2022, 2, 1),buildTime(2022, 2, 12)})); |
| 183 | 183 | ||
| 184 | // 调用 | 184 | // 调用 |
| 185 | List<RoleDO> list = roleService.getRoleList(reqVO); | 185 | List<RoleDO> list = roleService.getRoleList(reqVO); |
| @@ -209,8 +209,7 @@ public class RoleServiceTest extends BaseDbUnitTest { | @@ -209,8 +209,7 @@ public class RoleServiceTest extends BaseDbUnitTest { | ||
| 209 | reqVO.setName("土豆"); | 209 | reqVO.setName("土豆"); |
| 210 | reqVO.setCode("tu"); | 210 | reqVO.setCode("tu"); |
| 211 | reqVO.setStatus(CommonStatusEnum.ENABLE.getStatus()); | 211 | reqVO.setStatus(CommonStatusEnum.ENABLE.getStatus()); |
| 212 | - reqVO.setBeginTime(DateUtils.buildTime(2022, 2, 1)); | ||
| 213 | - reqVO.setEndTime(DateUtils.buildTime(2022, 2, 12)); | 212 | + reqVO.setCreateTime((new Date[]{buildTime(2022, 2, 1),buildTime(2022, 2, 12)})); |
| 214 | 213 | ||
| 215 | // 调用 | 214 | // 调用 |
| 216 | PageResult<RoleDO> pageResult = roleService.getRolePage(reqVO); | 215 | PageResult<RoleDO> pageResult = roleService.getRolePage(reqVO); |
yudao-module-system/yudao-module-system-biz/src/test/java/cn/iocoder/yudao/module/system/service/sensitiveword/SensitiveWordServiceImplTest.java
| @@ -18,8 +18,10 @@ import org.springframework.context.annotation.Import; | @@ -18,8 +18,10 @@ import org.springframework.context.annotation.Import; | ||
| 18 | 18 | ||
| 19 | import javax.annotation.Resource; | 19 | import javax.annotation.Resource; |
| 20 | import java.util.Arrays; | 20 | import java.util.Arrays; |
| 21 | +import java.util.Date; | ||
| 21 | import java.util.List; | 22 | import java.util.List; |
| 22 | 23 | ||
| 24 | +import static cn.iocoder.yudao.framework.common.util.date.DateUtils.buildTime; | ||
| 23 | import static cn.iocoder.yudao.framework.common.util.object.ObjectUtils.cloneIgnoreId; | 25 | import static cn.iocoder.yudao.framework.common.util.object.ObjectUtils.cloneIgnoreId; |
| 24 | import static cn.iocoder.yudao.framework.common.util.object.ObjectUtils.max; | 26 | import static cn.iocoder.yudao.framework.common.util.object.ObjectUtils.max; |
| 25 | import static cn.iocoder.yudao.framework.test.core.util.AssertUtils.assertPojoEquals; | 27 | import static cn.iocoder.yudao.framework.test.core.util.AssertUtils.assertPojoEquals; |
| @@ -157,8 +159,7 @@ public class SensitiveWordServiceImplTest extends BaseDbUnitTest { | @@ -157,8 +159,7 @@ public class SensitiveWordServiceImplTest extends BaseDbUnitTest { | ||
| 157 | reqVO.setName("笨"); | 159 | reqVO.setName("笨"); |
| 158 | reqVO.setTag("论坛"); | 160 | reqVO.setTag("论坛"); |
| 159 | reqVO.setStatus(CommonStatusEnum.ENABLE.getStatus()); | 161 | reqVO.setStatus(CommonStatusEnum.ENABLE.getStatus()); |
| 160 | - reqVO.setBeginCreateTime(DateUtils.buildTime(2022, 2, 1)); | ||
| 161 | - reqVO.setEndCreateTime(DateUtils.buildTime(2022, 2, 12)); | 162 | + reqVO.setCreateTime((new Date[]{buildTime(2022, 2, 1),buildTime(2022, 2, 12)})); |
| 162 | 163 | ||
| 163 | // 调用 | 164 | // 调用 |
| 164 | PageResult<SensitiveWordDO> pageResult = sensitiveWordService.getSensitiveWordPage(reqVO); | 165 | PageResult<SensitiveWordDO> pageResult = sensitiveWordService.getSensitiveWordPage(reqVO); |
| @@ -189,8 +190,7 @@ public class SensitiveWordServiceImplTest extends BaseDbUnitTest { | @@ -189,8 +190,7 @@ public class SensitiveWordServiceImplTest extends BaseDbUnitTest { | ||
| 189 | reqVO.setName("笨"); | 190 | reqVO.setName("笨"); |
| 190 | reqVO.setTag("论坛"); | 191 | reqVO.setTag("论坛"); |
| 191 | reqVO.setStatus(CommonStatusEnum.ENABLE.getStatus()); | 192 | reqVO.setStatus(CommonStatusEnum.ENABLE.getStatus()); |
| 192 | - reqVO.setBeginCreateTime(DateUtils.buildTime(2022, 2, 1)); | ||
| 193 | - reqVO.setEndCreateTime(DateUtils.buildTime(2022, 2, 12)); | 193 | + reqVO.setCreateTime((new Date[]{buildTime(2022, 2, 1),buildTime(2022, 2, 12)})); |
| 194 | 194 | ||
| 195 | // 调用 | 195 | // 调用 |
| 196 | List<SensitiveWordDO> list = sensitiveWordService.getSensitiveWordList(reqVO); | 196 | List<SensitiveWordDO> list = sensitiveWordService.getSensitiveWordList(reqVO); |
yudao-module-system/yudao-module-system-biz/src/test/java/cn/iocoder/yudao/module/system/service/sms/SmsChannelServiceTest.java
| @@ -172,8 +172,7 @@ public class SmsChannelServiceTest extends BaseDbUnitTest { | @@ -172,8 +172,7 @@ public class SmsChannelServiceTest extends BaseDbUnitTest { | ||
| 172 | SmsChannelPageReqVO reqVO = new SmsChannelPageReqVO(); | 172 | SmsChannelPageReqVO reqVO = new SmsChannelPageReqVO(); |
| 173 | reqVO.setSignature("芋道"); | 173 | reqVO.setSignature("芋道"); |
| 174 | reqVO.setStatus(CommonStatusEnum.ENABLE.getStatus()); | 174 | reqVO.setStatus(CommonStatusEnum.ENABLE.getStatus()); |
| 175 | - reqVO.setBeginCreateTime(buildTime(2020, 12, 1)); | ||
| 176 | - reqVO.setEndCreateTime(buildTime(2020, 12, 24)); | 175 | + reqVO.setCreateTime((new Date[]{buildTime(2020, 12, 1),buildTime(2020, 12, 24)})); |
| 177 | 176 | ||
| 178 | // 调用 | 177 | // 调用 |
| 179 | PageResult<SmsChannelDO> pageResult = smsChannelService.getSmsChannelPage(reqVO); | 178 | PageResult<SmsChannelDO> pageResult = smsChannelService.getSmsChannelPage(reqVO); |
yudao-module-system/yudao-module-system-biz/src/test/java/cn/iocoder/yudao/module/system/service/sms/SmsLogServiceTest.java
| @@ -74,11 +74,9 @@ public class SmsLogServiceTest extends BaseDbUnitTest { | @@ -74,11 +74,9 @@ public class SmsLogServiceTest extends BaseDbUnitTest { | ||
| 74 | reqVO.setTemplateId(10L); | 74 | reqVO.setTemplateId(10L); |
| 75 | reqVO.setMobile("156"); | 75 | reqVO.setMobile("156"); |
| 76 | reqVO.setSendStatus(SmsSendStatusEnum.INIT.getStatus()); | 76 | reqVO.setSendStatus(SmsSendStatusEnum.INIT.getStatus()); |
| 77 | - reqVO.setBeginSendTime(buildTime(2020, 11, 1)); | ||
| 78 | - reqVO.setEndSendTime(buildTime(2020, 11, 30)); | 77 | + reqVO.setSendTime((new Date[]{buildTime(2020, 11, 1),buildTime(2020, 11, 30)})); |
| 79 | reqVO.setReceiveStatus(SmsReceiveStatusEnum.INIT.getStatus()); | 78 | reqVO.setReceiveStatus(SmsReceiveStatusEnum.INIT.getStatus()); |
| 80 | - reqVO.setBeginReceiveTime(buildTime(2021, 11, 1)); | ||
| 81 | - reqVO.setEndReceiveTime(buildTime(2021, 11, 30)); | 79 | + reqVO.setReceiveTime((new Date[]{buildTime(2021, 11, 1),buildTime(2021, 11, 30)})); |
| 82 | 80 | ||
| 83 | // 调用 | 81 | // 调用 |
| 84 | PageResult<SmsLogDO> pageResult = smsLogService.getSmsLogPage(reqVO); | 82 | PageResult<SmsLogDO> pageResult = smsLogService.getSmsLogPage(reqVO); |
| @@ -121,11 +119,9 @@ public class SmsLogServiceTest extends BaseDbUnitTest { | @@ -121,11 +119,9 @@ public class SmsLogServiceTest extends BaseDbUnitTest { | ||
| 121 | reqVO.setTemplateId(10L); | 119 | reqVO.setTemplateId(10L); |
| 122 | reqVO.setMobile("156"); | 120 | reqVO.setMobile("156"); |
| 123 | reqVO.setSendStatus(SmsSendStatusEnum.INIT.getStatus()); | 121 | reqVO.setSendStatus(SmsSendStatusEnum.INIT.getStatus()); |
| 124 | - reqVO.setBeginSendTime(buildTime(2020, 11, 1)); | ||
| 125 | - reqVO.setEndSendTime(buildTime(2020, 11, 30)); | 122 | + reqVO.setSendTime((new Date[]{buildTime(2020, 11, 1),buildTime(2020, 11, 30)})); |
| 126 | reqVO.setReceiveStatus(SmsReceiveStatusEnum.INIT.getStatus()); | 123 | reqVO.setReceiveStatus(SmsReceiveStatusEnum.INIT.getStatus()); |
| 127 | - reqVO.setBeginReceiveTime(buildTime(2021, 11, 1)); | ||
| 128 | - reqVO.setEndReceiveTime(buildTime(2021, 11, 30)); | 124 | + reqVO.setReceiveTime((new Date[]{buildTime(2021, 11, 1),buildTime(2021, 11, 30)})); |
| 129 | 125 | ||
| 130 | // 调用 | 126 | // 调用 |
| 131 | List<SmsLogDO> list = smsLogService.getSmsLogList(reqVO); | 127 | List<SmsLogDO> list = smsLogService.getSmsLogList(reqVO); |
yudao-module-system/yudao-module-system-biz/src/test/java/cn/iocoder/yudao/module/system/service/sms/SmsTemplateServiceTest.java
| @@ -230,8 +230,7 @@ public class SmsTemplateServiceTest extends BaseDbUnitTest { | @@ -230,8 +230,7 @@ public class SmsTemplateServiceTest extends BaseDbUnitTest { | ||
| 230 | reqVO.setContent("芋道"); | 230 | reqVO.setContent("芋道"); |
| 231 | reqVO.setApiTemplateId("yu"); | 231 | reqVO.setApiTemplateId("yu"); |
| 232 | reqVO.setChannelId(1L); | 232 | reqVO.setChannelId(1L); |
| 233 | - reqVO.setBeginCreateTime(buildTime(2021, 11, 1)); | ||
| 234 | - reqVO.setEndCreateTime(buildTime(2021, 12, 1)); | 233 | + reqVO.setCreateTime((new Date[]{buildTime(2021, 11, 1),buildTime(2021, 12, 1)})); |
| 235 | 234 | ||
| 236 | // 调用 | 235 | // 调用 |
| 237 | PageResult<SmsTemplateDO> pageResult = smsTemplateService.getSmsTemplatePage(reqVO); | 236 | PageResult<SmsTemplateDO> pageResult = smsTemplateService.getSmsTemplatePage(reqVO); |
| @@ -276,8 +275,7 @@ public class SmsTemplateServiceTest extends BaseDbUnitTest { | @@ -276,8 +275,7 @@ public class SmsTemplateServiceTest extends BaseDbUnitTest { | ||
| 276 | reqVO.setContent("芋道"); | 275 | reqVO.setContent("芋道"); |
| 277 | reqVO.setApiTemplateId("yu"); | 276 | reqVO.setApiTemplateId("yu"); |
| 278 | reqVO.setChannelId(1L); | 277 | reqVO.setChannelId(1L); |
| 279 | - reqVO.setBeginCreateTime(buildTime(2021, 11, 1)); | ||
| 280 | - reqVO.setEndCreateTime(buildTime(2021, 12, 1)); | 278 | + reqVO.setCreateTime((new Date[]{buildTime(2021, 11, 1),buildTime(2021, 12, 1)})); |
| 281 | 279 | ||
| 282 | // 调用 | 280 | // 调用 |
| 283 | List<SmsTemplateDO> list = smsTemplateService.getSmsTemplateList(reqVO); | 281 | List<SmsTemplateDO> list = smsTemplateService.getSmsTemplateList(reqVO); |
yudao-module-system/yudao-module-system-biz/src/test/java/cn/iocoder/yudao/module/system/service/tenant/TenantPackageServiceImplTest.java
| @@ -15,6 +15,8 @@ import org.springframework.context.annotation.Import; | @@ -15,6 +15,8 @@ import org.springframework.context.annotation.Import; | ||
| 15 | 15 | ||
| 16 | import javax.annotation.Resource; | 16 | import javax.annotation.Resource; |
| 17 | 17 | ||
| 18 | +import java.util.Date; | ||
| 19 | + | ||
| 18 | import static cn.iocoder.yudao.framework.common.util.date.DateUtils.buildTime; | 20 | import static cn.iocoder.yudao.framework.common.util.date.DateUtils.buildTime; |
| 19 | import static cn.iocoder.yudao.framework.common.util.object.ObjectUtils.cloneIgnoreId; | 21 | import static cn.iocoder.yudao.framework.common.util.object.ObjectUtils.cloneIgnoreId; |
| 20 | import static cn.iocoder.yudao.framework.test.core.util.AssertUtils.assertPojoEquals; | 22 | import static cn.iocoder.yudao.framework.test.core.util.AssertUtils.assertPojoEquals; |
| @@ -156,8 +158,7 @@ public class TenantPackageServiceImplTest extends BaseDbUnitTest { | @@ -156,8 +158,7 @@ public class TenantPackageServiceImplTest extends BaseDbUnitTest { | ||
| 156 | reqVO.setName("芋道"); | 158 | reqVO.setName("芋道"); |
| 157 | reqVO.setStatus(CommonStatusEnum.ENABLE.getStatus()); | 159 | reqVO.setStatus(CommonStatusEnum.ENABLE.getStatus()); |
| 158 | reqVO.setRemark("源码"); | 160 | reqVO.setRemark("源码"); |
| 159 | - reqVO.setBeginCreateTime(buildTime(2022, 10, 9)); | ||
| 160 | - reqVO.setEndCreateTime(buildTime(2022, 10, 11)); | 161 | + reqVO.setCreateTime((new Date[]{buildTime(2022, 10, 9),buildTime(2022, 10, 11)})); |
| 161 | 162 | ||
| 162 | // 调用 | 163 | // 调用 |
| 163 | PageResult<TenantPackageDO> pageResult = tenantPackageService.getTenantPackagePage(reqVO); | 164 | PageResult<TenantPackageDO> pageResult = tenantPackageService.getTenantPackagePage(reqVO); |
yudao-module-system/yudao-module-system-biz/src/test/java/cn/iocoder/yudao/module/system/service/tenant/TenantServiceImplTest.java
| @@ -31,6 +31,7 @@ import javax.annotation.Resource; | @@ -31,6 +31,7 @@ import javax.annotation.Resource; | ||
| 31 | import java.time.Duration; | 31 | import java.time.Duration; |
| 32 | import java.util.Arrays; | 32 | import java.util.Arrays; |
| 33 | import java.util.Collections; | 33 | import java.util.Collections; |
| 34 | +import java.util.Date; | ||
| 34 | import java.util.List; | 35 | import java.util.List; |
| 35 | 36 | ||
| 36 | import static cn.iocoder.yudao.framework.common.util.collection.SetUtils.asSet; | 37 | import static cn.iocoder.yudao.framework.common.util.collection.SetUtils.asSet; |
| @@ -311,8 +312,7 @@ public class TenantServiceImplTest extends BaseDbUnitTest { | @@ -311,8 +312,7 @@ public class TenantServiceImplTest extends BaseDbUnitTest { | ||
| 311 | reqVO.setContactName("艿"); | 312 | reqVO.setContactName("艿"); |
| 312 | reqVO.setContactMobile("1560"); | 313 | reqVO.setContactMobile("1560"); |
| 313 | reqVO.setStatus(CommonStatusEnum.ENABLE.getStatus()); | 314 | reqVO.setStatus(CommonStatusEnum.ENABLE.getStatus()); |
| 314 | - reqVO.setBeginCreateTime(buildTime(2020, 12, 1)); | ||
| 315 | - reqVO.setEndCreateTime(buildTime(2020, 12, 24)); | 315 | + reqVO.setCreateTime(new Date[]{buildTime(2020, 12, 1),buildTime(2020, 12, 24)}); |
| 316 | 316 | ||
| 317 | // 调用 | 317 | // 调用 |
| 318 | PageResult<TenantDO> pageResult = tenantService.getTenantPage(reqVO); | 318 | PageResult<TenantDO> pageResult = tenantService.getTenantPage(reqVO); |
| @@ -349,8 +349,7 @@ public class TenantServiceImplTest extends BaseDbUnitTest { | @@ -349,8 +349,7 @@ public class TenantServiceImplTest extends BaseDbUnitTest { | ||
| 349 | reqVO.setContactName("艿"); | 349 | reqVO.setContactName("艿"); |
| 350 | reqVO.setContactMobile("1560"); | 350 | reqVO.setContactMobile("1560"); |
| 351 | reqVO.setStatus(CommonStatusEnum.ENABLE.getStatus()); | 351 | reqVO.setStatus(CommonStatusEnum.ENABLE.getStatus()); |
| 352 | - reqVO.setBeginCreateTime(buildTime(2020, 12, 1)); | ||
| 353 | - reqVO.setEndCreateTime(buildTime(2020, 12, 24)); | 352 | + reqVO.setCreateTime(new Date[]{buildTime(2020, 12, 1),buildTime(2020, 12, 24)}); |
| 354 | 353 | ||
| 355 | // 调用 | 354 | // 调用 |
| 356 | List<TenantDO> list = tenantService.getTenantList(reqVO); | 355 | List<TenantDO> list = tenantService.getTenantList(reqVO); |
yudao-module-system/yudao-module-system-biz/src/test/java/cn/iocoder/yudao/module/system/service/user/AdminUserServiceImplTest.java
| @@ -33,6 +33,7 @@ import org.springframework.security.crypto.password.PasswordEncoder; | @@ -33,6 +33,7 @@ import org.springframework.security.crypto.password.PasswordEncoder; | ||
| 33 | import javax.annotation.Resource; | 33 | import javax.annotation.Resource; |
| 34 | import java.io.ByteArrayInputStream; | 34 | import java.io.ByteArrayInputStream; |
| 35 | import java.util.Collection; | 35 | import java.util.Collection; |
| 36 | +import java.util.Date; | ||
| 36 | import java.util.List; | 37 | import java.util.List; |
| 37 | import java.util.function.Consumer; | 38 | import java.util.function.Consumer; |
| 38 | 39 | ||
| @@ -294,8 +295,7 @@ public class AdminUserServiceImplTest extends BaseDbUnitTest { | @@ -294,8 +295,7 @@ public class AdminUserServiceImplTest extends BaseDbUnitTest { | ||
| 294 | reqVO.setUsername("tu"); | 295 | reqVO.setUsername("tu"); |
| 295 | reqVO.setMobile("1560"); | 296 | reqVO.setMobile("1560"); |
| 296 | reqVO.setStatus(CommonStatusEnum.ENABLE.getStatus()); | 297 | reqVO.setStatus(CommonStatusEnum.ENABLE.getStatus()); |
| 297 | - reqVO.setBeginTime(buildTime(2020, 12, 1)); | ||
| 298 | - reqVO.setEndTime(buildTime(2020, 12, 24)); | 298 | + reqVO.setCreateTime((new Date[]{buildTime(2020, 12, 1),buildTime(2020, 12, 24)})); |
| 299 | reqVO.setDeptId(1L); // 其中,1L 是 2L 的父部门 | 299 | reqVO.setDeptId(1L); // 其中,1L 是 2L 的父部门 |
| 300 | // mock 方法 | 300 | // mock 方法 |
| 301 | List<DeptDO> deptList = newArrayList(randomPojo(DeptDO.class, o -> o.setId(2L))); | 301 | List<DeptDO> deptList = newArrayList(randomPojo(DeptDO.class, o -> o.setId(2L))); |
| @@ -318,8 +318,7 @@ public class AdminUserServiceImplTest extends BaseDbUnitTest { | @@ -318,8 +318,7 @@ public class AdminUserServiceImplTest extends BaseDbUnitTest { | ||
| 318 | reqVO.setUsername("tu"); | 318 | reqVO.setUsername("tu"); |
| 319 | reqVO.setMobile("1560"); | 319 | reqVO.setMobile("1560"); |
| 320 | reqVO.setStatus(CommonStatusEnum.ENABLE.getStatus()); | 320 | reqVO.setStatus(CommonStatusEnum.ENABLE.getStatus()); |
| 321 | - reqVO.setBeginTime(buildTime(2020, 12, 1)); | ||
| 322 | - reqVO.setEndTime(buildTime(2020, 12, 24)); | 321 | + reqVO.setCreateTime((new Date[]{buildTime(2020, 12, 1),buildTime(2020, 12, 24)})); |
| 323 | reqVO.setDeptId(1L); // 其中,1L 是 2L 的父部门 | 322 | reqVO.setDeptId(1L); // 其中,1L 是 2L 的父部门 |
| 324 | // mock 方法 | 323 | // mock 方法 |
| 325 | List<DeptDO> deptList = newArrayList(randomPojo(DeptDO.class, o -> o.setId(2L))); | 324 | List<DeptDO> deptList = newArrayList(randomPojo(DeptDO.class, o -> o.setId(2L))); |