From 88053d1a20d6a13c65bc71fbe900888328150d60 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BD=90=E5=A4=A9=E5=A4=A7=E5=9C=A3?= <17615834396@163.com> Date: Fri, 17 Nov 2023 15:21:40 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=BC=9A=E5=91=98=E7=AD=89?= =?UTF-8?q?=E7=BA=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/ActiveExchangeController.java | 18 ++- .../activeExchange/dto/TransferDTO.java | 66 ++++++++++ .../service/ActiveExchangeService.java | 13 +- .../impl/ActiveExchangeServiceImpl.java | 32 ++++- .../activeExchange/vo/MaxoutVO.java | 113 ++++++++++++++++++ .../impl/ActiveFullminusServiceImpl.java | 15 ++- 6 files changed, 249 insertions(+), 8 deletions(-) create mode 100644 fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeExchange/dto/TransferDTO.java create mode 100644 fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeExchange/vo/MaxoutVO.java 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 5f9bbd476..e9306e130 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 @@ -1,10 +1,9 @@ package com.fuint.business.marketingActivity.activeExchange.controller; -import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.fuint.business.marketingActivity.activeExchange.dto.ActiveExchangeRecordDTO; import com.fuint.business.marketingActivity.activeExchange.service.ActiveExchangeService; +import com.fuint.business.marketingActivity.activeExchange.dto.TransferDTO; import com.fuint.business.marketingActivity.cardExchange.entity.CardExchangeRecord; -import com.fuint.business.marketingActivity.cardExchange.service.CardExchangeRecordService; import com.fuint.framework.web.BaseController; import com.fuint.framework.web.ResponseObject; import org.apache.ibatis.annotations.Param; @@ -28,7 +27,7 @@ public class ActiveExchangeController extends BaseController { private ActiveExchangeService activeExchangeService; /** - * 分页查询所有数据 + * 分页查询所有优惠券兑换券数据 * @param pageNo * @param pageSize * @param cardExchangeRecord @@ -53,5 +52,18 @@ public class ActiveExchangeController extends BaseController { return getSuccessResult(this.activeExchangeService.updateOneById(activeExchangeRecordDTO)); } + /** + * 查询满减活动 + * @param pageNo + * @param pageSize + * @param transferDTO + * @return + */ + @GetMapping("selectConsumptionList") + public ResponseObject selectConsumptionList(@RequestParam(value = "pageNo",defaultValue = "1") Integer pageNo, + @RequestParam(value = "pageSize",defaultValue = "10") Integer pageSize, + @Param("transferDTO") TransferDTO transferDTO) { + return getSuccessResult(this.activeExchangeService.selectConsumptionList(pageNo,pageSize, transferDTO)); + } } diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeExchange/dto/TransferDTO.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeExchange/dto/TransferDTO.java new file mode 100644 index 000000000..53ac915fd --- /dev/null +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeExchange/dto/TransferDTO.java @@ -0,0 +1,66 @@ +package com.fuint.business.marketingActivity.activeExchange.dto; + +import java.io.Serializable; + +public class TransferDTO implements Serializable { + //所属店铺id + private Integer storeId; + //用户id + private Integer userId; + //会员等级id + private Integer gradeId; + //油号id + private Integer oilName; + //油品价格 + private Double oilPrice; + //油品升数 + private Double oilLiters; + + public Integer getStoreId() { + return storeId; + } + + public void setStoreId(Integer storeId) { + this.storeId = storeId; + } + + public Integer getUserId() { + return userId; + } + + public void setUserId(Integer userId) { + this.userId = userId; + } + + public Integer getGradeId() { + return gradeId; + } + + public void setGradeId(Integer gradeId) { + this.gradeId = gradeId; + } + + public Integer getOilName() { + return oilName; + } + + public void setOilName(Integer oilName) { + this.oilName = oilName; + } + + public Double getOilPrice() { + return oilPrice; + } + + public void setOilPrice(Double oilPrice) { + this.oilPrice = oilPrice; + } + + public Double getOilLiters() { + return oilLiters; + } + + public void setOilLiters(Double oilLiters) { + this.oilLiters = oilLiters; + } +} 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 3f378dcde..13d947c97 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 @@ -1,9 +1,9 @@ package com.fuint.business.marketingActivity.activeExchange.service; -import com.baomidou.mybatisplus.core.metadata.IPage; -import com.baomidou.mybatisplus.extension.plugins.pagination.Page; 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.MaxoutVO; import com.fuint.business.marketingActivity.cardExchange.entity.CardExchangeRecord; import java.util.List; @@ -23,4 +23,13 @@ public interface ActiveExchangeService { * @return */ boolean updateOneById(ActiveExchangeRecordDTO activeExchangeRecordDTO); + + /** + * 查询满减活动 + * @param pageNo + * @param pageSize + * @param transferVO + * @return + */ + List selectConsumptionList(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 7ec3791b0..9d5f54f5e 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 @@ -3,15 +3,23 @@ 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.extension.plugins.pagination.Page; +import com.fuint.business.marketingActivity.activeDiscount.service.ActiveDiscountChildService; +import com.fuint.business.marketingActivity.activeDiscount.service.ActiveDiscountService; import com.fuint.business.marketingActivity.activeExchange.dto.ActiveExchangeRecordDTO; +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.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.CardFavorableRecord; import com.fuint.business.marketingActivity.cardFavorable.service.CardFavorableRecordService; +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; @@ -29,9 +37,17 @@ public class ActiveExchangeServiceImpl implements ActiveExchangeService { private CardExchangeRecordService cardExchangeRecordService; @Resource private CardFavorableRecordService cardFavorableRecordService; + @Resource + private ActiveDiscountService activeDiscountService; + @Resource + private ActiveDiscountChildService activeDiscountChildService; + @Resource + private ActiveFullminusService activeFullminusService; + @Autowired + private LJUserGradeService userGradeService; /** * 分页查询所有 - * @param page + * @param * @param cardExchangeRecord * @return */ @@ -119,4 +135,18 @@ public class ActiveExchangeServiceImpl implements ActiveExchangeService { } return update; } + + @Override + public List selectConsumptionList(Integer pageNo, Integer pageSize, TransferDTO transferDTO) { + //构造满减券查询条件 + LambdaQueryWrapper fullminusLambdaQueryWrapper = new LambdaQueryWrapper<>(); + fullminusLambdaQueryWrapper.eq(ActiveFullminus::getStoreId,transferDTO.getStoreId()); + fullminusLambdaQueryWrapper.eq(ActiveFullminus::getIsonline,0); + fullminusLambdaQueryWrapper.eq(ActiveFullminus::getStatus,0); + //userGradeService.selectUserGradeById(transferDTO.getGradeId()).getGrade() + fullminusLambdaQueryWrapper.eq(ActiveFullminus::getDieselUserLevel,transferDTO.getGradeId()); + + //activeFullminusService.list() + return null; + } } diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeExchange/vo/MaxoutVO.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeExchange/vo/MaxoutVO.java new file mode 100644 index 000000000..b75189cae --- /dev/null +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeExchange/vo/MaxoutVO.java @@ -0,0 +1,113 @@ +package com.fuint.business.marketingActivity.activeExchange.vo; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fuint.business.marketingActivity.activeDiscount.entity.ActiveDiscountChild; + +import java.io.Serializable; +import java.util.Date; +import java.util.List; + +public class MaxoutVO implements Serializable { + //主键id + private Integer id; + //活动名称 + private String name; + //参与条件 0:不限制 1:优惠订单不参与 + private String participationCondition; + //参与次数类别0:不限制 1:限制 + private String participationAcount; + //限制次数 + private Integer limitAcount; + //满减折扣集合 + private List activeDiscountChildList; + //创建者 + 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 String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public String getParticipationCondition() { + return participationCondition; + } + + public void setParticipationCondition(String participationCondition) { + this.participationCondition = participationCondition; + } + + public String getParticipationAcount() { + return participationAcount; + } + + public void setParticipationAcount(String participationAcount) { + this.participationAcount = participationAcount; + } + + public Integer getLimitAcount() { + return limitAcount; + } + + public void setLimitAcount(Integer limitAcount) { + this.limitAcount = limitAcount; + } + + public List getActiveDiscountChildList() { + return activeDiscountChildList; + } + + public void setActiveDiscountChildList(List activeDiscountChildList) { + this.activeDiscountChildList = activeDiscountChildList; + } + + 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/activeFullminus/service/impl/ActiveFullminusServiceImpl.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeFullminus/service/impl/ActiveFullminusServiceImpl.java index 8e3d73846..1ca36f479 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeFullminus/service/impl/ActiveFullminusServiceImpl.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeFullminus/service/impl/ActiveFullminusServiceImpl.java @@ -15,9 +15,11 @@ import com.fuint.business.marketingActivity.activeFullminus.entity.ActiveFullmin import com.fuint.business.marketingActivity.activeFullminus.service.ActiveFullminusService; import com.fuint.business.marketingActivity.activeFullminus.vo.ActiveFullminusVO; import com.fuint.business.store.service.StoreService; +import com.fuint.business.userManager.service.LJUserGradeService; import com.fuint.common.util.TokenUtil; import org.apache.commons.lang3.ObjectUtils; import org.springframework.beans.BeanUtils; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import javax.annotation.Resource; @@ -39,6 +41,8 @@ public class ActiveFullminusServiceImpl extends ServiceImpl