commit
b287fdb9f2
@ -1,105 +0,0 @@
|
|||||||
package cn.iocoder.yudao.module.bpm.dal.dataobject.task;
|
|
||||||
|
|
||||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
|
||||||
import lombok.*;
|
|
||||||
import org.springframework.format.annotation.DateTimeFormat;
|
|
||||||
|
|
||||||
import java.time.LocalDateTime;
|
|
||||||
|
|
||||||
import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
|
|
||||||
import static cn.iocoder.yudao.framework.common.util.date.DateUtils.TIME_ZONE_DEFAULT;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 任务流程关联表
|
|
||||||
*
|
|
||||||
* @author kemengkai
|
|
||||||
* @create 2022-05-09 10:33
|
|
||||||
*/
|
|
||||||
@Data
|
|
||||||
@AllArgsConstructor
|
|
||||||
@NoArgsConstructor
|
|
||||||
public class BpmActivityDO {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 任务流程关联id
|
|
||||||
*/
|
|
||||||
private String id;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 审批结果
|
|
||||||
*/
|
|
||||||
private Integer rev;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 任务流程部署id
|
|
||||||
*/
|
|
||||||
private String procDefId;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 任务流程id
|
|
||||||
*/
|
|
||||||
private String processInstanceId;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 任务执行id
|
|
||||||
*/
|
|
||||||
private String executionId;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 任务key
|
|
||||||
*/
|
|
||||||
private String activityId;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 任务id
|
|
||||||
*/
|
|
||||||
private String taskId;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 调用流程id
|
|
||||||
*/
|
|
||||||
private String callProcInstId;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 任务名称
|
|
||||||
*/
|
|
||||||
private String activityName;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 任务类型
|
|
||||||
*/
|
|
||||||
private String activityType;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 任务审批人id
|
|
||||||
*/
|
|
||||||
private String assignee;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 任务开始时间
|
|
||||||
*/
|
|
||||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
|
||||||
@JsonFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND, timezone = TIME_ZONE_DEFAULT)
|
|
||||||
private LocalDateTime startTime;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 任务结束时间
|
|
||||||
*/
|
|
||||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
|
||||||
@JsonFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND, timezone = TIME_ZONE_DEFAULT)
|
|
||||||
private LocalDateTime endTime;
|
|
||||||
|
|
||||||
private Integer transactionOrder;
|
|
||||||
|
|
||||||
private LocalDateTime duration;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 删除结果
|
|
||||||
*/
|
|
||||||
private String deleteReason;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 租户id
|
|
||||||
*/
|
|
||||||
private String tenantId;
|
|
||||||
}
|
|
||||||
@ -0,0 +1,49 @@
|
|||||||
|
package cn.iocoder.yudao.module.promotion.api.combination;
|
||||||
|
|
||||||
|
import cn.iocoder.yudao.module.promotion.api.combination.dto.CombinationRecordReqDTO;
|
||||||
|
|
||||||
|
import javax.validation.Valid;
|
||||||
|
|
||||||
|
// TODO @puhui999:CombinationRecordApi 分成活动、记录哈
|
||||||
|
// TODO @芋艿:后面也再撸撸这几个接口
|
||||||
|
/**
|
||||||
|
* 拼团活动 API 接口
|
||||||
|
*
|
||||||
|
* @author HUIHUI
|
||||||
|
*/
|
||||||
|
public interface CombinationApi {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建开团记录
|
||||||
|
*
|
||||||
|
* @param reqDTO 请求 DTO
|
||||||
|
*/
|
||||||
|
void createRecord(@Valid CombinationRecordReqDTO reqDTO);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取开团记录状态
|
||||||
|
*
|
||||||
|
* @param userId 用户编号
|
||||||
|
* @param orderId 订单编号
|
||||||
|
*/
|
||||||
|
boolean validateRecordStatusIsSuccess(Long userId, Long orderId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新开团记录状态
|
||||||
|
*
|
||||||
|
* @param userId 用户编号
|
||||||
|
* @param orderId 订单编号
|
||||||
|
* @param status 状态值
|
||||||
|
*/
|
||||||
|
void updateRecordStatus(Long userId, Long orderId, Integer status);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新开团记录状态和开始时间
|
||||||
|
*
|
||||||
|
* @param userId 用户编号
|
||||||
|
* @param orderId 订单编号
|
||||||
|
* @param status 状态值
|
||||||
|
*/
|
||||||
|
void updateRecordStatusAndStartTime(Long userId, Long orderId, Integer status);
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,39 @@
|
|||||||
|
package cn.iocoder.yudao.module.promotion.enums.combination;
|
||||||
|
|
||||||
|
import cn.iocoder.yudao.framework.common.core.IntArrayValuable;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Getter;
|
||||||
|
|
||||||
|
import java.util.Arrays;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 拼团状态枚举
|
||||||
|
*
|
||||||
|
* @author HUIHUI
|
||||||
|
*/
|
||||||
|
@AllArgsConstructor
|
||||||
|
@Getter
|
||||||
|
public enum CombinationRecordStatusEnum implements IntArrayValuable {
|
||||||
|
|
||||||
|
WAITING(0, "未付款"),
|
||||||
|
IN_PROGRESS(1, "进行中"),
|
||||||
|
SUCCESS(2, "拼团成功"),
|
||||||
|
FAILED(3, "拼团失败");
|
||||||
|
|
||||||
|
public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(CombinationRecordStatusEnum::getStatus).toArray();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 状态值
|
||||||
|
*/
|
||||||
|
private final Integer status;
|
||||||
|
/**
|
||||||
|
* 状态名
|
||||||
|
*/
|
||||||
|
private final String name;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int[] array() {
|
||||||
|
return ARRAYS;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,42 @@
|
|||||||
|
package cn.iocoder.yudao.module.promotion.api.combination;
|
||||||
|
|
||||||
|
import cn.iocoder.yudao.module.promotion.api.combination.dto.CombinationRecordReqDTO;
|
||||||
|
import cn.iocoder.yudao.module.promotion.service.combination.CombinationActivityService;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 拼团活动 API 实现类
|
||||||
|
*
|
||||||
|
* @author HUIHUI
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class CombinationApiImpl implements CombinationApi {
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private CombinationActivityService activityService;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void createRecord(CombinationRecordReqDTO reqDTO) {
|
||||||
|
activityService.createRecord(reqDTO);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean validateRecordStatusIsSuccess(Long userId, Long orderId) {
|
||||||
|
return activityService.validateRecordStatusIsSuccess(userId, orderId);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void updateRecordStatus(Long userId, Long orderId, Integer status) {
|
||||||
|
activityService.updateRecordStatusByUserIdAndOrderId(userId, orderId, status);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void updateRecordStatusAndStartTime(Long userId, Long orderId, Integer status) {
|
||||||
|
activityService.updateRecordStatusAndStartTimeByUserIdAndOrderId(userId, orderId, status, LocalDateTime.now());
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,22 @@
|
|||||||
|
package cn.iocoder.yudao.module.promotion.controller.admin.combination.vo.activity;
|
||||||
|
|
||||||
|
import cn.iocoder.yudao.module.promotion.controller.admin.combination.vo.product.CombinationProductCreateReqVO;
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import lombok.ToString;
|
||||||
|
|
||||||
|
import javax.validation.Valid;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Schema(description = "管理后台 - 拼团活动创建 Request VO")
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@ToString(callSuper = true)
|
||||||
|
public class CombinationActivityCreateReqVO extends CombinationActivityBaseVO {
|
||||||
|
|
||||||
|
@Schema(description = "拼团商品", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||||
|
@Valid
|
||||||
|
private List<CombinationProductCreateReqVO> products;
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,56 @@
|
|||||||
|
package cn.iocoder.yudao.module.promotion.controller.admin.combination.vo.activity;
|
||||||
|
|
||||||
|
import cn.iocoder.yudao.module.promotion.controller.admin.combination.vo.product.CombinationProductRespVO;
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import lombok.ToString;
|
||||||
|
|
||||||
|
import javax.validation.Valid;
|
||||||
|
import javax.validation.constraints.NotNull;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Schema(description = "管理后台 - 拼团活动 Response VO")
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@ToString(callSuper = true)
|
||||||
|
public class CombinationActivityRespVO extends CombinationActivityBaseVO {
|
||||||
|
|
||||||
|
@Schema(description = "商品名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "618大促")
|
||||||
|
private String spuName;
|
||||||
|
|
||||||
|
@Schema(description = "商品主图", requiredMode = Schema.RequiredMode.REQUIRED, example = "https://www.iocoder.cn/xx.png")
|
||||||
|
private String picUrl;
|
||||||
|
|
||||||
|
@Schema(description = "活动编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "22901")
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
@Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||||
|
private LocalDateTime createTime;
|
||||||
|
|
||||||
|
@Schema(description = "开团人数", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||||
|
@NotNull(message = "开团人数不能为空")
|
||||||
|
private Integer userSize;
|
||||||
|
|
||||||
|
@Schema(description = "开团组数", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||||
|
@NotNull(message = "开团组数不能为空")
|
||||||
|
private Integer totalNum;
|
||||||
|
|
||||||
|
@Schema(description = "成团组数", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||||
|
@NotNull(message = "成团组数不能为空")
|
||||||
|
private Integer successNum;
|
||||||
|
|
||||||
|
@Schema(description = "虚拟成团", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||||
|
@NotNull(message = "虚拟成团不能为空")
|
||||||
|
private Integer virtualGroup;
|
||||||
|
|
||||||
|
@Schema(description = "活动状态", requiredMode = Schema.RequiredMode.REQUIRED, example = "0")
|
||||||
|
@NotNull(message = "活动状态不能为空")
|
||||||
|
private Integer status;
|
||||||
|
|
||||||
|
@Schema(description = "拼团商品", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||||
|
@Valid
|
||||||
|
private List<CombinationProductRespVO> products;
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,27 @@
|
|||||||
|
package cn.iocoder.yudao.module.promotion.controller.admin.combination.vo.activity;
|
||||||
|
|
||||||
|
import cn.iocoder.yudao.module.promotion.controller.admin.combination.vo.product.CombinationProductUpdateReqVO;
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import lombok.ToString;
|
||||||
|
|
||||||
|
import javax.validation.Valid;
|
||||||
|
import javax.validation.constraints.NotNull;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Schema(description = "管理后台 - 拼团活动更新 Request VO")
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@ToString(callSuper = true)
|
||||||
|
public class CombinationActivityUpdateReqVO extends CombinationActivityBaseVO {
|
||||||
|
|
||||||
|
@Schema(description = "活动编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "22901")
|
||||||
|
@NotNull(message = "活动编号不能为空")
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
@Schema(description = "拼团商品", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||||
|
@Valid
|
||||||
|
private List<CombinationProductUpdateReqVO> products;
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,14 @@
|
|||||||
|
package cn.iocoder.yudao.module.promotion.controller.admin.combination.vo.product;
|
||||||
|
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import lombok.ToString;
|
||||||
|
|
||||||
|
@Schema(description = "管理后台 - 拼团商品创建 Request VO")
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@ToString(callSuper = true)
|
||||||
|
public class CombinationProductCreateReqVO extends CombinationProductBaseVO {
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,47 @@
|
|||||||
|
package cn.iocoder.yudao.module.promotion.controller.admin.combination.vo.product;
|
||||||
|
|
||||||
|
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import lombok.ToString;
|
||||||
|
import org.springframework.format.annotation.DateTimeFormat;
|
||||||
|
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
|
||||||
|
import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
|
||||||
|
|
||||||
|
@Schema(description = "管理后台 - 拼团商品分页 Request VO")
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@ToString(callSuper = true)
|
||||||
|
public class CombinationProductPageReqVO extends PageParam {
|
||||||
|
|
||||||
|
@Schema(description = "拼团活动编号", example = "6829")
|
||||||
|
private Long activityId;
|
||||||
|
|
||||||
|
@Schema(description = "商品 SPU 编号", example = "18731")
|
||||||
|
private Long spuId;
|
||||||
|
|
||||||
|
@Schema(description = "商品 SKU 编号", example = "31675")
|
||||||
|
private Long skuId;
|
||||||
|
|
||||||
|
@Schema(description = "拼团商品状态", example = "2")
|
||||||
|
private Integer activityStatus;
|
||||||
|
|
||||||
|
@Schema(description = "活动开始时间点")
|
||||||
|
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||||
|
private LocalDateTime[] activityStartTime;
|
||||||
|
|
||||||
|
@Schema(description = "活动结束时间点")
|
||||||
|
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||||
|
private LocalDateTime[] activityEndTime;
|
||||||
|
|
||||||
|
@Schema(description = "拼团价格,单位分", example = "27682")
|
||||||
|
private Integer activePrice;
|
||||||
|
|
||||||
|
@Schema(description = "创建时间")
|
||||||
|
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||||
|
private LocalDateTime[] createTime;
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,22 @@
|
|||||||
|
package cn.iocoder.yudao.module.promotion.controller.admin.combination.vo.product;
|
||||||
|
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import lombok.ToString;
|
||||||
|
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
|
||||||
|
@Schema(description = "管理后台 - 拼团商品 Response VO")
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@ToString(callSuper = true)
|
||||||
|
public class CombinationProductRespVO extends CombinationProductBaseVO {
|
||||||
|
|
||||||
|
@Schema(description = "编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "28322")
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
@Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||||
|
private LocalDateTime createTime;
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,14 @@
|
|||||||
|
package cn.iocoder.yudao.module.promotion.controller.admin.combination.vo.product;
|
||||||
|
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import lombok.ToString;
|
||||||
|
|
||||||
|
@Schema(description = "管理后台 - 拼团商品更新 Request VO")
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@ToString(callSuper = true)
|
||||||
|
public class CombinationProductUpdateReqVO extends CombinationProductBaseVO {
|
||||||
|
|
||||||
|
}
|
||||||
@ -1,22 +1,14 @@
|
|||||||
package cn.iocoder.yudao.module.promotion.controller.admin.seckill.vo.product;
|
package cn.iocoder.yudao.module.promotion.controller.admin.seckill.vo.product;
|
||||||
|
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
import lombok.*;
|
import lombok.Data;
|
||||||
import javax.validation.constraints.*;
|
import lombok.EqualsAndHashCode;
|
||||||
|
import lombok.ToString;
|
||||||
|
|
||||||
/**
|
|
||||||
* 管理后台 - 秒杀参与商品更新 Request VO
|
|
||||||
*
|
|
||||||
* @author HUIHUI
|
|
||||||
*/
|
|
||||||
@Schema(description = "管理后台 - 秒杀参与商品更新 Request VO")
|
@Schema(description = "管理后台 - 秒杀参与商品更新 Request VO")
|
||||||
@Data
|
@Data
|
||||||
@EqualsAndHashCode(callSuper = true)
|
@EqualsAndHashCode(callSuper = true)
|
||||||
@ToString(callSuper = true)
|
@ToString(callSuper = true)
|
||||||
public class SeckillProductUpdateReqVO extends SeckillProductBaseVO {
|
public class SeckillProductUpdateReqVO extends SeckillProductBaseVO {
|
||||||
|
|
||||||
@Schema(description = "秒杀参与商品编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "256")
|
|
||||||
@NotNull(message = "秒杀参与商品编号不能为空")
|
|
||||||
private Long id;
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -0,0 +1,52 @@
|
|||||||
|
package cn.iocoder.yudao.module.promotion.dal.mysql.combination.combinationactivity;
|
||||||
|
|
||||||
|
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||||
|
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
|
||||||
|
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
|
||||||
|
import cn.iocoder.yudao.module.promotion.controller.admin.combination.vo.product.CombinationProductExportReqVO;
|
||||||
|
import cn.iocoder.yudao.module.promotion.controller.admin.combination.vo.product.CombinationProductPageReqVO;
|
||||||
|
import cn.iocoder.yudao.module.promotion.dal.dataobject.combination.combinationactivity.CombinationProductDO;
|
||||||
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
|
||||||
|
import java.util.Collection;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 拼团商品 Mapper
|
||||||
|
*
|
||||||
|
* @author HUIHUI
|
||||||
|
*/
|
||||||
|
@Mapper
|
||||||
|
public interface CombinationProductMapper extends BaseMapperX<CombinationProductDO> {
|
||||||
|
|
||||||
|
default PageResult<CombinationProductDO> selectPage(CombinationProductPageReqVO reqVO) {
|
||||||
|
return selectPage(reqVO, new LambdaQueryWrapperX<CombinationProductDO>()
|
||||||
|
.eqIfPresent(CombinationProductDO::getActivityId, reqVO.getActivityId())
|
||||||
|
.eqIfPresent(CombinationProductDO::getSpuId, reqVO.getSpuId())
|
||||||
|
.eqIfPresent(CombinationProductDO::getSkuId, reqVO.getSkuId())
|
||||||
|
.eqIfPresent(CombinationProductDO::getActivityStatus, reqVO.getActivityStatus())
|
||||||
|
.betweenIfPresent(CombinationProductDO::getActivityStartTime, reqVO.getActivityStartTime())
|
||||||
|
.betweenIfPresent(CombinationProductDO::getActivityEndTime, reqVO.getActivityEndTime())
|
||||||
|
.eqIfPresent(CombinationProductDO::getActivePrice, reqVO.getActivePrice())
|
||||||
|
.betweenIfPresent(CombinationProductDO::getCreateTime, reqVO.getCreateTime())
|
||||||
|
.orderByDesc(CombinationProductDO::getId));
|
||||||
|
}
|
||||||
|
|
||||||
|
default List<CombinationProductDO> selectList(CombinationProductExportReqVO reqVO) {
|
||||||
|
return selectList(new LambdaQueryWrapperX<CombinationProductDO>()
|
||||||
|
.eqIfPresent(CombinationProductDO::getActivityId, reqVO.getActivityId())
|
||||||
|
.eqIfPresent(CombinationProductDO::getSpuId, reqVO.getSpuId())
|
||||||
|
.eqIfPresent(CombinationProductDO::getSkuId, reqVO.getSkuId())
|
||||||
|
.eqIfPresent(CombinationProductDO::getActivityStatus, reqVO.getActivityStatus())
|
||||||
|
.betweenIfPresent(CombinationProductDO::getActivityStartTime, reqVO.getActivityStartTime())
|
||||||
|
.betweenIfPresent(CombinationProductDO::getActivityEndTime, reqVO.getActivityEndTime())
|
||||||
|
.eqIfPresent(CombinationProductDO::getActivePrice, reqVO.getActivePrice())
|
||||||
|
.betweenIfPresent(CombinationProductDO::getCreateTime, reqVO.getCreateTime())
|
||||||
|
.orderByDesc(CombinationProductDO::getId));
|
||||||
|
}
|
||||||
|
|
||||||
|
default List<CombinationProductDO> selectListByActivityIds(Collection<Long> ids) {
|
||||||
|
return selectList(CombinationProductDO::getActivityId, ids);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,33 @@
|
|||||||
|
package cn.iocoder.yudao.module.promotion.dal.mysql.combination.combinationactivity;
|
||||||
|
|
||||||
|
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
|
||||||
|
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
|
||||||
|
import cn.iocoder.yudao.module.promotion.dal.dataobject.combination.combinationactivity.CombinationRecordDO;
|
||||||
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 拼团记录 Mapper
|
||||||
|
*
|
||||||
|
* @author HUIHUI
|
||||||
|
*/
|
||||||
|
@Mapper
|
||||||
|
public interface CombinationRecordMapper extends BaseMapperX<CombinationRecordDO> {
|
||||||
|
|
||||||
|
default CombinationRecordDO selectRecord(Long userId, Long orderId) {
|
||||||
|
return selectOne(CombinationRecordDO::getUserId, userId,
|
||||||
|
CombinationRecordDO::getOrderId, orderId);
|
||||||
|
}
|
||||||
|
|
||||||
|
default List<CombinationRecordDO> selectListByHeadIdAndStatus(Long headId, Integer status) {
|
||||||
|
return selectList(new LambdaQueryWrapperX<CombinationRecordDO>()
|
||||||
|
.eq(CombinationRecordDO::getHeadId, headId)
|
||||||
|
.eq(CombinationRecordDO::getStatus, status));
|
||||||
|
}
|
||||||
|
|
||||||
|
default List<CombinationRecordDO> selectListByStatus(Integer status) {
|
||||||
|
return selectList(CombinationRecordDO::getStatus, status);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue