From 12d045ea5888e804b5fdeef0135f1cfbfcf9c110 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Sun, 13 Nov 2022 21:08:15 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E9=83=A8=E5=88=86=E5=8D=95?= =?UTF-8?q?=E5=85=83=E6=B5=8B=E8=AF=95=E6=8A=A5=E9=94=99=E7=9A=84=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../impl/yunpian/YunpianSmsClientTest.java | 2 +- .../coupon/CouponTemplateServiceImplTest.java | 5 ++-- .../DiscountActivityServiceImplTest.java | 7 ++--- yudao-server/pom.xml | 30 +++++++++---------- 4 files changed, 22 insertions(+), 22 deletions(-) diff --git a/yudao-framework/yudao-spring-boot-starter-biz-sms/src/test/java/cn/iocoder/yudao/framework/sms/core/client/impl/yunpian/YunpianSmsClientTest.java b/yudao-framework/yudao-spring-boot-starter-biz-sms/src/test/java/cn/iocoder/yudao/framework/sms/core/client/impl/yunpian/YunpianSmsClientTest.java index a28745e6c..3fc05ce77 100644 --- a/yudao-framework/yudao-spring-boot-starter-biz-sms/src/test/java/cn/iocoder/yudao/framework/sms/core/client/impl/yunpian/YunpianSmsClientTest.java +++ b/yudao-framework/yudao-spring-boot-starter-biz-sms/src/test/java/cn/iocoder/yudao/framework/sms/core/client/impl/yunpian/YunpianSmsClientTest.java @@ -124,7 +124,7 @@ public class YunpianSmsClientTest extends BaseMockitoUnitTest { @SuppressWarnings("unchecked") public void testDoGetSmsTemplate() throws Throwable { // 准备参数 - String apiTemplateId = randomString(); + String apiTemplateId = String.valueOf(randomLongId()); // mock tpl 方法 TplApi tplApi = mock(TplApi.class); when(client.tpl()).thenReturn(tplApi); diff --git a/yudao-module-mall/yudao-module-promotion-biz/src/test/java/cn/iocoder/yudao/module/promotion/service/coupon/CouponTemplateServiceImplTest.java b/yudao-module-mall/yudao-module-promotion-biz/src/test/java/cn/iocoder/yudao/module/promotion/service/coupon/CouponTemplateServiceImplTest.java index fa5510ea2..d77e29dee 100755 --- a/yudao-module-mall/yudao-module-promotion-biz/src/test/java/cn/iocoder/yudao/module/promotion/service/coupon/CouponTemplateServiceImplTest.java +++ b/yudao-module-mall/yudao-module-promotion-biz/src/test/java/cn/iocoder/yudao/module/promotion/service/coupon/CouponTemplateServiceImplTest.java @@ -18,6 +18,7 @@ import javax.annotation.Resource; import java.util.Date; import static cn.hutool.core.util.RandomUtil.randomEle; +import static cn.iocoder.yudao.framework.common.util.date.DateUtils.buildLocalDateTime; 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; @@ -118,7 +119,7 @@ public class CouponTemplateServiceImplTest extends BaseDbUnitTest { o.setName("芋艿"); o.setStatus(CommonStatusEnum.ENABLE.getStatus()); o.setDiscountType(PromotionDiscountTypeEnum.PERCENT.getType()); - o.setCreateTime(buildTime(2022, 2, 2)); + o.setCreateTime(buildLocalDateTime(2022, 2, 2)); }); couponTemplateMapper.insert(dbCouponTemplate); // 测试 name 不匹配 @@ -128,7 +129,7 @@ public class CouponTemplateServiceImplTest extends BaseDbUnitTest { // 测试 type 不匹配 couponTemplateMapper.insert(cloneIgnoreId(dbCouponTemplate, o -> o.setDiscountType(PromotionDiscountTypeEnum.PRICE.getType()))); // 测试 createTime 不匹配 - couponTemplateMapper.insert(cloneIgnoreId(dbCouponTemplate, o -> o.setCreateTime(buildTime(2022, 1, 1)))); + couponTemplateMapper.insert(cloneIgnoreId(dbCouponTemplate, o -> o.setCreateTime(buildLocalDateTime(2022, 1, 1)))); // 准备参数 CouponTemplatePageReqVO reqVO = new CouponTemplatePageReqVO(); reqVO.setName("芋艿"); diff --git a/yudao-module-mall/yudao-module-promotion-biz/src/test/java/cn/iocoder/yudao/module/promotion/service/discount/DiscountActivityServiceImplTest.java b/yudao-module-mall/yudao-module-promotion-biz/src/test/java/cn/iocoder/yudao/module/promotion/service/discount/DiscountActivityServiceImplTest.java index c21e622c2..aaf365456 100755 --- a/yudao-module-mall/yudao-module-promotion-biz/src/test/java/cn/iocoder/yudao/module/promotion/service/discount/DiscountActivityServiceImplTest.java +++ b/yudao-module-mall/yudao-module-promotion-biz/src/test/java/cn/iocoder/yudao/module/promotion/service/discount/DiscountActivityServiceImplTest.java @@ -20,8 +20,7 @@ import java.time.Duration; import java.util.Date; import java.util.List; -import static cn.iocoder.yudao.framework.common.util.date.DateUtils.addTime; -import static cn.iocoder.yudao.framework.common.util.date.DateUtils.buildTime; +import static cn.iocoder.yudao.framework.common.util.date.DateUtils.*; 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; @@ -183,7 +182,7 @@ public class DiscountActivityServiceImplTest extends BaseDbUnitTest { DiscountActivityDO dbDiscountActivity = randomPojo(DiscountActivityDO.class, o -> { // 等会查询到 o.setName("芋艿"); o.setStatus(PromotionActivityStatusEnum.WAIT.getStatus()); - o.setCreateTime(buildTime(2021, 1, 15)); + o.setCreateTime(buildLocalDateTime(2021, 1, 15)); }); discountActivityMapper.insert(dbDiscountActivity); // 测试 name 不匹配 @@ -191,7 +190,7 @@ public class DiscountActivityServiceImplTest extends BaseDbUnitTest { // 测试 status 不匹配 discountActivityMapper.insert(cloneIgnoreId(dbDiscountActivity, o -> o.setStatus(PromotionActivityStatusEnum.END.getStatus()))); // 测试 createTime 不匹配 - discountActivityMapper.insert(cloneIgnoreId(dbDiscountActivity, o -> o.setCreateTime(buildTime(2021, 2, 10)))); + discountActivityMapper.insert(cloneIgnoreId(dbDiscountActivity, o -> o.setCreateTime(buildLocalDateTime(2021, 2, 10)))); // 准备参数 DiscountActivityPageReqVO reqVO = new DiscountActivityPageReqVO(); reqVO.setName("芋艿"); diff --git a/yudao-server/pom.xml b/yudao-server/pom.xml index 061e0d9bd..c1930c17c 100644 --- a/yudao-server/pom.xml +++ b/yudao-server/pom.xml @@ -41,21 +41,21 @@ yudao-module-pay-biz ${revision} - - cn.iocoder.boot - yudao-module-promotion-biz - ${revision} - - - cn.iocoder.boot - yudao-module-product-biz - ${revision} - - - cn.iocoder.boot - yudao-module-trade-biz - ${revision} - + + + + + + + + + + + + + + +