feat:
1. add lottery
This commit is contained in:
@@ -47,10 +47,10 @@ public interface CommonLotteryRecordMapper extends BaseMapper<CommonLotteryRecor
|
|||||||
* 自定义分页
|
* 自定义分页
|
||||||
*
|
*
|
||||||
* @param page 分页参数
|
* @param page 分页参数
|
||||||
* @param lotteryRecord 查询参数
|
* @param vo 查询参数
|
||||||
* @return List<LotteryRecordVO>
|
* @return List<LotteryRecordVO>
|
||||||
*/
|
*/
|
||||||
List<CommonLotteryRecordVO> selectLotteryRecordPage(IPage page, CommonLotteryRecordVO lotteryRecord);
|
List<CommonLotteryRecordVO> selectLotteryRecordPage(IPage page, CommonLotteryRecordVO vo);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -19,10 +19,10 @@
|
|||||||
</resultMap>
|
</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
|
select * from common_lottery_record where is_deleted = 0
|
||||||
<if test="lotteryRecord.userId!=null">
|
<if test="vo.userId!=null">
|
||||||
and user_id = #{lotteryRecord.userId}
|
and user_id = #{vo.userId}
|
||||||
</if>
|
</if>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ import com.baomidou.mybatisplus.annotation.TableName;
|
|||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
|
|
||||||
import lombok.EqualsAndHashCode;
|
import lombok.EqualsAndHashCode;
|
||||||
import org.springblade.core.tenant.mp.TenantEntity;
|
import org.springblade.core.mp.base.BaseEntity;
|
||||||
import java.io.Serial;
|
import java.io.Serial;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -44,7 +44,7 @@ import java.io.Serial;
|
|||||||
@TableName("common_lottery_prize")
|
@TableName("common_lottery_prize")
|
||||||
@Schema(description = "LotteryPrize对象")
|
@Schema(description = "LotteryPrize对象")
|
||||||
@EqualsAndHashCode(callSuper = true)
|
@EqualsAndHashCode(callSuper = true)
|
||||||
public class CommonLotteryPrizeEntity extends TenantEntity {
|
public class CommonLotteryPrizeEntity extends BaseEntity {
|
||||||
|
|
||||||
@Serial
|
@Serial
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ import com.baomidou.mybatisplus.annotation.TableName;
|
|||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
|
|
||||||
import lombok.EqualsAndHashCode;
|
import lombok.EqualsAndHashCode;
|
||||||
import org.springblade.core.tenant.mp.TenantEntity;
|
import org.springblade.core.mp.base.BaseEntity;
|
||||||
import java.io.Serial;
|
import java.io.Serial;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -44,7 +44,7 @@ import java.io.Serial;
|
|||||||
@TableName("common_lottery_record")
|
@TableName("common_lottery_record")
|
||||||
@Schema(description = "LotteryRecord对象")
|
@Schema(description = "LotteryRecord对象")
|
||||||
@EqualsAndHashCode(callSuper = true)
|
@EqualsAndHashCode(callSuper = true)
|
||||||
public class CommonLotteryRecordEntity extends TenantEntity {
|
public class CommonLotteryRecordEntity extends BaseEntity {
|
||||||
|
|
||||||
@Serial
|
@Serial
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
|
|||||||
@@ -34,6 +34,7 @@ import com.baomidou.mybatisplus.annotation.IdType;
|
|||||||
import com.baomidou.mybatisplus.annotation.TableId;
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
import org.springblade.core.mp.base.BaseEntity;
|
import org.springblade.core.mp.base.BaseEntity;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
@@ -48,6 +49,7 @@ import java.io.Serial;
|
|||||||
@Data
|
@Data
|
||||||
@TableName("user_order")
|
@TableName("user_order")
|
||||||
@Schema(description = "Order对象")
|
@Schema(description = "Order对象")
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
public class CommonUserOrderEntity extends BaseEntity {
|
public class CommonUserOrderEntity extends BaseEntity {
|
||||||
|
|
||||||
@Serial
|
@Serial
|
||||||
|
|||||||
@@ -116,6 +116,7 @@ public class CommonUserOrderServiceImpl extends ServiceImpl<CommonUserOrderMappe
|
|||||||
order.setActualAmount(actualAmount);
|
order.setActualAmount(actualAmount);
|
||||||
order.setOrderType(orderType);
|
order.setOrderType(orderType);
|
||||||
order.setPaymentType(request.getIsOfflinePayment() ? request.getPaymentType() : null);
|
order.setPaymentType(request.getIsOfflinePayment() ? request.getPaymentType() : null);
|
||||||
|
order.setCreateTime(new Date());
|
||||||
this.save(order);
|
this.save(order);
|
||||||
yield new CreateOrderResponse(String.valueOf(order.getId()), actualAmount, totalAmount, discount);
|
yield new CreateOrderResponse(String.valueOf(order.getId()), actualAmount, totalAmount, discount);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user