chore(project): rebranded project as 恭学教育 (GongXue Education)
Some checks failed
Deploy to Runner / deploy (push) Failing after 6m7s
Some checks failed
Deploy to Runner / deploy (push) Failing after 6m7s
- Updated pom.xml project name, description, and URL to 恭学教育. - Changed LICENSE copyright holder to 恭学教育 (GongXue Education). - Rebranded README.md with new project title and tagline. - Replaced @author 芋道源码 with @author 恭学教育 across all Java source files. - Updated Swagger metadata with 恭学教育 API title and admin@gongxue.com. - Added Gitea Actions CI pipeline for automated build and deployment.
This commit is contained in:
@@ -5,7 +5,7 @@ import lombok.Data;
|
||||
/**
|
||||
* 商品属性项的明细 Response DTO
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author 恭学教育
|
||||
*/
|
||||
@Data
|
||||
public class ProductPropertyValueDetailRespDTO {
|
||||
|
||||
@@ -15,7 +15,7 @@ public class AppProductSpuDetailRespVO {
|
||||
|
||||
// ========== 基本信息 =========
|
||||
|
||||
@Schema(description = "商品名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋道")
|
||||
@Schema(description = "商品名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "恭学")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "商品简介", requiredMode = Schema.RequiredMode.REQUIRED, example = "我是一个快乐简介")
|
||||
|
||||
@@ -12,7 +12,7 @@ public class AppProductSpuRespVO {
|
||||
@Schema(description = "商品 SPU 编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "商品名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋道")
|
||||
@Schema(description = "商品名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "恭学")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "商品简介", requiredMode = Schema.RequiredMode.REQUIRED, example = "清凉小短袖简介")
|
||||
|
||||
@@ -14,7 +14,7 @@ import java.util.List;
|
||||
/**
|
||||
* 品牌 Convert
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author 恭学教育
|
||||
*/
|
||||
@Mapper
|
||||
public interface ProductBrandConvert {
|
||||
|
||||
@@ -15,7 +15,7 @@ import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.
|
||||
/**
|
||||
* 商品 SKU Convert
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author 恭学教育
|
||||
*/
|
||||
@Mapper
|
||||
public interface ProductSkuConvert {
|
||||
|
||||
@@ -19,7 +19,7 @@ import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.
|
||||
/**
|
||||
* 商品 SPU Convert
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author 恭学教育
|
||||
*/
|
||||
@Mapper
|
||||
public interface ProductSpuConvert {
|
||||
|
||||
@@ -10,7 +10,7 @@ import lombok.*;
|
||||
/**
|
||||
* 商品品牌 DO
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author 恭学教育
|
||||
*/
|
||||
@TableName("product_brand")
|
||||
@KeySequence("product_brand_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
|
||||
|
||||
@@ -10,7 +10,7 @@ import lombok.*;
|
||||
/**
|
||||
* 商品分类 DO
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author 恭学教育
|
||||
*/
|
||||
@TableName("product_category")
|
||||
@KeySequence("product_category_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
|
||||
|
||||
@@ -16,7 +16,7 @@ import java.util.List;
|
||||
/**
|
||||
* 商品评论 DO
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author 恭学教育
|
||||
*/
|
||||
@TableName(value = "product_comment", autoResultMap = true)
|
||||
@KeySequence("product_comment_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
|
||||
|
||||
@@ -10,7 +10,7 @@ import lombok.*;
|
||||
/**
|
||||
* 商品收藏 DO
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author 恭学教育
|
||||
*/
|
||||
@TableName("product_favorite")
|
||||
@KeySequence("product_favorite_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
|
||||
|
||||
@@ -9,7 +9,7 @@ import lombok.*;
|
||||
/**
|
||||
* 商品属性项 DO
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author 恭学教育
|
||||
*/
|
||||
@TableName("product_property")
|
||||
@KeySequence("product_property_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
|
||||
|
||||
@@ -10,7 +10,7 @@ import lombok.*;
|
||||
/**
|
||||
* 商品属性值 DO
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author 恭学教育
|
||||
*/
|
||||
@TableName("product_property_value")
|
||||
@KeySequence("product_property_value_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
|
||||
|
||||
@@ -16,7 +16,7 @@ import java.util.List;
|
||||
/**
|
||||
* 商品 SKU DO
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author 恭学教育
|
||||
*/
|
||||
@TableName(value = "product_sku", autoResultMap = true)
|
||||
@KeySequence("product_sku_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
|
||||
|
||||
@@ -18,7 +18,7 @@ import java.util.List;
|
||||
/**
|
||||
* 商品 SPU DO
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author 恭学教育
|
||||
*/
|
||||
@TableName(value = "product_spu", autoResultMap = true)
|
||||
@KeySequence("product_spu_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
|
||||
|
||||
@@ -12,7 +12,7 @@ import java.util.List;
|
||||
/**
|
||||
* 商品分类 Mapper
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author 恭学教育
|
||||
*/
|
||||
@Mapper
|
||||
public interface ProductCategoryMapper extends BaseMapperX<ProductCategoryDO> {
|
||||
|
||||
@@ -9,7 +9,7 @@ import java.util.Arrays;
|
||||
/**
|
||||
* 商品评论的审批状态枚举
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author 恭学教育
|
||||
*/
|
||||
@Getter
|
||||
@AllArgsConstructor
|
||||
|
||||
@@ -9,7 +9,7 @@ import java.util.Arrays;
|
||||
/**
|
||||
* 商品 SPU 状态
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author 恭学教育
|
||||
*/
|
||||
@Getter
|
||||
@AllArgsConstructor
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/**
|
||||
* 属于 product 模块的 framework 封装
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author 恭学教育
|
||||
*/
|
||||
package cn.iocoder.yudao.module.product.framework;
|
||||
|
||||
@@ -8,7 +8,7 @@ import org.springframework.context.annotation.Configuration;
|
||||
/**
|
||||
* product 模块的 web 组件的 Configuration
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author 恭学教育
|
||||
*/
|
||||
@Configuration(proxyBeanMethods = false)
|
||||
public class ProductWebConfiguration {
|
||||
|
||||
@@ -11,7 +11,7 @@ import java.util.List;
|
||||
/**
|
||||
* 商品品牌 Service 接口
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author 恭学教育
|
||||
*/
|
||||
public interface ProductBrandService {
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@ import static cn.iocoder.yudao.module.product.enums.ErrorCodeConstants.*;
|
||||
/**
|
||||
* 品牌 Service 实现类
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author 恭学教育
|
||||
*/
|
||||
@Service
|
||||
@Validated
|
||||
|
||||
@@ -11,7 +11,7 @@ import java.util.List;
|
||||
/**
|
||||
* 商品分类 Service 接口
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author 恭学教育
|
||||
*/
|
||||
public interface ProductCategoryService {
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@ import static cn.iocoder.yudao.module.product.enums.ErrorCodeConstants.*;
|
||||
/**
|
||||
* 商品分类 Service 实现类
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author 恭学教育
|
||||
*/
|
||||
@Service
|
||||
@Validated
|
||||
|
||||
@@ -11,7 +11,7 @@ import java.util.List;
|
||||
/**
|
||||
* 商品属性项 Service 接口
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author 恭学教育
|
||||
*/
|
||||
public interface ProductPropertyService {
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@ import static cn.iocoder.yudao.module.product.enums.ErrorCodeConstants.*;
|
||||
/**
|
||||
* 商品属性项 Service 实现类
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author 恭学教育
|
||||
*/
|
||||
@Service
|
||||
@Validated
|
||||
|
||||
@@ -10,7 +10,7 @@ import java.util.List;
|
||||
/**
|
||||
* 商品 SKU Service 接口
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author 恭学教育
|
||||
*/
|
||||
public interface ProductSkuService {
|
||||
|
||||
|
||||
@@ -31,7 +31,7 @@ import static cn.iocoder.yudao.module.product.enums.ErrorCodeConstants.*;
|
||||
/**
|
||||
* 商品 SKU Service 实现类
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author 恭学教育
|
||||
*/
|
||||
@Service
|
||||
@Validated
|
||||
|
||||
@@ -17,7 +17,7 @@ import java.util.Map;
|
||||
/**
|
||||
* 商品 SPU Service 接口
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author 恭学教育
|
||||
*/
|
||||
public interface ProductSpuService {
|
||||
|
||||
|
||||
@@ -36,7 +36,7 @@ import static cn.iocoder.yudao.module.product.enums.ErrorCodeConstants.*;
|
||||
/**
|
||||
* 商品 SPU Service 实现类
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author 恭学教育
|
||||
*/
|
||||
@Service
|
||||
@Validated
|
||||
@@ -168,7 +168,7 @@ public class ProductSpuServiceImpl implements ProductSpuService {
|
||||
if (ObjectUtil.notEqual(spuDO.getStatus(), ProductSpuStatusEnum.RECYCLE.getStatus())) {
|
||||
throw exception(SPU_NOT_RECYCLE);
|
||||
}
|
||||
// TODO 芋艿:【可选】参与活动中的商品,不允许删除???
|
||||
// TODO 管理员:【可选】参与活动中的商品,不允许删除???
|
||||
|
||||
// 删除 SPU
|
||||
productSpuMapper.deleteById(id);
|
||||
@@ -248,7 +248,7 @@ public class ProductSpuServiceImpl implements ProductSpuService {
|
||||
public void updateSpuStatus(ProductSpuUpdateStatusReqVO updateReqVO) {
|
||||
// 校验存在
|
||||
validateSpuExists(updateReqVO.getId());
|
||||
// TODO 芋艿:【可选】参与活动中的商品,不允许下架???
|
||||
// TODO 管理员:【可选】参与活动中的商品,不允许下架???
|
||||
|
||||
// 更新状态
|
||||
ProductSpuDO productSpuDO = productSpuMapper.selectById(updateReqVO.getId()).setStatus(updateReqVO.getStatus());
|
||||
|
||||
@@ -28,9 +28,9 @@ import static org.junit.jupiter.api.Assertions.*;
|
||||
/**
|
||||
* {@link ProductBrandServiceImpl} 的单元测试类
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author 恭学教育
|
||||
*/
|
||||
@Disabled // TODO 芋艿:后续 fix 补充的单测
|
||||
@Disabled // TODO 管理员:后续 fix 补充的单测
|
||||
@Import(ProductBrandServiceImpl.class)
|
||||
public class ProductBrandServiceImplTest extends BaseDbUnitTest {
|
||||
|
||||
@@ -107,7 +107,7 @@ public class ProductBrandServiceImplTest extends BaseDbUnitTest {
|
||||
public void testGetBrandPage() {
|
||||
// mock 数据
|
||||
ProductBrandDO dbBrand = randomPojo(ProductBrandDO.class, o -> { // 等会查询到
|
||||
o.setName("芋道源码");
|
||||
o.setName("恭学教育");
|
||||
o.setStatus(CommonStatusEnum.ENABLE.getStatus());
|
||||
o.setCreateTime(buildTime(2022, 2, 1));
|
||||
});
|
||||
@@ -120,7 +120,7 @@ public class ProductBrandServiceImplTest extends BaseDbUnitTest {
|
||||
brandMapper.insert(cloneIgnoreId(dbBrand, o -> o.setCreateTime(buildTime(2022, 3, 1))));
|
||||
// 准备参数
|
||||
ProductBrandPageReqVO reqVO = new ProductBrandPageReqVO();
|
||||
reqVO.setName("芋道");
|
||||
reqVO.setName("恭学");
|
||||
reqVO.setStatus(CommonStatusEnum.ENABLE.getStatus());
|
||||
reqVO.setCreateTime((new LocalDateTime[]{buildTime(2022, 1, 1), buildTime(2022, 2, 25)}));
|
||||
|
||||
|
||||
@@ -26,9 +26,9 @@ import static org.junit.jupiter.api.Assertions.assertNull;
|
||||
/**
|
||||
* {@link ProductCategoryServiceImpl} 的单元测试类
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author 恭学教育
|
||||
*/
|
||||
@Disabled // TODO 芋艿:后续 fix 补充的单测
|
||||
@Disabled // TODO 管理员:后续 fix 补充的单测
|
||||
@Import(ProductCategoryServiceImpl.class)
|
||||
public class ProductCategoryServiceImplTest extends BaseDbUnitTest {
|
||||
|
||||
|
||||
@@ -31,13 +31,13 @@ import static cn.iocoder.yudao.framework.test.core.util.RandomUtils.randomPojo;
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
import static org.junit.jupiter.api.Assertions.assertFalse;
|
||||
|
||||
// TODO 芋艿:单测详细 review 下
|
||||
// TODO 管理员:单测详细 review 下
|
||||
/**
|
||||
* {@link ProductCommentServiceImpl} 的单元测试类
|
||||
*
|
||||
* @author wangzhs
|
||||
*/
|
||||
@Disabled // TODO 芋艿:后续 fix 补充的单测
|
||||
@Disabled // TODO 管理员:后续 fix 补充的单测
|
||||
@Import(ProductCommentServiceImpl.class)
|
||||
public class ProductCommentServiceImplTest extends BaseDbUnitTest {
|
||||
|
||||
|
||||
@@ -32,9 +32,9 @@ import static org.mockito.Mockito.verify;
|
||||
/**
|
||||
* {@link ProductSkuServiceImpl} 的单元测试
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author 恭学教育
|
||||
*/
|
||||
@Disabled // TODO 芋艿:后续 fix 补充的单测
|
||||
@Disabled // TODO 管理员:后续 fix 补充的单测
|
||||
@Import(ProductSkuServiceImpl.class)
|
||||
public class ProductSkuServiceTest extends BaseDbUnitTest {
|
||||
|
||||
|
||||
@@ -41,14 +41,14 @@ import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
import static org.mockito.ArgumentMatchers.eq;
|
||||
import static org.mockito.Mockito.when;
|
||||
|
||||
// TODO @芋艿:review 下单元测试
|
||||
// TODO @管理员:review 下单元测试
|
||||
|
||||
/**
|
||||
* {@link ProductSpuServiceImpl} 的单元测试类
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author 恭学教育
|
||||
*/
|
||||
@Disabled // TODO 芋艿:后续 fix 补充的单测
|
||||
@Disabled // TODO 管理员:后续 fix 补充的单测
|
||||
@Import(ProductSpuServiceImpl.class)
|
||||
public class ProductSpuServiceImplTest extends BaseDbUnitTest {
|
||||
|
||||
@@ -79,7 +79,7 @@ public class ProductSpuServiceImplTest extends BaseDbUnitTest {
|
||||
|
||||
public int generaInt(){return RandomUtil.randomInt(1,9999999);}
|
||||
|
||||
// TODO @芋艿:单测后续 review 哈
|
||||
// TODO @管理员:单测后续 review 哈
|
||||
|
||||
@Test
|
||||
public void testCreateSpu_success() {
|
||||
|
||||
@@ -41,9 +41,9 @@ mybatis-plus:
|
||||
|
||||
--- #################### 监控相关配置 ####################
|
||||
|
||||
--- #################### 芋道相关配置 ####################
|
||||
--- #################### 恭学相关配置 ####################
|
||||
|
||||
# 芋道配置项,设置当前项目所有自定义的配置
|
||||
# 恭学配置项,设置当前项目所有自定义的配置
|
||||
yudao:
|
||||
info:
|
||||
base-package: cn.iocoder.yudao
|
||||
|
||||
@@ -8,7 +8,7 @@ import java.time.LocalDateTime;
|
||||
/**
|
||||
* 拼团记录 Response DTO
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author 恭学教育
|
||||
*/
|
||||
@Data
|
||||
public class CombinationRecordRespDTO {
|
||||
|
||||
@@ -10,7 +10,7 @@ import java.util.Map;
|
||||
/**
|
||||
* 优惠劵 API 接口
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author 恭学教育
|
||||
*/
|
||||
public interface CouponApi {
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@ import java.util.Map;
|
||||
/**
|
||||
* 优惠劵 API 实现类
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author 恭学教育
|
||||
*/
|
||||
@Service
|
||||
@Validated
|
||||
|
||||
@@ -11,7 +11,7 @@ import java.util.List;
|
||||
/**
|
||||
* 优惠劵 Response DTO
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author 恭学教育
|
||||
*/
|
||||
@Data
|
||||
public class CouponRespDTO {
|
||||
|
||||
@@ -7,7 +7,7 @@ import jakarta.validation.constraints.NotNull;
|
||||
/**
|
||||
* 优惠劵使用 Request DTO
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author 恭学教育
|
||||
*/
|
||||
@Data
|
||||
public class CouponUseReqDTO {
|
||||
|
||||
@@ -8,7 +8,7 @@ import java.util.List;
|
||||
/**
|
||||
* 限时折扣 API 接口
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author 恭学教育
|
||||
*/
|
||||
public interface DiscountActivityApi {
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@ import java.util.List;
|
||||
/**
|
||||
* 限时折扣 API 实现类
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author 恭学教育
|
||||
*/
|
||||
@Service
|
||||
@Validated
|
||||
|
||||
@@ -7,7 +7,7 @@ import java.time.LocalDateTime;
|
||||
/**
|
||||
* 限时折扣活动商品 Response DTO
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author 恭学教育
|
||||
*/
|
||||
@Data
|
||||
public class DiscountProductRespDTO {
|
||||
|
||||
@@ -8,7 +8,7 @@ import java.util.List;
|
||||
/**
|
||||
* 满减送活动 API 接口
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author 恭学教育
|
||||
*/
|
||||
public interface RewardActivityApi {
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@ import java.util.List;
|
||||
/**
|
||||
* 满减送活动 API 实现类
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author 恭学教育
|
||||
*/
|
||||
@Service
|
||||
@Validated
|
||||
|
||||
@@ -13,7 +13,7 @@ import java.util.Map;
|
||||
/**
|
||||
* 满减送活动的匹配 Response DTO
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author 恭学教育
|
||||
*/
|
||||
@Data
|
||||
public class RewardActivityMatchRespDTO {
|
||||
|
||||
@@ -18,7 +18,7 @@ public class BargainHelpRespVO extends BargainHelpBaseVO {
|
||||
|
||||
// ========== 用户相关 ==========
|
||||
|
||||
@Schema(description = "用户昵称", example = "老芋艿")
|
||||
@Schema(description = "用户昵称", example = "老管理员")
|
||||
private String nickname;
|
||||
|
||||
@Schema(description = "用户头像", requiredMode = Schema.RequiredMode.REQUIRED, example = "https://www.iocoder.cn/xxx.jpg")
|
||||
|
||||
@@ -25,7 +25,7 @@ public class BargainRecordPageItemRespVO extends BargainRecordBaseVO {
|
||||
|
||||
// ========== 用户相关 ==========
|
||||
|
||||
@Schema(description = "用户昵称", example = "老芋艿")
|
||||
@Schema(description = "用户昵称", example = "老管理员")
|
||||
private String nickname;
|
||||
|
||||
@Schema(description = "用户头像", requiredMode = Schema.RequiredMode.REQUIRED, example = "https://www.iocoder.cn/xxx.jpg")
|
||||
|
||||
@@ -33,7 +33,7 @@ public class CombinationRecordBaseVO {
|
||||
@NotNull(message = "用户编号不能为空")
|
||||
private Long userId;
|
||||
|
||||
@Schema(description = "用户昵称", example = "老芋艿")
|
||||
@Schema(description = "用户昵称", example = "老管理员")
|
||||
private String nickname;
|
||||
|
||||
@Schema(description = "用户头像", requiredMode = Schema.RequiredMode.REQUIRED, example = "https://www.iocoder.cn/xxx.jpg")
|
||||
|
||||
@@ -11,7 +11,7 @@ import lombok.ToString;
|
||||
@ToString(callSuper = true)
|
||||
public class CouponPageItemRespVO extends CouponRespVO {
|
||||
|
||||
@Schema(description = "用户昵称", example = "老芋艿")
|
||||
@Schema(description = "用户昵称", example = "老管理员")
|
||||
private String nickname;
|
||||
|
||||
}
|
||||
|
||||
@@ -31,7 +31,7 @@ public class CouponPageReqVO extends PageParam {
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] createTime;
|
||||
|
||||
@Schema(description = "用户昵称", example = "芋艿")
|
||||
@Schema(description = "用户昵称", example = "管理员")
|
||||
private String nickname;
|
||||
|
||||
@Schema(description = "用户编号", example = "1")
|
||||
|
||||
@@ -16,7 +16,7 @@ public class KeFuConversationRespVO {
|
||||
private Long userId;
|
||||
@Schema(description = "会话所属用户头像", requiredMode = Schema.RequiredMode.REQUIRED, example = "https://yudao.com/images/avatar.jpg")
|
||||
private String userAvatar;
|
||||
@Schema(description = "会话所属用户昵称", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋道")
|
||||
@Schema(description = "会话所属用户昵称", requiredMode = Schema.RequiredMode.REQUIRED, example = "恭学")
|
||||
private String userNickname;
|
||||
|
||||
@Schema(description = "最后聊天时间", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
|
||||
@@ -12,10 +12,10 @@ public class AppArticleRespVO {
|
||||
@Schema(description = "文章编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "文章标题", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋道源码 - 促销模块")
|
||||
@Schema(description = "文章标题", requiredMode = Schema.RequiredMode.REQUIRED, example = "恭学教育 - 促销模块")
|
||||
private String title;
|
||||
|
||||
@Schema(description = "文章作者", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋道源码")
|
||||
@Schema(description = "文章作者", requiredMode = Schema.RequiredMode.REQUIRED, example = "恭学教育")
|
||||
private String author;
|
||||
|
||||
@Schema(description = "分类编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "2048")
|
||||
|
||||
@@ -15,7 +15,7 @@ import java.util.Map;
|
||||
/**
|
||||
* 砍价助力 Convert
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author 恭学教育
|
||||
*/
|
||||
@Mapper
|
||||
public interface BargainHelpConvert {
|
||||
|
||||
@@ -24,7 +24,7 @@ import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.
|
||||
/**
|
||||
* 砍价记录 Convert
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author 恭学教育
|
||||
*/
|
||||
@Mapper
|
||||
public interface BargainRecordConvert {
|
||||
|
||||
@@ -18,7 +18,7 @@ import java.util.Collection;
|
||||
/**
|
||||
* 优惠劵 Convert
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author 恭学教育
|
||||
*/
|
||||
@Mapper
|
||||
public interface CouponConvert {
|
||||
|
||||
@@ -18,7 +18,7 @@ import java.util.Map;
|
||||
/**
|
||||
* 优惠劵模板 Convert
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author 恭学教育
|
||||
*/
|
||||
@Mapper
|
||||
public interface CouponTemplateConvert {
|
||||
|
||||
@@ -16,7 +16,7 @@ import java.util.List;
|
||||
/**
|
||||
* 限时折扣活动 Convert
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author 恭学教育
|
||||
*/
|
||||
@Mapper
|
||||
public interface DiscountActivityConvert {
|
||||
|
||||
@@ -33,7 +33,7 @@ import static cn.iocoder.yudao.framework.common.util.collection.MapUtils.findAnd
|
||||
/**
|
||||
* 秒杀活动 Convert
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author 恭学教育
|
||||
*/
|
||||
@Mapper
|
||||
public interface SeckillActivityConvert {
|
||||
|
||||
@@ -15,7 +15,7 @@ import java.util.List;
|
||||
/**
|
||||
* 秒杀时段 Convert
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author 恭学教育
|
||||
*/
|
||||
@Mapper
|
||||
public interface SeckillConfigConvert {
|
||||
|
||||
@@ -9,7 +9,7 @@ import lombok.*;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
// TODO 芋艿:把字段的顺序,和 do 顺序对齐下
|
||||
// TODO 管理员:把字段的顺序,和 do 顺序对齐下
|
||||
/**
|
||||
* 拼团记录 DO
|
||||
*
|
||||
|
||||
@@ -19,7 +19,7 @@ import java.util.List;
|
||||
/**
|
||||
* 优惠劵 DO
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author 恭学教育
|
||||
*/
|
||||
@TableName(value = "promotion_coupon", autoResultMap = true)
|
||||
@KeySequence("promotion_coupon_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
|
||||
@@ -52,7 +52,7 @@ public class CouponDO extends BaseDO {
|
||||
*/
|
||||
private Integer status;
|
||||
|
||||
// TODO 芋艿:发放 adminid?
|
||||
// TODO 管理员:发放 adminid?
|
||||
|
||||
// ========== 基本信息 END ==========
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ import java.util.List;
|
||||
*
|
||||
* 当用户领取时,会生成 {@link CouponDO} 优惠劵
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author 恭学教育
|
||||
*/
|
||||
@TableName(value = "promotion_coupon_template", autoResultMap = true)
|
||||
@KeySequence("promotion_coupon_template_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
|
||||
@@ -58,7 +58,7 @@ public class CouponTemplateDO extends BaseDO {
|
||||
*
|
||||
* 枚举 {@link CommonStatusEnum}
|
||||
*/
|
||||
// TODO 芋艿:要不要改成 3 个状态??
|
||||
// TODO 管理员:要不要改成 3 个状态??
|
||||
private Integer status;
|
||||
|
||||
// ========== 基本信息 END ==========
|
||||
@@ -174,6 +174,6 @@ public class CouponTemplateDO extends BaseDO {
|
||||
|
||||
// ========== 统计信息 END ==========
|
||||
|
||||
// TODO 芋艿:领取开始时间、领取结束时间
|
||||
// TODO 管理员:领取开始时间、领取结束时间
|
||||
|
||||
}
|
||||
|
||||
@@ -16,7 +16,7 @@ import java.time.LocalDateTime;
|
||||
* 一个活动下,可以有 {@link DiscountProductDO} 商品;
|
||||
* 一个商品,在指定时间段内,只能属于一个活动;
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author 恭学教育
|
||||
*/
|
||||
@TableName(value = "promotion_discount_activity", autoResultMap = true)
|
||||
@KeySequence("promotion_discount_activity_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
|
||||
|
||||
@@ -13,7 +13,7 @@ import java.time.LocalDateTime;
|
||||
/**
|
||||
* 限时折扣商品 DO
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author 恭学教育
|
||||
*/
|
||||
@TableName(value = "promotion_discount_product", autoResultMap = true)
|
||||
@KeySequence("promotion_discount_product_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
|
||||
|
||||
@@ -21,7 +21,7 @@ import java.util.Map;
|
||||
/**
|
||||
* 满减送活动 DO
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author 恭学教育
|
||||
*/
|
||||
@TableName(value = "promotion_reward_activity", autoResultMap = true)
|
||||
@KeySequence("promotion_reward_activity_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
|
||||
|
||||
@@ -14,7 +14,7 @@ import java.util.List;
|
||||
/**
|
||||
* 秒杀时段 DO
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author 恭学教育
|
||||
*/
|
||||
@TableName(value = "promotion_seckill_config", autoResultMap = true)
|
||||
@KeySequence("promotion_seckill_config_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
|
||||
|
||||
@@ -20,7 +20,7 @@ import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.
|
||||
/**
|
||||
* 优惠劵 Mapper
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author 恭学教育
|
||||
*/
|
||||
@Mapper
|
||||
public interface CouponMapper extends BaseMapperX<CouponDO> {
|
||||
|
||||
@@ -20,7 +20,7 @@ import java.util.function.Consumer;
|
||||
/**
|
||||
* 优惠劵模板 Mapper
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author 恭学教育
|
||||
*/
|
||||
@Mapper
|
||||
public interface CouponTemplateMapper extends BaseMapperX<CouponTemplateDO> {
|
||||
|
||||
@@ -14,7 +14,7 @@ import java.util.List;
|
||||
/**
|
||||
* 限时折扣活动 Mapper
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author 恭学教育
|
||||
*/
|
||||
@Mapper
|
||||
public interface DiscountActivityMapper extends BaseMapperX<DiscountActivityDO> {
|
||||
|
||||
@@ -13,7 +13,7 @@ import java.util.List;
|
||||
/**
|
||||
* 限时折扣商城 Mapper
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author 恭学教育
|
||||
*/
|
||||
@Mapper
|
||||
public interface DiscountProductMapper extends BaseMapperX<DiscountProductDO> {
|
||||
|
||||
@@ -19,7 +19,7 @@ import java.util.stream.IntStream;
|
||||
/**
|
||||
* 满减送活动 Mapper
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author 恭学教育
|
||||
*/
|
||||
@Mapper
|
||||
public interface RewardActivityMapper extends BaseMapperX<RewardActivityDO> {
|
||||
|
||||
@@ -9,7 +9,7 @@ import java.util.Arrays;
|
||||
/**
|
||||
* 砍价记录的状态枚举
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author 恭学教育
|
||||
*/
|
||||
@AllArgsConstructor
|
||||
@Getter
|
||||
|
||||
@@ -6,11 +6,11 @@ import lombok.Getter;
|
||||
|
||||
import java.util.Arrays;
|
||||
|
||||
// TODO 芋艿:弱化这个状态
|
||||
// TODO 管理员:弱化这个状态
|
||||
/**
|
||||
* 促销活动的状态枚举
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author 恭学教育
|
||||
*/
|
||||
@AllArgsConstructor
|
||||
@Getter
|
||||
|
||||
@@ -9,7 +9,7 @@ import java.util.Arrays;
|
||||
/**
|
||||
* 营销的条件类型枚举
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author 恭学教育
|
||||
*/
|
||||
@AllArgsConstructor
|
||||
@Getter
|
||||
|
||||
@@ -9,7 +9,7 @@ import java.util.Arrays;
|
||||
/**
|
||||
* 优惠类型枚举
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author 恭学教育
|
||||
*/
|
||||
@Getter
|
||||
@AllArgsConstructor
|
||||
|
||||
@@ -10,7 +10,7 @@ import java.util.Objects;
|
||||
/**
|
||||
* 营销的商品范围枚举
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author 恭学教育
|
||||
*/
|
||||
@Getter
|
||||
@AllArgsConstructor
|
||||
|
||||
@@ -9,7 +9,7 @@ import java.util.Arrays;
|
||||
/**
|
||||
* 营销类型枚举
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author 恭学教育
|
||||
*/
|
||||
@Getter
|
||||
@AllArgsConstructor
|
||||
|
||||
@@ -9,7 +9,7 @@ import java.util.Arrays;
|
||||
/**
|
||||
* 优惠劵状态枚举
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author 恭学教育
|
||||
*/
|
||||
@AllArgsConstructor
|
||||
@Getter
|
||||
|
||||
@@ -10,7 +10,7 @@ import java.util.Objects;
|
||||
/**
|
||||
* 优惠劵领取方式
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author 恭学教育
|
||||
*/
|
||||
@AllArgsConstructor
|
||||
@Getter
|
||||
|
||||
@@ -9,7 +9,7 @@ import java.util.Arrays;
|
||||
/**
|
||||
* 优惠劵模板的有限期类型的枚举
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author 恭学教育
|
||||
*/
|
||||
@AllArgsConstructor
|
||||
@Getter
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/**
|
||||
* 属于 promotion 模块的 framework 封装
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author 恭学教育
|
||||
*/
|
||||
package cn.iocoder.yudao.module.promotion.framework;
|
||||
|
||||
@@ -8,7 +8,7 @@ import org.springframework.context.annotation.Configuration;
|
||||
/**
|
||||
* promotion 模块的 web 组件的 Configuration
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author 恭学教育
|
||||
*/
|
||||
@Configuration(proxyBeanMethods = false)
|
||||
public class PromotionWebConfiguration {
|
||||
|
||||
@@ -12,7 +12,7 @@ import java.util.Map;
|
||||
/**
|
||||
* 砍价助力 Service 接口
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author 恭学教育
|
||||
*/
|
||||
public interface BargainHelpService {
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@ import static cn.iocoder.yudao.module.promotion.enums.ErrorCodeConstants.*;
|
||||
/**
|
||||
* 砍价助力 Service 实现类
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author 恭学教育
|
||||
*/
|
||||
@Service
|
||||
@Validated
|
||||
@@ -93,7 +93,7 @@ public class BargainHelpServiceImpl implements BargainHelpService {
|
||||
return help;
|
||||
}
|
||||
|
||||
// TODO 芋艿:优化点:实现一个更随机的逻辑,可以按照你自己的业务;
|
||||
// TODO 管理员:优化点:实现一个更随机的逻辑,可以按照你自己的业务;
|
||||
private Integer calculateReducePrice(BargainActivityDO activity, BargainRecordDO record) {
|
||||
// 1. 随机金额
|
||||
Integer reducePrice = MathUtil.randomInt(activity.getBargainMinPrice(),
|
||||
|
||||
@@ -13,7 +13,7 @@ import java.util.*;
|
||||
/**
|
||||
* 优惠劵 Service 接口
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author 恭学教育
|
||||
*/
|
||||
public interface CouponService {
|
||||
|
||||
|
||||
@@ -39,7 +39,7 @@ import static java.util.Arrays.asList;
|
||||
/**
|
||||
* 优惠劵 Service 实现类
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author 恭学教育
|
||||
*/
|
||||
@Slf4j
|
||||
@Service
|
||||
|
||||
@@ -14,7 +14,7 @@ import java.util.List;
|
||||
/**
|
||||
* 优惠劵模板 Service 接口
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author 恭学教育
|
||||
*/
|
||||
public interface CouponTemplateService {
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@ import static cn.iocoder.yudao.module.promotion.enums.ErrorCodeConstants.*;
|
||||
/**
|
||||
* 优惠劵模板 Service 实现类
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author 恭学教育
|
||||
*/
|
||||
@Service
|
||||
@Validated
|
||||
|
||||
@@ -14,7 +14,7 @@ import java.util.List;
|
||||
/**
|
||||
* 限时折扣 Service 接口
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author 恭学教育
|
||||
*/
|
||||
public interface DiscountActivityService {
|
||||
|
||||
|
||||
@@ -36,7 +36,7 @@ import static cn.iocoder.yudao.module.promotion.enums.ErrorCodeConstants.*;
|
||||
/**
|
||||
* 限时折扣 Service 实现类
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author 恭学教育
|
||||
*/
|
||||
@Service
|
||||
@Validated
|
||||
|
||||
@@ -21,7 +21,7 @@ import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.
|
||||
/**
|
||||
* 满减送活动 Service 接口
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author 恭学教育
|
||||
*/
|
||||
public interface RewardActivityService {
|
||||
|
||||
|
||||
@@ -30,7 +30,7 @@ import static cn.iocoder.yudao.module.promotion.enums.ErrorCodeConstants.*;
|
||||
/**
|
||||
* 满减送活动 Service 实现类
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author 恭学教育
|
||||
*/
|
||||
@Service
|
||||
@Validated
|
||||
|
||||
@@ -22,13 +22,13 @@ import static cn.iocoder.yudao.framework.test.core.util.RandomUtils.randomPojo;
|
||||
import static cn.iocoder.yudao.module.promotion.enums.ErrorCodeConstants.ARTICLE_CATEGORY_NOT_EXISTS;
|
||||
import static org.junit.jupiter.api.Assertions.*;
|
||||
|
||||
// TODO 芋艿:review 单测
|
||||
// TODO 管理员:review 单测
|
||||
/**
|
||||
* {@link ArticleCategoryServiceImpl} 的单元测试类
|
||||
*
|
||||
* @author HUIHUI
|
||||
*/
|
||||
@Disabled // TODO 芋艿:后续 fix 补充的单测
|
||||
@Disabled // TODO 管理员:后续 fix 补充的单测
|
||||
@Import(ArticleCategoryServiceImpl.class)
|
||||
public class ArticleCategoryServiceImplTest extends BaseDbUnitTest {
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@ import static org.junit.jupiter.api.Assertions.*;
|
||||
*
|
||||
* @author HUIHUI
|
||||
*/
|
||||
@Disabled // TODO 芋艿:后续 fix 补充的单测
|
||||
@Disabled // TODO 管理员:后续 fix 补充的单测
|
||||
@Import(ArticleServiceImpl.class)
|
||||
public class ArticleServiceImplTest extends BaseDbUnitTest {
|
||||
|
||||
|
||||
@@ -21,13 +21,13 @@ import static cn.iocoder.yudao.framework.test.core.util.RandomUtils.randomPojo;
|
||||
import static cn.iocoder.yudao.module.promotion.enums.ErrorCodeConstants.COMBINATION_ACTIVITY_NOT_EXISTS;
|
||||
import static org.junit.jupiter.api.Assertions.*;
|
||||
|
||||
// TODO 芋艿:等完成后,在补全单测
|
||||
// TODO 管理员:等完成后,在补全单测
|
||||
/**
|
||||
* {@link CombinationActivityServiceImpl} 的单元测试类
|
||||
*
|
||||
* @author HUIHUI
|
||||
*/
|
||||
@Disabled // TODO 芋艿:后续 fix 补充的单测
|
||||
@Disabled // TODO 管理员:后续 fix 补充的单测
|
||||
@Import(CombinationActivityServiceImpl.class)
|
||||
public class CombinationActivityServiceImplTest extends BaseDbUnitTest {
|
||||
|
||||
|
||||
@@ -37,7 +37,7 @@ import static org.mockito.Mockito.when;
|
||||
/**
|
||||
* {@link CombinationRecordServiceImpl} 的单元测试类
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author 恭学教育
|
||||
*/
|
||||
@Import(CombinationRecordServiceImpl.class)
|
||||
public class CombinationRecordServiceImplTest extends BaseDbUnitTest {
|
||||
@@ -269,7 +269,7 @@ public class CombinationRecordServiceImplTest extends BaseDbUnitTest {
|
||||
private void mockCreateContext() {
|
||||
MemberUserRespDTO user = randomPojo(MemberUserRespDTO.class, o -> {
|
||||
o.setId(USER_ID);
|
||||
o.setNickname("芋道源码");
|
||||
o.setNickname("恭学教育");
|
||||
o.setAvatar("https://www.iocoder.cn/avatar.png");
|
||||
});
|
||||
when(memberUserApi.getUser(USER_ID)).thenReturn(user);
|
||||
@@ -305,7 +305,7 @@ public class CombinationRecordServiceImplTest extends BaseDbUnitTest {
|
||||
o.setSkuId(SKU_ID);
|
||||
o.setCount(1);
|
||||
o.setUserId(USER_ID);
|
||||
o.setNickname("芋道源码");
|
||||
o.setNickname("恭学教育");
|
||||
o.setAvatar("https://www.iocoder.cn/avatar.png");
|
||||
o.setHeadId(CombinationRecordDO.HEAD_ID_GROUP);
|
||||
o.setStatus(CombinationRecordStatusEnum.IN_PROGRESS.getStatus());
|
||||
|
||||
@@ -36,7 +36,7 @@ import static org.junit.jupiter.api.Assertions.*;
|
||||
/**
|
||||
* {@link CouponTemplateServiceImpl} 的单元测试类
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author 恭学教育
|
||||
*/
|
||||
@Import(CouponTemplateServiceImpl.class)
|
||||
public class CouponTemplateServiceImplTest extends BaseDbUnitTest {
|
||||
@@ -184,7 +184,7 @@ public class CouponTemplateServiceImplTest extends BaseDbUnitTest {
|
||||
public void testGetCouponTemplatePage() {
|
||||
// mock 数据
|
||||
CouponTemplateDO dbCouponTemplate = randomPojo(CouponTemplateDO.class, o -> { // 等会查询到
|
||||
o.setName("芋艿");
|
||||
o.setName("管理员");
|
||||
o.setStatus(CommonStatusEnum.ENABLE.getStatus());
|
||||
o.setDiscountType(PromotionDiscountTypeEnum.PERCENT.getType());
|
||||
o.setCreateTime(buildTime(2022, 2, 2));
|
||||
@@ -200,7 +200,7 @@ public class CouponTemplateServiceImplTest extends BaseDbUnitTest {
|
||||
couponTemplateMapper.insert(cloneIgnoreId(dbCouponTemplate, o -> o.setCreateTime(buildTime(2022, 1, 1))));
|
||||
// 准备参数
|
||||
CouponTemplatePageReqVO reqVO = new CouponTemplatePageReqVO();
|
||||
reqVO.setName("芋艿");
|
||||
reqVO.setName("管理员");
|
||||
reqVO.setStatus(CommonStatusEnum.ENABLE.getStatus());
|
||||
reqVO.setDiscountType(PromotionDiscountTypeEnum.PERCENT.getType());
|
||||
reqVO.setCreateTime((new LocalDateTime[]{buildTime(2022, 2, 1), buildTime(2022, 2, 3)}));
|
||||
|
||||
@@ -35,9 +35,9 @@ import static org.junit.jupiter.api.Assertions.*;
|
||||
/**
|
||||
* {@link DiscountActivityServiceImpl} 的单元测试类
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author 恭学教育
|
||||
*/
|
||||
@Disabled // TODO 芋艿:后续 fix 补充的单测
|
||||
@Disabled // TODO 管理员:后续 fix 补充的单测
|
||||
@Import(DiscountActivityServiceImpl.class)
|
||||
public class DiscountActivityServiceImplTest extends BaseDbUnitTest {
|
||||
|
||||
@@ -183,7 +183,7 @@ public class DiscountActivityServiceImplTest extends BaseDbUnitTest {
|
||||
public void testGetDiscountActivityPage() {
|
||||
// mock 数据
|
||||
DiscountActivityDO dbDiscountActivity = randomPojo(DiscountActivityDO.class, o -> { // 等会查询到
|
||||
o.setName("芋艿");
|
||||
o.setName("管理员");
|
||||
o.setStatus(PromotionActivityStatusEnum.WAIT.getStatus());
|
||||
o.setCreateTime(buildTime(2021, 1, 15));
|
||||
});
|
||||
@@ -196,7 +196,7 @@ public class DiscountActivityServiceImplTest extends BaseDbUnitTest {
|
||||
discountActivityMapper.insert(cloneIgnoreId(dbDiscountActivity, o -> o.setCreateTime(buildTime(2021, 2, 10))));
|
||||
// 准备参数
|
||||
DiscountActivityPageReqVO reqVO = new DiscountActivityPageReqVO();
|
||||
reqVO.setName("芋艿");
|
||||
reqVO.setName("管理员");
|
||||
reqVO.setStatus(PromotionActivityStatusEnum.WAIT.getStatus());
|
||||
reqVO.setCreateTime((new LocalDateTime[]{buildTime(2021, 1, 1), buildTime(2021, 1, 31)}));
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@ import static org.junit.jupiter.api.Assertions.*;
|
||||
*
|
||||
* @author owen
|
||||
*/
|
||||
@Disabled // TODO 芋艿:后续 fix 补充的单测
|
||||
@Disabled // TODO 管理员:后续 fix 补充的单测
|
||||
@Import(DiyPageServiceImpl.class)
|
||||
public class DiyPageServiceImplTest extends BaseDbUnitTest {
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user