1. add lottery
This commit is contained in:
2026-02-14 22:00:02 +08:00
parent 9674374fad
commit 16a9bcfbd8
6 changed files with 12 additions and 9 deletions

View File

@@ -47,10 +47,10 @@ public interface CommonLotteryRecordMapper extends BaseMapper<CommonLotteryRecor
* 自定义分页
*
* @param page 分页参数
* @param lotteryRecord 查询参数
* @param vo 查询参数
* @return List<LotteryRecordVO>
*/
List<CommonLotteryRecordVO> selectLotteryRecordPage(IPage page, CommonLotteryRecordVO lotteryRecord);
List<CommonLotteryRecordVO> selectLotteryRecordPage(IPage page, CommonLotteryRecordVO vo);
/**

View File

@@ -19,10 +19,10 @@
</resultMap>
<select id="selectLotteryRecordPage" resultMap="lotteryRecordResultMap">
<select id="selectLotteryRecordPage" resultType="org.springblade.modules.common.pojo.vo.CommonLotteryRecordVO">
select * from common_lottery_record where is_deleted = 0
<if test="lotteryRecord.userId!=null">
and user_id = #{lotteryRecord.userId}
<if test="vo.userId!=null">
and user_id = #{vo.userId}
</if>
</select>

View File

@@ -31,7 +31,7 @@ import com.baomidou.mybatisplus.annotation.TableName;
import java.math.BigDecimal;
import lombok.EqualsAndHashCode;
import org.springblade.core.tenant.mp.TenantEntity;
import org.springblade.core.mp.base.BaseEntity;
import java.io.Serial;
/**
@@ -44,7 +44,7 @@ import java.io.Serial;
@TableName("common_lottery_prize")
@Schema(description = "LotteryPrize对象")
@EqualsAndHashCode(callSuper = true)
public class CommonLotteryPrizeEntity extends TenantEntity {
public class CommonLotteryPrizeEntity extends BaseEntity {
@Serial
private static final long serialVersionUID = 1L;

View File

@@ -31,7 +31,7 @@ import com.baomidou.mybatisplus.annotation.TableName;
import java.math.BigDecimal;
import lombok.EqualsAndHashCode;
import org.springblade.core.tenant.mp.TenantEntity;
import org.springblade.core.mp.base.BaseEntity;
import java.io.Serial;
/**
@@ -44,7 +44,7 @@ import java.io.Serial;
@TableName("common_lottery_record")
@Schema(description = "LotteryRecord对象")
@EqualsAndHashCode(callSuper = true)
public class CommonLotteryRecordEntity extends TenantEntity {
public class CommonLotteryRecordEntity extends BaseEntity {
@Serial
private static final long serialVersionUID = 1L;

View File

@@ -34,6 +34,7 @@ import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import lombok.EqualsAndHashCode;
import org.springblade.core.mp.base.BaseEntity;
import java.io.Serializable;
@@ -48,6 +49,7 @@ import java.io.Serial;
@Data
@TableName("user_order")
@Schema(description = "Order对象")
@EqualsAndHashCode(callSuper = true)
public class CommonUserOrderEntity extends BaseEntity {
@Serial

View File

@@ -116,6 +116,7 @@ public class CommonUserOrderServiceImpl extends ServiceImpl<CommonUserOrderMappe
order.setActualAmount(actualAmount);
order.setOrderType(orderType);
order.setPaymentType(request.getIsOfflinePayment() ? request.getPaymentType() : null);
order.setCreateTime(new Date());
this.save(order);
yield new CreateOrderResponse(String.valueOf(order.getId()), actualAmount, totalAmount, discount);
}