优惠券活动
This commit is contained in:
parent
a15d5d7c36
commit
fa59c9ca73
@ -78,7 +78,6 @@ public class MemberExperienceExecute implements MemberRegisterEvent, GoodsCommen
|
||||
Double point= CurrencyUtil.mul(experienceSetting.getMoney(),order.getFlowPrice(),0);
|
||||
//赠送会员经验值
|
||||
memberService.updateMemberExperience(point.longValue(), true, order.getMemberId(), "会员下单,赠送经验值" + point + "分");
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -401,6 +401,7 @@ public class MemberServiceImpl extends ServiceImpl<MemberMapper, Member> impleme
|
||||
currentExperience = CurrencyUtil.sub(member.getPoint(), experience) < 0 ? 0 : new Double(CurrencyUtil.sub(member.getExperience(), experience)).longValue();
|
||||
}
|
||||
member.setExperience(currentExperience);
|
||||
|
||||
return this.updateById(member);
|
||||
}
|
||||
throw new ServiceException(ResultCode.USER_NOT_EXIST);
|
||||
|
@ -20,7 +20,7 @@ import javax.persistence.Table;
|
||||
@Entity
|
||||
@Table(name = "li_coupon")
|
||||
@TableName("li_coupon")
|
||||
@ApiModel(value = "优惠券活动实体类")
|
||||
@ApiModel(value = "优惠券实体类")
|
||||
public class Coupon extends BasePromotion {
|
||||
|
||||
|
||||
@ -35,7 +35,7 @@ public class Coupon extends BasePromotion {
|
||||
*
|
||||
* @see cn.lili.modules.promotion.entity.enums.CouponTypeEnum
|
||||
*/
|
||||
@ApiModelProperty(value = "活动类型")
|
||||
@ApiModelProperty(value = "优惠券类型")
|
||||
private String couponType;
|
||||
|
||||
/**
|
||||
|
@ -0,0 +1,34 @@
|
||||
package cn.lili.modules.promotion.entity.dos;
|
||||
|
||||
import cn.lili.modules.promotion.entity.dto.BasePromotion;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.persistence.Entity;
|
||||
import javax.persistence.Table;
|
||||
|
||||
/**
|
||||
* 优惠券活动实体类
|
||||
*
|
||||
* @author Chopper
|
||||
* @date 2020-03-19 10:44 上午
|
||||
*/
|
||||
@Data
|
||||
@Entity
|
||||
@Table(name = "li_coupon_activity")
|
||||
@TableName("li_coupon_activity")
|
||||
@ApiModel(value = "优惠券活动实体类")
|
||||
public class CouponActivity extends BasePromotion {
|
||||
|
||||
@ApiModelProperty(value = "优惠券活动类型")
|
||||
private String couponActivityType;
|
||||
|
||||
@ApiModelProperty(value = "活动范围", allowableValues = "ALL:全部会员,DESIGNATED:指定会员")
|
||||
private String activityScope;
|
||||
|
||||
@ApiModelProperty(value = "活动范围")
|
||||
private String activityScopeInfo;
|
||||
|
||||
}
|
@ -0,0 +1,35 @@
|
||||
package cn.lili.modules.promotion.entity.dos;
|
||||
|
||||
import cn.lili.base.BaseEntity;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.persistence.Entity;
|
||||
import javax.persistence.Table;
|
||||
|
||||
/**
|
||||
* 优惠券活动实体类
|
||||
*
|
||||
* @author Chopper
|
||||
* @date 2020-03-19 10:44 上午
|
||||
*/
|
||||
@Data
|
||||
@Entity
|
||||
@Table(name = "li_coupon_activity_item")
|
||||
@TableName("li_coupon_activity_item")
|
||||
@ApiModel(value = "优惠券活动-优惠券关联实体类")
|
||||
public class CouponActivityItem extends BaseEntity {
|
||||
|
||||
@ApiModelProperty(value = "优惠券活动ID")
|
||||
private String activityId;
|
||||
|
||||
@ApiModelProperty(value = "优惠券ID")
|
||||
private String couponId;
|
||||
|
||||
@ApiModelProperty(value = "优惠券数量")
|
||||
private Integer num;
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,23 @@
|
||||
package cn.lili.modules.promotion.entity.enums;
|
||||
|
||||
/**
|
||||
* 优惠券活动范围枚举
|
||||
*
|
||||
* @author Bulbasaur
|
||||
* @date: 2021/5/20 6:05 下午
|
||||
*/
|
||||
public enum ActivityRangeEnum {
|
||||
|
||||
ALL("新人赠券"),
|
||||
DESIGNATED("精确发券");
|
||||
|
||||
private final String description;
|
||||
|
||||
ActivityRangeEnum(String str) {
|
||||
this.description = str;
|
||||
}
|
||||
|
||||
public String description() {
|
||||
return description;
|
||||
}
|
||||
}
|
@ -0,0 +1,23 @@
|
||||
package cn.lili.modules.promotion.entity.enums;
|
||||
|
||||
/**
|
||||
* 优惠券活动类型枚举
|
||||
*
|
||||
* @author Bulbasaur
|
||||
* @date: 2021/5/20 5:47 下午
|
||||
*/
|
||||
public enum CouponActivityTypeEnum {
|
||||
|
||||
REGISTERED("新人赠券"),
|
||||
SPECIFY("精确发券");
|
||||
|
||||
private final String description;
|
||||
|
||||
CouponActivityTypeEnum(String str) {
|
||||
this.description = str;
|
||||
}
|
||||
|
||||
public String description() {
|
||||
return description;
|
||||
}
|
||||
}
|
@ -0,0 +1,15 @@
|
||||
package cn.lili.modules.promotion.mapper;
|
||||
|
||||
import cn.lili.modules.promotion.entity.dos.CouponActivity;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
* 优惠券活动
|
||||
* @author Bulbasaur
|
||||
* @date: 2021/5/20 6:11 下午
|
||||
*
|
||||
*/
|
||||
public interface CouponActivityItemMapper extends BaseMapper<CouponActivity> {
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,15 @@
|
||||
package cn.lili.modules.promotion.mapper;
|
||||
|
||||
import cn.lili.modules.promotion.entity.dos.CouponActivity;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
* 优惠券活动
|
||||
* @author Bulbasaur
|
||||
* @date: 2021/5/20 6:11 下午
|
||||
*
|
||||
*/
|
||||
public interface CouponActivityMapper extends BaseMapper<CouponActivity> {
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,13 @@
|
||||
package cn.lili.modules.promotion.service;
|
||||
|
||||
import cn.lili.modules.promotion.entity.dos.CouponActivityItem;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
/**
|
||||
* 优惠券活动-优惠券业务层
|
||||
*
|
||||
* @author Bulbasaur
|
||||
* @date: 2021/5/20 6:10 下午
|
||||
*/
|
||||
public interface CouponActivityItemService extends IService<CouponActivityItem> {
|
||||
}
|
@ -0,0 +1,27 @@
|
||||
package cn.lili.modules.promotion.service;
|
||||
|
||||
import cn.lili.modules.promotion.entity.dos.CouponActivity;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
/**
|
||||
* 优惠券活动业务层
|
||||
*
|
||||
* @author Bulbasaur
|
||||
* @date: 2021/5/20 6:10 下午
|
||||
*/
|
||||
public interface CouponActivityService extends IService<CouponActivity> {
|
||||
|
||||
//创建优惠券活动--精准发券、新人赠券、会员等级赠券
|
||||
|
||||
//编辑优惠券活动
|
||||
|
||||
//删除优惠券活动
|
||||
|
||||
//关闭优惠券活动
|
||||
|
||||
//开启优惠券活动
|
||||
|
||||
//查看优惠券活动
|
||||
|
||||
//查看优惠券活动
|
||||
}
|
@ -0,0 +1,15 @@
|
||||
package cn.lili.modules.promotion.serviceimpl;
|
||||
|
||||
import cn.lili.modules.promotion.entity.dos.CouponActivity;
|
||||
import cn.lili.modules.promotion.mapper.CouponActivityMapper;
|
||||
import cn.lili.modules.promotion.service.CouponActivityService;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
|
||||
/**
|
||||
* 优惠券活动业务层实现
|
||||
*
|
||||
* @author Bulbasaur
|
||||
* @date: 2021/5/20 6:10 下午
|
||||
*/
|
||||
public class CouponActivityServiceImpl extends ServiceImpl<CouponActivityMapper, CouponActivity> implements CouponActivityService {
|
||||
}
|
@ -53,7 +53,6 @@ import java.util.stream.Collectors;
|
||||
*/
|
||||
@Service
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
|
||||
public class CouponServiceImpl extends ServiceImpl<CouponMapper, Coupon> implements CouponService {
|
||||
|
||||
//延时任务
|
||||
|
Loading…
x
Reference in New Issue
Block a user