积分模块相关接口
This commit is contained in:
parent
c07f374ed7
commit
54291604bd
|
|
@ -140,7 +140,7 @@ public class TbPointsExchangeRecordServiceImpl extends ServiceImpl<TbPointsExcha
|
|||
if (quantity <= 0) {
|
||||
throw new BadRequestException("兑换的商品库存不足");
|
||||
}
|
||||
TbMemberPoints memberPoints = tbMemberPointsMapper.selectOne(Wrappers.<TbMemberPoints>lambdaQuery().eq(TbMemberPoints::getMobile, record.getMobile()));
|
||||
TbMemberPoints memberPoints = tbMemberPointsMapper.selectOne(Wrappers.<TbMemberPoints>lambdaQuery().eq(TbMemberPoints::getMemberId, record.getMemberId()));
|
||||
if (memberPoints == null) {
|
||||
throw new BadRequestException("该会员积分不足无法兑换这个商品");
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,14 +1,18 @@
|
|||
package cn.ysk.cashier.pojo.shop;
|
||||
|
||||
import lombok.Data;
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import cn.hutool.core.bean.copier.CopyOptions;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.persistence.*;
|
||||
import javax.validation.constraints.*;
|
||||
import java.math.BigDecimal;
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
import java.sql.Timestamp;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @website https://eladmin.vip
|
||||
|
|
@ -141,7 +145,22 @@ public class TbShopUser implements Serializable {
|
|||
|
||||
@Column(name = "`join_time`")
|
||||
private Timestamp joinTime;
|
||||
|
||||
/**
|
||||
* 账户积分
|
||||
*/
|
||||
@Column(name = "`account_points`")
|
||||
private Integer accountPoints;
|
||||
/**
|
||||
* 最近一次积分变动时间
|
||||
*/
|
||||
@Column(name = "`last_points_change_time`")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
private Date lastPointsChangeTime;
|
||||
/**
|
||||
* 最近一次浮动积分
|
||||
*/
|
||||
@Column(name = "`last_float_points`")
|
||||
private Integer lastFloatPoints;
|
||||
|
||||
public void copy(TbShopUser source){
|
||||
BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(true));
|
||||
|
|
|
|||
Loading…
Reference in New Issue