diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeExchange/controller/ActiveExchangeController.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeExchange/controller/ActiveExchangeController.java index e9306e130..9896610a4 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeExchange/controller/ActiveExchangeController.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeExchange/controller/ActiveExchangeController.java @@ -66,4 +66,18 @@ public class ActiveExchangeController extends BaseController { return getSuccessResult(this.activeExchangeService.selectConsumptionList(pageNo,pageSize, transferDTO)); } + /** + * 查询优惠券列表 + * @param pageNo + * @param pageSize + * @param transferDTO + * @return + */ + @GetMapping("selectCardFavorableList") + public ResponseObject selectCardFavorableList(@RequestParam(value = "pageNo",defaultValue = "1") Integer pageNo, + @RequestParam(value = "pageSize",defaultValue = "10") Integer pageSize, + @Param("transferDTO") TransferDTO transferDTO) { + return getSuccessResult(this.activeExchangeService.selectCardFavorableList(pageNo,pageSize, transferDTO)); + } + } diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeExchange/service/ActiveExchangeService.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeExchange/service/ActiveExchangeService.java index 13d947c97..8d079c097 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeExchange/service/ActiveExchangeService.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeExchange/service/ActiveExchangeService.java @@ -3,6 +3,7 @@ package com.fuint.business.marketingActivity.activeExchange.service; import com.fuint.business.marketingActivity.activeExchange.dto.ActiveExchangeRecordDTO; import com.fuint.business.marketingActivity.activeExchange.vo.ActiveExchangeRecordVO; import com.fuint.business.marketingActivity.activeExchange.dto.TransferDTO; +import com.fuint.business.marketingActivity.activeExchange.vo.ExchangeFavorableVO; import com.fuint.business.marketingActivity.activeExchange.vo.MaxoutVO; import com.fuint.business.marketingActivity.cardExchange.entity.CardExchangeRecord; @@ -32,4 +33,13 @@ public interface ActiveExchangeService { * @return */ List selectConsumptionList(Integer pageNo, Integer pageSize, TransferDTO transferDTO); + + /** + * 查询优惠券列表 + * @param pageNo + * @param pageSize + * @param transferDTO + * @return + */ + List selectCardFavorableList(Integer pageNo, Integer pageSize, TransferDTO transferDTO); } diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeExchange/service/impl/ActiveExchangeServiceImpl.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeExchange/service/impl/ActiveExchangeServiceImpl.java index 846cb55f6..fbc9b0262 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeExchange/service/impl/ActiveExchangeServiceImpl.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeExchange/service/impl/ActiveExchangeServiceImpl.java @@ -1,9 +1,6 @@ package com.fuint.business.marketingActivity.activeExchange.service.impl; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; -import com.baomidou.mybatisplus.core.metadata.IPage; -import com.baomidou.mybatisplus.core.toolkit.CollectionUtils; -import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.fuint.business.marketingActivity.activeDiscount.entity.ActiveDiscount; import com.fuint.business.marketingActivity.activeDiscount.entity.ActiveDiscountChild; import com.fuint.business.marketingActivity.activeDiscount.service.ActiveDiscountChildService; @@ -12,23 +9,25 @@ import com.fuint.business.marketingActivity.activeExchange.dto.ActiveExchangeRec import com.fuint.business.marketingActivity.activeExchange.dto.TransferDTO; import com.fuint.business.marketingActivity.activeExchange.service.ActiveExchangeService; import com.fuint.business.marketingActivity.activeExchange.vo.ActiveExchangeRecordVO; +import com.fuint.business.marketingActivity.activeExchange.vo.ExchangeFavorableVO; import com.fuint.business.marketingActivity.activeExchange.vo.MaxoutVO; import com.fuint.business.marketingActivity.activeFullminus.entity.ActiveFullminus; import com.fuint.business.marketingActivity.activeFullminus.service.ActiveFullminusService; import com.fuint.business.marketingActivity.cardExchange.entity.CardExchangeRecord; import com.fuint.business.marketingActivity.cardExchange.service.CardExchangeRecordService; +import com.fuint.business.marketingActivity.cardFavorable.entity.CardFavorable; import com.fuint.business.marketingActivity.cardFavorable.entity.CardFavorableRecord; import com.fuint.business.marketingActivity.cardFavorable.service.CardFavorableRecordService; +import com.fuint.business.marketingActivity.cardFavorable.service.CardFavorableService; +import com.fuint.business.marketingActivity.cardFavorable.vo.CardFavorableVO; import com.fuint.business.userManager.service.LJUserGradeService; import org.apache.commons.lang3.ObjectUtils; import org.springframework.beans.BeanUtils; -import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import javax.annotation.Resource; import java.util.ArrayList; -import java.util.Arrays; import java.util.List; import java.util.stream.Collectors; import java.util.stream.Stream; @@ -46,8 +45,10 @@ public class ActiveExchangeServiceImpl implements ActiveExchangeService { private ActiveDiscountChildService activeDiscountChildService; @Resource private ActiveFullminusService activeFullminusService; - @Autowired + @Resource private LJUserGradeService userGradeService; + @Resource + private CardFavorableService cardFavorableService; /** * 分页查询所有 * @param @@ -139,6 +140,13 @@ public class ActiveExchangeServiceImpl implements ActiveExchangeService { return update; } + /** + * 查询满减活动 + * @param pageNo + * @param pageSize + * @param transferDTO + * @return + */ @Override public List selectConsumptionList(Integer pageNo, Integer pageSize, TransferDTO transferDTO) { ArrayList maxoutVOArrayList = new ArrayList<>(); @@ -190,4 +198,27 @@ public class ActiveExchangeServiceImpl implements ActiveExchangeService { } return maxoutVOArrayList; } + + @Override + public List selectCardFavorableList(Integer pageNo, Integer pageSize, TransferDTO transferDTO) { + //查询优惠券领取记录 + LambdaQueryWrapper recordLambdaQueryWrapper = new LambdaQueryWrapper<>(); + recordLambdaQueryWrapper.eq(CardFavorableRecord::getMtUserId,transferDTO.getUserId()); + recordLambdaQueryWrapper.eq(CardFavorableRecord::getStoreId,transferDTO.getStoreId()); + recordLambdaQueryWrapper.eq(CardFavorableRecord::getStatus,"0"); + List list = cardFavorableRecordService.list(); + //筛查优惠券 + ArrayList exchangeFavorableVOArrayList = new ArrayList<>(); + for (CardFavorableRecord cardFavorableRecord : list) { + ExchangeFavorableVO exchangeFavorableVO = new ExchangeFavorableVO(); + LambdaQueryWrapper cardFavorableLambdaQueryWrapper = new LambdaQueryWrapper<>(); + cardFavorableLambdaQueryWrapper.eq(CardFavorable::getId,cardFavorableRecord.getCardFavorableId()); + cardFavorableLambdaQueryWrapper.in(CardFavorable::getOilType,transferDTO.getOilName()); + cardFavorableLambdaQueryWrapper.le(CardFavorable::getSatisfiedAmount,transferDTO.getOilPrice() * transferDTO.getOilLiters()); + List list1 = cardFavorableService.list(cardFavorableLambdaQueryWrapper); + BeanUtils.copyProperties(list1.get(0), exchangeFavorableVO); + exchangeFavorableVOArrayList.add(exchangeFavorableVO); + } + return exchangeFavorableVOArrayList; + } } diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeExchange/vo/ExchangeFavorableVO.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeExchange/vo/ExchangeFavorableVO.java new file mode 100644 index 000000000..96e013007 --- /dev/null +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeExchange/vo/ExchangeFavorableVO.java @@ -0,0 +1,107 @@ +package com.fuint.business.marketingActivity.activeExchange.vo; + +import java.io.Serializable; + +public class ExchangeFavorableVO implements Serializable { + + //主键id + private Integer id; + //优惠券名称 + private String name; + //卡券类型 0:油品券 1:商品券 2:通用券 + private String type; + //优惠类型 0:满减券 1:折扣券 + private String discountType; + //满减金额 + private Double fullDeduction; + //优惠金额 + private Double discountAmount; + //满足金额 + private Double satisfiedAmount; + //优惠折扣 + private Double specialDiscount; + //折扣抵消 + private Double discountOffset; + //互斥功能 0:满减活动 1:储值卡付款 + private String exclusiveFunction; + + public Integer getId() { + return id; + } + + public void setId(Integer id) { + this.id = id; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } + + public String getDiscountType() { + return discountType; + } + + public void setDiscountType(String discountType) { + this.discountType = discountType; + } + + public Double getFullDeduction() { + return fullDeduction; + } + + public void setFullDeduction(Double fullDeduction) { + this.fullDeduction = fullDeduction; + } + + public Double getDiscountAmount() { + return discountAmount; + } + + public void setDiscountAmount(Double discountAmount) { + this.discountAmount = discountAmount; + } + + public Double getSatisfiedAmount() { + return satisfiedAmount; + } + + public void setSatisfiedAmount(Double satisfiedAmount) { + this.satisfiedAmount = satisfiedAmount; + } + + public Double getSpecialDiscount() { + return specialDiscount; + } + + public void setSpecialDiscount(Double specialDiscount) { + this.specialDiscount = specialDiscount; + } + + public Double getDiscountOffset() { + return discountOffset; + } + + public void setDiscountOffset(Double discountOffset) { + this.discountOffset = discountOffset; + } + + public String getExclusiveFunction() { + return exclusiveFunction; + } + + public void setExclusiveFunction(String exclusiveFunction) { + this.exclusiveFunction = exclusiveFunction; + } +} diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeNewlyweds/service/impl/ActiveNewlywedsServiceImpl.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeNewlyweds/service/impl/ActiveNewlywedsServiceImpl.java index 2cfe2dbca..49aa3e2b3 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeNewlyweds/service/impl/ActiveNewlywedsServiceImpl.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeNewlyweds/service/impl/ActiveNewlywedsServiceImpl.java @@ -96,7 +96,7 @@ public class ActiveNewlywedsServiceImpl extends ServiceImpl records = page1.getRecords(); List activeNewlywedsVOList = records.stream().map(s ->{ ActiveNewlywedsVO activeNewlywedsVO = new ActiveNewlywedsVO(); - //获取获取兑换卡券 + //获取兑换卡券 LambdaQueryWrapper queryWrappers = new LambdaQueryWrapper<>(); queryWrappers.eq(ActiveNewlywedsChild::getActiveNewlywedsId,s.getId()); queryWrappers.orderByDesc(ActiveNewlywedsChild::getCreateTime); diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardValue/controller/CardValueController.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardValue/controller/CardValueController.java index b9b8f20be..9cb6a9ce8 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardValue/controller/CardValueController.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardValue/controller/CardValueController.java @@ -4,21 +4,31 @@ package com.fuint.business.marketingActivity.cardValue.controller; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.core.toolkit.CollectionUtils; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.fuint.business.marketingActivity.activeNewlyweds.controller.vo.ActiveNewlywedsVO; +import com.fuint.business.marketingActivity.activeNewlyweds.entity.ActiveNewlyweds; +import com.fuint.business.marketingActivity.activeNewlyweds.entity.ActiveNewlywedsChild; +import com.fuint.business.marketingActivity.cardValue.dto.CardValueDTO; import com.fuint.business.marketingActivity.cardValue.entity.CardValue; +import com.fuint.business.marketingActivity.cardValue.entity.CardValueChild; +import com.fuint.business.marketingActivity.cardValue.service.CardValueChildService; import com.fuint.business.marketingActivity.cardValue.service.CardValueService; +import com.fuint.business.marketingActivity.cardValue.vo.CardValueVO; import com.fuint.business.store.service.StoreService; import com.fuint.common.util.TokenUtil; import com.fuint.framework.web.BaseController; import com.fuint.framework.web.ResponseObject; import org.apache.commons.lang3.ObjectUtils; import org.apache.ibatis.annotations.Param; +import org.springframework.beans.BeanUtils; import org.springframework.web.bind.annotation.*; import javax.annotation.Resource; import java.io.Serializable; import java.util.Date; import java.util.List; +import java.util.stream.Collectors; /** * 储值卡表(CardValue)表控制层 @@ -38,6 +48,9 @@ public class CardValueController extends BaseController { @Resource private StoreService storeService; + @Resource + private CardValueChildService cardValueChildService; + /** * 分页查询所有数据 * @param pageNo @@ -94,36 +107,98 @@ public class CardValueController extends BaseController { */ @GetMapping("/selectById/{id}") public ResponseObject selectById(@PathVariable Serializable id) { - return getSuccessResult(this.cardValueService.getById(id)); + CardValueVO cardValueVO = new CardValueVO(); + if (ObjectUtils.isNotEmpty(id)){ + //获取新人有礼活动信息 + CardValue cardValue = this.cardValueService.getById(id); + //获取兑换物品信息 + LambdaQueryWrapper queryWrapper = new LambdaQueryWrapper<>(); + queryWrapper.eq(CardValueChild::getCardValueId,id); + queryWrapper.orderByDesc(CardValueChild::getCreateTime); + List activeNewlywedsChildList = cardValueChildService.list(queryWrapper); + if (CollectionUtils.isNotEmpty(activeNewlywedsChildList)){ + //封装VO返回 + BeanUtils.copyProperties(cardValue,cardValueVO); + cardValueVO.setCardValueChildList(activeNewlywedsChildList); + } + } + return getSuccessResult(cardValueVO); + + //return getSuccessResult(this.cardValueService.getById(id)); } /** * 新增数据 * - * @param cardValue 实体对象 + * @param cardValueDTO 实体对象 * @return 新增结果 */ @PostMapping - public ResponseObject insert(@RequestBody CardValue cardValue) { + public ResponseObject insert(@RequestBody CardValueDTO cardValueDTO) { + boolean save = false; //获取当前店铺的id和连锁店id + if (ObjectUtils.isNotEmpty(TokenUtil.getNowAccountInfo().getStoreId())) { + cardValueDTO.setStoreId(TokenUtil.getNowAccountInfo().getStoreId()); + cardValueDTO.setChainStoreId(storeService.getById(TokenUtil.getNowAccountInfo().getStoreId()).getChainStoreId()); + } + //新增折扣营销活动模板 + CardValue cardValue = new CardValue(); + cardValue.setStartTime(new Date()); + cardValue.setEndTime(new Date()); + if (ObjectUtils.isNotEmpty(cardValueDTO)){ + BeanUtils.copyProperties(cardValueDTO,cardValue); + save = this.cardValueService.save(cardValue); + } + //新增兑换物品 + List cardValueChildList = cardValueDTO.getCardValueChildList(); + cardValueChildList.stream().map(s ->{ + s.setCardValueId(cardValue.getId()); + return s; + }).collect(Collectors.toList()); + save = cardValueChildService.saveBatch(cardValueChildList); + return getSuccessResult(save); + + /*//获取当前店铺的id和连锁店id if (ObjectUtils.isNotEmpty(TokenUtil.getNowAccountInfo().getStoreId())) { cardValue.setStartTime(new Date()); cardValue.setEndTime(new Date()); cardValue.setStoreId(TokenUtil.getNowAccountInfo().getStoreId()); cardValue.setChainStoreId(storeService.getById(TokenUtil.getNowAccountInfo().getStoreId()).getChainStoreId()); } - return getSuccessResult(this.cardValueService.save(cardValue)); + return getSuccessResult(this.cardValueService.save(cardValue));*/ } /** * 修改数据 * - * @param cardValue 实体对象 + * @param cardValueDTO 实体对象 * @return 修改结果 */ @PutMapping - public ResponseObject update(@RequestBody CardValue cardValue) { - return getSuccessResult(this.cardValueService.updateById(cardValue)); + public ResponseObject update(@RequestBody CardValueDTO cardValueDTO) { + + boolean update = false; + //更新新人有礼活动 + CardValue cardValue = new CardValue(); + BeanUtils.copyProperties(cardValueDTO,cardValue); + + update =this.cardValueService.updateById(cardValue); + //更新子表数据 + LambdaQueryWrapper queryWrapper = new LambdaQueryWrapper<>(); + queryWrapper.eq(CardValueChild::getCardValueId,cardValueDTO.getId()); + cardValueChildService.remove(queryWrapper); + //新增兑换物品 + List cardValueChildList = cardValueDTO.getCardValueChildList(); + if (CollectionUtils.isNotEmpty(cardValueChildList)){ + cardValueChildList.stream().map(s ->{ + s.setCardValueId(cardValue.getId()); + return s; + }).collect(Collectors.toList()); + update = cardValueChildService.saveBatch(cardValueChildList); + } + return getSuccessResult(update); + + //return getSuccessResult(this.cardValueService.updateById(cardValue)); } /** @@ -136,5 +211,18 @@ public class CardValueController extends BaseController { public ResponseObject delete(@RequestParam("idList") List idList) { return getSuccessResult(this.cardValueService.removeByIds(idList)); } + + /** + * 数组转字符串 + * @param array + * @return + */ + public static String arrayToString(String[] array){ + String result = ""; + for (String s : array) { + result += s + ","; + } + return result; + } } diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardValue/dto/CardValueDTO.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardValue/dto/CardValueDTO.java new file mode 100644 index 000000000..109e21069 --- /dev/null +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardValue/dto/CardValueDTO.java @@ -0,0 +1,332 @@ +package com.fuint.business.marketingActivity.cardValue.dto; + +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.extension.activerecord.Model; +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fuint.business.marketingActivity.activeNewlyweds.entity.ActiveNewlywedsChild; +import com.fuint.business.marketingActivity.cardValue.entity.CardValue; +import com.fuint.business.marketingActivity.cardValue.entity.CardValueChild; + +import java.util.Date; +import java.util.List; + +public class CardValueDTO extends Model { + + //主键id + @TableId(type = IdType.AUTO) + private Integer id; + //所属连锁店id + private Integer chainStoreId; + //所属店铺id + private Integer storeId; + //储值卡状态 1:在用 2:挂失 3:停用 + private String status; + //是否在线 0:在线 1: 下线 + private String isonline; + //储值卡面值 + private Double bidBalance; + //储值卡实际售价 + private Double rechargeBalance; + //储值卡赠送金额 + private Double giftBalance; + //赠送积分 + private Integer points; + //赠送成长值 + private Integer growthValue; + //赠送加油金 + private Integer refuelMoney; + //附加福利 + private String fringeBenefit; + //参与次数 + private Integer participationNo; + //员工提成 1:仅会员首次充值提成 2:会员每次充值提成 + private String employeeCommission; + //提成类型 1:无 2:按提成金额 3:按充值金额提成比例 + private String royaltyType; + //提成金额 + private Double amountCommission; + //提成比例 + private Double percentageCommissions; + //活动时间 1:不限时间 2:自定义时间 + private String activeTime; + //活动进度 + private String activityProgress; + //活动开始时间 + //@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") + private Date startTime; + //活动结束时间 + //@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") + private Date endTime; + //活动状态 1:启用 2:禁用 + private String activeStatus; + //支付储值 1:启用 2:禁用 + private String paymentValue; + //面向群体 1:普通群体 2:等级会员 + private String groupOriented; + //会员等级 会员等级 0:新人会员 1:V1会员 2:V2会员..... + private String membershipLevel; + //排序 (数值越大,顺序越在前) + private Integer sort; + //新人有礼卡券列表 + private List cardValueChildList; + //创建者 + private String createBy; + //创建时间 + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") + private Date createTime; + //更新者 + private String updateBy; + //更新时间 + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") + private Date updateTime; + + public List getCardValueChildList() { + return cardValueChildList; + } + + public void setCardValueChildList(List cardValueChildList) { + this.cardValueChildList = cardValueChildList; + } + + public Integer getId() { + return id; + } + + public void setId(Integer id) { + this.id = id; + } + + public Integer getChainStoreId() { + return chainStoreId; + } + + public void setChainStoreId(Integer chainStoreId) { + this.chainStoreId = chainStoreId; + } + + public Integer getStoreId() { + return storeId; + } + + public void setStoreId(Integer storeId) { + this.storeId = storeId; + } + + public String getStatus() { + return status; + } + + public void setStatus(String status) { + this.status = status; + } + + public String getIsonline() { + return isonline; + } + + public void setIsonline(String isonline) { + this.isonline = isonline; + } + + public Double getBidBalance() { + return bidBalance; + } + + public void setBidBalance(Double bidBalance) { + this.bidBalance = bidBalance; + } + + public Double getRechargeBalance() { + return rechargeBalance; + } + + public void setRechargeBalance(Double rechargeBalance) { + this.rechargeBalance = rechargeBalance; + } + + public Double getGiftBalance() { + return giftBalance; + } + + public void setGiftBalance(Double giftBalance) { + this.giftBalance = giftBalance; + } + + public Integer getPoints() { + return points; + } + + public void setPoints(Integer points) { + this.points = points; + } + + public Integer getGrowthValue() { + return growthValue; + } + + public void setGrowthValue(Integer growthValue) { + this.growthValue = growthValue; + } + + public Integer getRefuelMoney() { + return refuelMoney; + } + + public void setRefuelMoney(Integer refuelMoney) { + this.refuelMoney = refuelMoney; + } + + + public String getFringeBenefit() { + return fringeBenefit; + } + + public void setFringeBenefit(String fringeBenefit) { + this.fringeBenefit = fringeBenefit; + } + + public Integer getParticipationNo() { + return participationNo; + } + + public void setParticipationNo(Integer participationNo) { + this.participationNo = participationNo; + } + + public String getEmployeeCommission() { + return employeeCommission; + } + + public void setEmployeeCommission(String employeeCommission) { + this.employeeCommission = employeeCommission; + } + + public String getRoyaltyType() { + return royaltyType; + } + + public void setRoyaltyType(String royaltyType) { + this.royaltyType = royaltyType; + } + + public Double getAmountCommission() { + return amountCommission; + } + + public void setAmountCommission(Double amountCommission) { + this.amountCommission = amountCommission; + } + + public Double getPercentageCommissions() { + return percentageCommissions; + } + + public void setPercentageCommissions(Double percentageCommissions) { + this.percentageCommissions = percentageCommissions; + } + + public String getActiveTime() { + return activeTime; + } + + public void setActiveTime(String activeTime) { + this.activeTime = activeTime; + } + + public String getActivityProgress() { + return activityProgress; + } + + public void setActivityProgress(String activityProgress) { + this.activityProgress = activityProgress; + } + + public Date getStartTime() { + return startTime; + } + + public void setStartTime(Date startTime) { + this.startTime = startTime; + } + + public Date getEndTime() { + return endTime; + } + + public void setEndTime(Date endTime) { + this.endTime = endTime; + } + + public String getActiveStatus() { + return activeStatus; + } + + public void setActiveStatus(String activeStatus) { + this.activeStatus = activeStatus; + } + + public String getPaymentValue() { + return paymentValue; + } + + public void setPaymentValue(String paymentValue) { + this.paymentValue = paymentValue; + } + + public String getGroupOriented() { + return groupOriented; + } + + public void setGroupOriented(String groupOriented) { + this.groupOriented = groupOriented; + } + + public String getMembershipLevel() { + return membershipLevel; + } + + public void setMembershipLevel(String membershipLevel) { + this.membershipLevel = membershipLevel; + } + + public Integer getSort() { + return sort; + } + + public void setSort(Integer sort) { + this.sort = sort; + } + + public String getCreateBy() { + return createBy; + } + + public void setCreateBy(String createBy) { + this.createBy = createBy; + } + + public Date getCreateTime() { + return createTime; + } + + public void setCreateTime(Date createTime) { + this.createTime = createTime; + } + + public String getUpdateBy() { + return updateBy; + } + + public void setUpdateBy(String updateBy) { + this.updateBy = updateBy; + } + + public Date getUpdateTime() { + return updateTime; + } + + public void setUpdateTime(Date updateTime) { + this.updateTime = updateTime; + } +} diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardValue/entity/CardValue.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardValue/entity/CardValue.java index 06577275d..7ec93b509 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardValue/entity/CardValue.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardValue/entity/CardValue.java @@ -40,8 +40,6 @@ public class CardValue extends Model { private Integer growthValue; //赠送加油金 private Integer refuelMoney; - //卡券 - private String couponIds; //附加福利 private String fringeBenefit; //参与次数 @@ -174,13 +172,6 @@ public class CardValue extends Model { this.refuelMoney = refuelMoney; } - public String getCouponIds() { - return couponIds; - } - - public void setCouponIds(String couponIds) { - this.couponIds = couponIds; - } public String getFringeBenefit() { return fringeBenefit; diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardValue/entity/CardValueChild.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardValue/entity/CardValueChild.java new file mode 100644 index 000000000..0dc8c52af --- /dev/null +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardValue/entity/CardValueChild.java @@ -0,0 +1,205 @@ +package com.fuint.business.marketingActivity.cardValue.entity; + + +import java.util.Date; + +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.extension.activerecord.Model; +import com.fasterxml.jackson.annotation.JsonFormat; + +import java.io.Serializable; + +/** + * 储值卡子表(CardValueChild)表实体类 + * + * @author makejava + * @since 2023-11-20 17:51:05 + */ +@SuppressWarnings("serial") +public class CardValueChild extends Model { + //主键id + @TableId(type = IdType.AUTO) + private Integer id; + //储值卡id + private Integer cardValueId; + //券id + private Integer vouchersId; + //卡券类型 0:优惠券 1:兑换券 + private String activeGift; + //赠送卡券名称 + private String giftCardName; + //生效日期类型 0 ,1,2 + private String timeType; + //券类型 + private String giftCardType; + //券详情 + private String giftCardDetail; + //券有效期 + private Integer giftCardTime; + //券数量 + private Integer giftCardTotal; + //有效期0 + private Integer validityZero; + //有效期1 + private Integer validityOne; + //有效期2 + private Integer validityTwo; + //创建者 + private String createBy; + //创建时间 + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") + private Date createTime; + //更新者 + private String updateBy; + //更新时间 + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") + private Date updateTime; + + public String getTimeType() { + return timeType; + } + + public void setTimeType(String timeType) { + this.timeType = timeType; + } + + public Integer getId() { + return id; + } + + public void setId(Integer id) { + this.id = id; + } + + public Integer getCardValueId() { + return cardValueId; + } + + public void setCardValueId(Integer cardValueId) { + this.cardValueId = cardValueId; + } + + public Integer getVouchersId() { + return vouchersId; + } + + public void setVouchersId(Integer vouchersId) { + this.vouchersId = vouchersId; + } + + public String getActiveGift() { + return activeGift; + } + + public void setActiveGift(String activeGift) { + this.activeGift = activeGift; + } + + public String getGiftCardName() { + return giftCardName; + } + + public void setGiftCardName(String giftCardName) { + this.giftCardName = giftCardName; + } + + public String getGiftCardType() { + return giftCardType; + } + + public void setGiftCardType(String giftCardType) { + this.giftCardType = giftCardType; + } + + public String getGiftCardDetail() { + return giftCardDetail; + } + + public void setGiftCardDetail(String giftCardDetail) { + this.giftCardDetail = giftCardDetail; + } + + public Integer getGiftCardTime() { + return giftCardTime; + } + + public void setGiftCardTime(Integer giftCardTime) { + this.giftCardTime = giftCardTime; + } + + public Integer getGiftCardTotal() { + return giftCardTotal; + } + + public void setGiftCardTotal(Integer giftCardTotal) { + this.giftCardTotal = giftCardTotal; + } + + public Integer getValidityZero() { + return validityZero; + } + + public void setValidityZero(Integer validityZero) { + this.validityZero = validityZero; + } + + public Integer getValidityOne() { + return validityOne; + } + + public void setValidityOne(Integer validityOne) { + this.validityOne = validityOne; + } + + public Integer getValidityTwo() { + return validityTwo; + } + + public void setValidityTwo(Integer validityTwo) { + this.validityTwo = validityTwo; + } + + public String getCreateBy() { + return createBy; + } + + public void setCreateBy(String createBy) { + this.createBy = createBy; + } + + public Date getCreateTime() { + return createTime; + } + + public void setCreateTime(Date createTime) { + this.createTime = createTime; + } + + public String getUpdateBy() { + return updateBy; + } + + public void setUpdateBy(String updateBy) { + this.updateBy = updateBy; + } + + public Date getUpdateTime() { + return updateTime; + } + + public void setUpdateTime(Date updateTime) { + this.updateTime = updateTime; + } + + /** + * 获取主键值 + * + * @return 主键值 + */ + @Override + protected Serializable pkVal() { + return this.id; + } +} + diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardValue/mapper/CardValueChildMapper.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardValue/mapper/CardValueChildMapper.java new file mode 100644 index 000000000..9047a05c1 --- /dev/null +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardValue/mapper/CardValueChildMapper.java @@ -0,0 +1,14 @@ +package com.fuint.business.marketingActivity.cardValue.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.fuint.business.marketingActivity.cardValue.entity.CardValueChild; + +/** + * 储值卡子表(CardValueChild)表数据库访问层 + * + * @author makejava + * @since 2023-11-20 17:50:59 + */ +public interface CardValueChildMapper extends BaseMapper { + +} diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardValue/service/CardValueChildService.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardValue/service/CardValueChildService.java new file mode 100644 index 000000000..7340266d9 --- /dev/null +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardValue/service/CardValueChildService.java @@ -0,0 +1,14 @@ +package com.fuint.business.marketingActivity.cardValue.service; + +import com.baomidou.mybatisplus.extension.service.IService; +import com.fuint.business.marketingActivity.cardValue.entity.CardValueChild; + +/** + * 储值卡子表(CardValueChild)表服务接口 + * + * @author makejava + * @since 2023-11-20 17:51:06 + */ +public interface CardValueChildService extends IService { + +} diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardValue/service/impl/CardValueChildServiceImpl.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardValue/service/impl/CardValueChildServiceImpl.java new file mode 100644 index 000000000..c4f524b4a --- /dev/null +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardValue/service/impl/CardValueChildServiceImpl.java @@ -0,0 +1,19 @@ +package com.fuint.business.marketingActivity.cardValue.service.impl; + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.fuint.business.marketingActivity.cardValue.entity.CardValueChild; +import com.fuint.business.marketingActivity.cardValue.mapper.CardValueChildMapper; +import com.fuint.business.marketingActivity.cardValue.service.CardValueChildService; +import org.springframework.stereotype.Service; + +/** + * 储值卡子表(CardValueChild)表服务实现类 + * + * @author makejava + * @since 2023-11-20 17:51:06 + */ +@Service("cardValueChildService") +public class CardValueChildServiceImpl extends ServiceImpl implements CardValueChildService { + +} + diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardValue/vo/CardValueVO.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardValue/vo/CardValueVO.java new file mode 100644 index 000000000..b4d7ad3c8 --- /dev/null +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardValue/vo/CardValueVO.java @@ -0,0 +1,330 @@ +package com.fuint.business.marketingActivity.cardValue.vo; + +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.extension.activerecord.Model; +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fuint.business.marketingActivity.cardValue.entity.CardValue; +import com.fuint.business.marketingActivity.cardValue.entity.CardValueChild; + +import java.util.Date; +import java.util.List; + +public class CardValueVO extends Model { + + //主键id + @TableId(type = IdType.AUTO) + private Integer id; + //所属连锁店id + private Integer chainStoreId; + //所属店铺id + private Integer storeId; + //储值卡状态 1:在用 2:挂失 3:停用 + private String status; + //是否在线 0:在线 1: 下线 + private String isonline; + //储值卡面值 + private Double bidBalance; + //储值卡实际售价 + private Double rechargeBalance; + //储值卡赠送金额 + private Double giftBalance; + //赠送积分 + private Integer points; + //赠送成长值 + private Integer growthValue; + //赠送加油金 + private Integer refuelMoney; + //附加福利 + private String fringeBenefit; + //参与次数 + private Integer participationNo; + //员工提成 1:仅会员首次充值提成 2:会员每次充值提成 + private String employeeCommission; + //提成类型 1:无 2:按提成金额 3:按充值金额提成比例 + private String royaltyType; + //提成金额 + private Double amountCommission; + //提成比例 + private Double percentageCommissions; + //活动时间 1:不限时间 2:自定义时间 + private String activeTime; + //活动进度 + private String activityProgress; + //活动开始时间 + //@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") + private Date startTime; + //活动结束时间 + //@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") + private Date endTime; + //活动状态 1:启用 2:禁用 + private String activeStatus; + //支付储值 1:启用 2:禁用 + private String paymentValue; + //面向群体 1:普通群体 2:等级会员 + private String groupOriented; + //会员等级 会员等级 0:新人会员 1:V1会员 2:V2会员..... + private String membershipLevel; + //排序 (数值越大,顺序越在前) + private Integer sort; + //新人有礼卡券列表 + private List cardValueChildList; + //创建者 + private String createBy; + //创建时间 + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") + private Date createTime; + //更新者 + private String updateBy; + //更新时间 + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") + private Date updateTime; + + public Integer getId() { + return id; + } + + public void setId(Integer id) { + this.id = id; + } + + public Integer getChainStoreId() { + return chainStoreId; + } + + public void setChainStoreId(Integer chainStoreId) { + this.chainStoreId = chainStoreId; + } + + public Integer getStoreId() { + return storeId; + } + + public void setStoreId(Integer storeId) { + this.storeId = storeId; + } + + public String getStatus() { + return status; + } + + public void setStatus(String status) { + this.status = status; + } + + public String getIsonline() { + return isonline; + } + + public void setIsonline(String isonline) { + this.isonline = isonline; + } + + public Double getBidBalance() { + return bidBalance; + } + + public void setBidBalance(Double bidBalance) { + this.bidBalance = bidBalance; + } + + public Double getRechargeBalance() { + return rechargeBalance; + } + + public void setRechargeBalance(Double rechargeBalance) { + this.rechargeBalance = rechargeBalance; + } + + public Double getGiftBalance() { + return giftBalance; + } + + public void setGiftBalance(Double giftBalance) { + this.giftBalance = giftBalance; + } + + public Integer getPoints() { + return points; + } + + public void setPoints(Integer points) { + this.points = points; + } + + public Integer getGrowthValue() { + return growthValue; + } + + public void setGrowthValue(Integer growthValue) { + this.growthValue = growthValue; + } + + public Integer getRefuelMoney() { + return refuelMoney; + } + + public void setRefuelMoney(Integer refuelMoney) { + this.refuelMoney = refuelMoney; + } + + public String getFringeBenefit() { + return fringeBenefit; + } + + public void setFringeBenefit(String fringeBenefit) { + this.fringeBenefit = fringeBenefit; + } + + public Integer getParticipationNo() { + return participationNo; + } + + public void setParticipationNo(Integer participationNo) { + this.participationNo = participationNo; + } + + public String getEmployeeCommission() { + return employeeCommission; + } + + public void setEmployeeCommission(String employeeCommission) { + this.employeeCommission = employeeCommission; + } + + public String getRoyaltyType() { + return royaltyType; + } + + public void setRoyaltyType(String royaltyType) { + this.royaltyType = royaltyType; + } + + public Double getAmountCommission() { + return amountCommission; + } + + public void setAmountCommission(Double amountCommission) { + this.amountCommission = amountCommission; + } + + public Double getPercentageCommissions() { + return percentageCommissions; + } + + public void setPercentageCommissions(Double percentageCommissions) { + this.percentageCommissions = percentageCommissions; + } + + public String getActiveTime() { + return activeTime; + } + + public void setActiveTime(String activeTime) { + this.activeTime = activeTime; + } + + public String getActivityProgress() { + return activityProgress; + } + + public void setActivityProgress(String activityProgress) { + this.activityProgress = activityProgress; + } + + public Date getStartTime() { + return startTime; + } + + public void setStartTime(Date startTime) { + this.startTime = startTime; + } + + public Date getEndTime() { + return endTime; + } + + public void setEndTime(Date endTime) { + this.endTime = endTime; + } + + public String getActiveStatus() { + return activeStatus; + } + + public void setActiveStatus(String activeStatus) { + this.activeStatus = activeStatus; + } + + public String getPaymentValue() { + return paymentValue; + } + + public void setPaymentValue(String paymentValue) { + this.paymentValue = paymentValue; + } + + public String getGroupOriented() { + return groupOriented; + } + + public void setGroupOriented(String groupOriented) { + this.groupOriented = groupOriented; + } + + public String getMembershipLevel() { + return membershipLevel; + } + + public void setMembershipLevel(String membershipLevel) { + this.membershipLevel = membershipLevel; + } + + public Integer getSort() { + return sort; + } + + public void setSort(Integer sort) { + this.sort = sort; + } + + public List getCardValueChildList() { + return cardValueChildList; + } + + public void setCardValueChildList(List cardValueChildList) { + this.cardValueChildList = cardValueChildList; + } + + public String getCreateBy() { + return createBy; + } + + public void setCreateBy(String createBy) { + this.createBy = createBy; + } + + public Date getCreateTime() { + return createTime; + } + + public void setCreateTime(Date createTime) { + this.createTime = createTime; + } + + public String getUpdateBy() { + return updateBy; + } + + public void setUpdateBy(String updateBy) { + this.updateBy = updateBy; + } + + public Date getUpdateTime() { + return updateTime; + } + + public void setUpdateTime(Date updateTime) { + this.updateTime = updateTime; + } +}