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:
@@ -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 {
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@ import static org.junit.jupiter.api.Assertions.*;
|
||||
*
|
||||
* @author owen
|
||||
*/
|
||||
@Disabled // TODO 芋艿:后续 fix 补充的单测
|
||||
@Disabled // TODO 管理员:后续 fix 补充的单测
|
||||
@Import(DiyTemplateServiceImpl.class)
|
||||
public class DiyTemplateServiceImplTest extends BaseDbUnitTest {
|
||||
|
||||
|
||||
@@ -32,9 +32,9 @@ import static org.junit.jupiter.api.Assertions.*;
|
||||
/**
|
||||
* {@link RewardActivityServiceImpl} 的单元测试类
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author 恭学教育
|
||||
*/
|
||||
@Disabled // TODO 芋艿:后续 fix 补充的单测
|
||||
@Disabled // TODO 管理员:后续 fix 补充的单测
|
||||
public class RewardActivityServiceImplTest extends BaseMockitoUnitTest {
|
||||
|
||||
@InjectMocks
|
||||
@@ -146,7 +146,7 @@ public class RewardActivityServiceImplTest extends BaseMockitoUnitTest {
|
||||
public void testGetRewardActivityPage() {
|
||||
// mock 数据
|
||||
RewardActivityDO dbRewardActivity = randomPojo(RewardActivityDO.class, o -> { // 等会查询到
|
||||
o.setName("芋艿");
|
||||
o.setName("管理员");
|
||||
o.setStatus(CommonStatusEnum.DISABLE.getStatus());
|
||||
});
|
||||
rewardActivityMapper.insert(dbRewardActivity);
|
||||
@@ -156,7 +156,7 @@ public class RewardActivityServiceImplTest extends BaseMockitoUnitTest {
|
||||
rewardActivityMapper.insert(cloneIgnoreId(dbRewardActivity, o -> o.setStatus(CommonStatusEnum.ENABLE.getStatus())));
|
||||
// 准备参数
|
||||
RewardActivityPageReqVO reqVO = new RewardActivityPageReqVO();
|
||||
reqVO.setName("芋艿");
|
||||
reqVO.setName("管理员");
|
||||
reqVO.setStatus(CommonStatusEnum.DISABLE.getStatus());
|
||||
|
||||
// 调用
|
||||
@@ -167,7 +167,7 @@ public class RewardActivityServiceImplTest extends BaseMockitoUnitTest {
|
||||
assertPojoEquals(dbRewardActivity, pageResult.getList().get(0), "rules");
|
||||
}
|
||||
|
||||
// TODO 芋艿:后续完善单测
|
||||
// TODO 管理员:后续完善单测
|
||||
// @Test
|
||||
// public void testGetRewardActivities_all() {
|
||||
// LocalDateTime now = LocalDateTime.now();
|
||||
|
||||
@@ -26,10 +26,10 @@ import static org.junit.jupiter.api.Assertions.*;
|
||||
/**
|
||||
* {@link SeckillActivityServiceImpl} 的单元测试类
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author 恭学教育
|
||||
*/
|
||||
@Import(SeckillActivityServiceImpl.class)
|
||||
@Disabled // TODO 芋艿:未来开启
|
||||
@Disabled // TODO 管理员:未来开启
|
||||
public class SeckillActivityServiceImplTest extends BaseDbUnitTest {
|
||||
|
||||
@Resource
|
||||
|
||||
@@ -26,10 +26,10 @@ import static org.junit.jupiter.api.Assertions.assertNull;
|
||||
/**
|
||||
* {@link SeckillConfigServiceImpl} 的单元测试类
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author 恭学教育
|
||||
*/
|
||||
@Import(SeckillConfigServiceImpl.class)
|
||||
@Disabled // TODO 芋艿:未来开启;后续要 review 下
|
||||
@Disabled // TODO 管理员:未来开启;后续要 review 下
|
||||
public class SeckillConfigServiceImplTest extends BaseDbUnitTest {
|
||||
|
||||
@Resource
|
||||
|
||||
@@ -40,9 +40,9 @@ mybatis:
|
||||
|
||||
--- #################### 监控相关配置 ####################
|
||||
|
||||
--- #################### 芋道相关配置 ####################
|
||||
--- #################### 恭学相关配置 ####################
|
||||
|
||||
# 芋道配置项,设置当前项目所有自定义的配置
|
||||
# 恭学配置项,设置当前项目所有自定义的配置
|
||||
yudao:
|
||||
info:
|
||||
base-package: cn.iocoder.yudao.module
|
||||
|
||||
Reference in New Issue
Block a user