From 2deb719e4b47573d46c357934a723211e2cb0f0d 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, 5 Jan 2024 14:02:58 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../vo/ActiveDiscountPayVO.java | 5 +- .../activeExchange/dto/PaymentActiveDTO.java | 3 +- .../impl/ActiveExchangeServiceImpl.java | 26 +-- .../activeExchange/vo/PaymentActiveVO.java | 5 +- .../ActiveRecommendRecordsController.java | 11 +- .../dto/ActiveRecommendRecordsDTO.java | 12 ++ .../entity/ActiveRecommend.java | 164 +---------------- .../entity/ActiveRecommendRecords.java | 2 +- .../ActiveRecommendRecordsService.java | 7 +- .../ActiveRecommendRecordsServiceImpl.java | 121 ++++++++++-- .../activeRecommend/vo/ActiveRecommendVO.java | 172 +----------------- .../business/order/mapper/OilOrderMapper.java | 7 +- 12 files changed, 159 insertions(+), 376 deletions(-) create mode 100644 fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeRecommend/dto/ActiveRecommendRecordsDTO.java diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeDiscount/vo/ActiveDiscountPayVO.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeDiscount/vo/ActiveDiscountPayVO.java index 45b0253c3..b1224241d 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeDiscount/vo/ActiveDiscountPayVO.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeDiscount/vo/ActiveDiscountPayVO.java @@ -3,6 +3,7 @@ package com.fuint.business.marketingActivity.activeDiscount.vo; import lombok.Data; import java.io.Serializable; +import java.math.BigDecimal; @Data public class ActiveDiscountPayVO implements Serializable { @@ -11,9 +12,9 @@ public class ActiveDiscountPayVO implements Serializable { //活动名称 private String activeName; //满足金额 - private double amount; + private BigDecimal amount; //折扣 - private double discount; + private BigDecimal discount; //可用油品 private String oilId; //适用会员 diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeExchange/dto/PaymentActiveDTO.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeExchange/dto/PaymentActiveDTO.java index aa72d52a1..96c0d148a 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeExchange/dto/PaymentActiveDTO.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeExchange/dto/PaymentActiveDTO.java @@ -3,13 +3,14 @@ package com.fuint.business.marketingActivity.activeExchange.dto; import lombok.Data; import java.io.Serializable; +import java.math.BigDecimal; @Data public class PaymentActiveDTO implements Serializable { //支付类型 0:储值卡 1:囤油卡 2:现金 private String type; //支付金额 - private double amount; + private BigDecimal amount; //可用油品Id private Integer oilId; //店铺id 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 67e6445a4..d4d6cf1cf 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 @@ -56,6 +56,7 @@ import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import javax.annotation.Resource; +import java.math.BigDecimal; import java.util.ArrayList; import java.util.Date; import java.util.List; @@ -409,19 +410,21 @@ public class ActiveExchangeServiceImpl implements ActiveExchangeService { public PaymentActiveVO paymentActive(PaymentActiveDTO paymentActiveDTO) { PaymentActiveVO paymentActiveVO = new PaymentActiveVO(); Integer storeId = paymentActiveDTO.getStoreId(); - double amount = 0.0; - double fullAmount = 0.0; + BigDecimal amount = new BigDecimal(0.00); + BigDecimal fullAmount = new BigDecimal(0.00); + BigDecimal a = new BigDecimal(0.1); + BigDecimal b = new BigDecimal(10); //折扣 List activeDiscountVOList = oilOrderMapper.selectActiveDiscount(storeId,paymentActiveDTO.getAmount()); if (CollectionUtils.isNotEmpty(activeDiscountVOList)){ for (ActiveDiscountPayVO activeDiscountPayVO : activeDiscountVOList) { if (activeDiscountPayVO.getOilId().contains(paymentActiveDTO.getOilId().toString()) && activeDiscountPayVO.getAdaptUser().contains(paymentActiveDTO.getMtUserLevel().toString())){ - if (activeDiscountPayVO.getDiscount() * activeDiscountPayVO.getAmount() > amount){ - amount = paymentActiveDTO.getAmount() - ((10-activeDiscountPayVO.getDiscount()) * activeDiscountPayVO.getAmount() * 0.1); + if (activeDiscountPayVO.getAmount().multiply(activeDiscountPayVO.getDiscount()).compareTo(amount) > 0){ + amount = paymentActiveDTO.getAmount().subtract(((b.subtract(activeDiscountPayVO.getDiscount())).multiply(activeDiscountPayVO.getAmount()).multiply(a))); paymentActiveVO.setActiveId(activeDiscountPayVO.getActiveId()); paymentActiveVO.setAmount(amount); - paymentActiveVO.setFavorableAmount((10-activeDiscountPayVO.getDiscount()) * activeDiscountPayVO.getAmount() * 0.1); + paymentActiveVO.setFavorableAmount((b.subtract(activeDiscountPayVO.getDiscount())).multiply(activeDiscountPayVO.getAmount()).multiply(a)); } } } @@ -433,13 +436,13 @@ public class ActiveExchangeServiceImpl implements ActiveExchangeService { if (activeDiscountPayVO.getOilId().contains(paymentActiveDTO.getOilId().toString()) && activeDiscountPayVO.getAdaptUser().contains(paymentActiveDTO.getMtUserLevel().toString())){ //如果满足条件 - if (paymentActiveDTO.getAmount() >= activeDiscountPayVO.getAmount()){ - fullAmount = paymentActiveDTO.getAmount() - activeDiscountPayVO.getDiscount(); - if (amount > fullAmount){ - amount = paymentActiveDTO.getAmount() - fullAmount; + if ((paymentActiveDTO.getAmount()).compareTo(activeDiscountPayVO.getAmount()) >= 0){ + fullAmount = paymentActiveDTO.getAmount().subtract(activeDiscountPayVO.getDiscount()); + if (amount.compareTo(fullAmount) > 0){ + amount = paymentActiveDTO.getAmount().subtract(fullAmount); paymentActiveVO.setActiveId(activeDiscountPayVO.getActiveId()); paymentActiveVO.setAmount(amount); - paymentActiveVO.setFavorableAmount(paymentActiveDTO.getAmount() - activeDiscountPayVO.getDiscount()); + paymentActiveVO.setFavorableAmount(paymentActiveDTO.getAmount().subtract(activeDiscountPayVO.getDiscount())); } } } @@ -448,7 +451,8 @@ public class ActiveExchangeServiceImpl implements ActiveExchangeService { //消费有礼 List activeConsumptionVOS = oilOrderMapper.selectActiveConsumption(storeId, paymentActiveDTO.getAmount()); //连锁店信息 - LJUser ljUserVo = userService.selectUserByUserId(); + LJUser ljUserVo = userService.queryUserByUserId(TokenUtil.getNowAccountInfo().getId()); + String accountName = TokenUtil.getNowAccountInfo().getAccountName(); Integer storeId1 = paymentActiveDTO.getStoreId(); Integer chainStoreId = iljStoreService.selectStoreByStoreId(storeId1).getChainStoreId(); //用户余额 diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeExchange/vo/PaymentActiveVO.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeExchange/vo/PaymentActiveVO.java index 0c6ea9f09..cafd9e95d 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeExchange/vo/PaymentActiveVO.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeExchange/vo/PaymentActiveVO.java @@ -3,13 +3,14 @@ package com.fuint.business.marketingActivity.activeExchange.vo; import lombok.Data; import java.io.Serializable; +import java.math.BigDecimal; @Data public class PaymentActiveVO implements Serializable { //活动id private Integer activeId; //应付金额 - private double amount; + private BigDecimal amount; //优惠金额 - private double favorableAmount; + private BigDecimal favorableAmount; } diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeRecommend/controller/ActiveRecommendRecordsController.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeRecommend/controller/ActiveRecommendRecordsController.java index f22f8664f..a6af53691 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeRecommend/controller/ActiveRecommendRecordsController.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeRecommend/controller/ActiveRecommendRecordsController.java @@ -3,6 +3,7 @@ package com.fuint.business.marketingActivity.activeRecommend.controller; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.fuint.business.marketingActivity.activeRecommend.dto.ActiveRecommendRecordsDTO; import com.fuint.business.marketingActivity.activeRecommend.entity.ActiveRecommendRecords; import com.fuint.business.marketingActivity.activeRecommend.service.ActiveRecommendRecordsService; import com.fuint.framework.web.BaseController; @@ -49,8 +50,8 @@ public class ActiveRecommendRecordsController extends BaseController { * @return */ @GetMapping("selectAllAmount") - public ResponseObject selectAllAmount() { - return getSuccessResult(this.activeRecommendRecordsService.selectAllAmount()); + public ResponseObject selectAllAmount(@Param("activeRecommendRecords") ActiveRecommendRecords activeRecommendRecords) { + return getSuccessResult(this.activeRecommendRecordsService.selectAllAmount(activeRecommendRecords)); } /** @@ -66,12 +67,12 @@ public class ActiveRecommendRecordsController extends BaseController { /** * 新增邀请记录接口 - * @param activeRecommendRecords 实体对象 + * @param activeRecommendRecordsDTO 实体对象 * @return 新增结果 */ @PostMapping - public ResponseObject insert(@RequestBody ActiveRecommendRecords activeRecommendRecords) { - return getSuccessResult(this.activeRecommendRecordsService.add(activeRecommendRecords)); + public ResponseObject insert(@RequestBody ActiveRecommendRecordsDTO activeRecommendRecordsDTO) { + return getSuccessResult(this.activeRecommendRecordsService.add(activeRecommendRecordsDTO)); } /** diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeRecommend/dto/ActiveRecommendRecordsDTO.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeRecommend/dto/ActiveRecommendRecordsDTO.java new file mode 100644 index 000000000..40b0d4b7f --- /dev/null +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeRecommend/dto/ActiveRecommendRecordsDTO.java @@ -0,0 +1,12 @@ +package com.fuint.business.marketingActivity.activeRecommend.dto; + +import com.fuint.business.marketingActivity.activeRecommend.entity.ActiveRecommendRecords; +import lombok.Data; + +import java.io.Serializable; + +@Data +public class ActiveRecommendRecordsDTO extends ActiveRecommendRecords implements Serializable { + private Integer storeId; + private String type; +} diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeRecommend/entity/ActiveRecommend.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeRecommend/entity/ActiveRecommend.java index d0a8dfd0a..9c0b50405 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeRecommend/entity/ActiveRecommend.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeRecommend/entity/ActiveRecommend.java @@ -6,6 +6,7 @@ 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 lombok.Data; import java.io.Serializable; @@ -16,6 +17,7 @@ import java.io.Serializable; * @since 2023-11-13 15:09:50 */ @SuppressWarnings("serial") +@Data public class ActiveRecommend extends Model { //主键id @TableId(type = IdType.AUTO) @@ -58,167 +60,5 @@ public class ActiveRecommend extends Model { //更新时间 @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") private Date updateTime; - - public String getTitleUrl() { - return titleUrl; - } - - public void setTitleUrl(String titleUrl) { - this.titleUrl = titleUrl; - } - - 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 getActivePictureUrl() { - return activePictureUrl; - } - - public void setActivePictureUrl(String activePictureUrl) { - this.activePictureUrl = activePictureUrl; - } - - public String getInviterGiftType() { - return inviterGiftType; - } - - public void setInviterGiftType(String inviterGiftType) { - this.inviterGiftType = inviterGiftType; - } - - 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 String getNewuserGiftType() { - return newuserGiftType; - } - - public void setNewuserGiftType(String newuserGiftType) { - this.newuserGiftType = newuserGiftType; - } - - public String getTitle() { - return title; - } - - public void setTitle(String title) { - this.title = title; - } - - public String getInvitationCodeType() { - return invitationCodeType; - } - - public void setInvitationCodeType(String invitationCodeType) { - this.invitationCodeType = invitationCodeType; - } - - public String getRewardDisplay() { - return rewardDisplay; - } - - public void setRewardDisplay(String rewardDisplay) { - this.rewardDisplay = rewardDisplay; - } - - public String getActiveRule() { - return activeRule; - } - - public void setActiveRule(String activeRule) { - this.activeRule = activeRule; - } - - 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 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/activeRecommend/entity/ActiveRecommendRecords.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeRecommend/entity/ActiveRecommendRecords.java index 06fee4766..dea0a7671 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeRecommend/entity/ActiveRecommendRecords.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeRecommend/entity/ActiveRecommendRecords.java @@ -28,7 +28,7 @@ public class ActiveRecommendRecords extends Model { private Integer chainStoreId; //所属店铺id private Integer storeId; - //用户id + //邀请人id private String userId; //被邀请人id private String inviteeUserId; diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeRecommend/service/ActiveRecommendRecordsService.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeRecommend/service/ActiveRecommendRecordsService.java index 9c9957f34..e03671f15 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeRecommend/service/ActiveRecommendRecordsService.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeRecommend/service/ActiveRecommendRecordsService.java @@ -3,6 +3,7 @@ package com.fuint.business.marketingActivity.activeRecommend.service; import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.service.IService; +import com.fuint.business.marketingActivity.activeRecommend.dto.ActiveRecommendRecordsDTO; import com.fuint.business.marketingActivity.activeRecommend.entity.ActiveRecommendRecords; /** @@ -25,13 +26,13 @@ public interface ActiveRecommendRecordsService extends IService queryWrapper = new LambdaQueryWrapper<>(); queryWrapper.eq(ActiveRecommendRecords::getUserId,userId); queryWrapper.eq(ActiveRecommendRecords::getStoreId,storeId); @@ -83,12 +108,12 @@ public class ActiveRecommendRecordsServiceImpl extends ServiceImpl queryWrapper = new LambdaQueryWrapper<>(); queryWrapper.eq(ActiveRecommendRecords::getUserId,userId); queryWrapper.eq(ActiveRecommendRecords::getStoreId,storeId); @@ -97,7 +122,9 @@ public class ActiveRecommendRecordsServiceImpl extends ServiceImpl activeRecommendChildList = activeRecommendVO.getActiveRecommendChildList(); if(CollectionUtils.isNotEmpty(activeRecommendChildList)){ @@ -118,21 +145,83 @@ public class ActiveRecommendRecordsServiceImpl extends ServiceImpl activeRecommendChildList = activeRecommendVO.getActiveRecommendChildList(); + if(CollectionUtils.isNotEmpty(activeRecommendChildList)){ + for (ActiveRecommendChild activeRecommendChild : activeRecommendChildList) { + //优惠券 + if (activeRecommendChild.getGiftUserType().equals("0") && activeRecommendChild.getActiveGift().equals("1")){ + CardFavorableRecord cardFavorableRecord = new CardFavorableRecord(); + cardFavorableRecord.setCardFavorableId(activeRecommendChild.getVouchersId()); + cardFavorableRecord.setStoreId(activeRecommendRecordsDTO.getStoreId()); + cardFavorableRecord.setMtUserId(ljUser1.getId()); + cardFavorableRecord.setName(ljUser1.getName()); + cardFavorableRecord.setMobile(ljUser1.getMobile()); + cardFavorableRecord.setStatus("0"); + cardFavorableRecord.setExchangeFrom("邀请新人送券"); + cardFavorableRecordService.addCardFavorableRecord(cardFavorableRecord); + } + //兑换券 + if (activeRecommendChild.getGiftUserType().equals("0") && activeRecommendChild.getActiveGift().equals("2")){ + CardExchangeRecord cardExchangeRecord = new CardExchangeRecord(); + cardExchangeRecord.setCardExchangeId(activeRecommendChild.getVouchersId()); + cardExchangeRecord.setStoreId(activeRecommendRecordsDTO.getStoreId()); + cardExchangeRecord.setMtUserId(ljUser1.getId()); + cardExchangeRecord.setName(ljUser1.getName()); + cardExchangeRecord.setMobile(ljUser1.getMobile()); + cardExchangeRecord.setPhoto(ljUser1.getAvatar()); + cardExchangeRecord.setStatus("0"); + cardExchangeRecord.setExchangeFrom("邀请新人送券"); + cardExchangeRecordService.addCardExchangeRecord(cardExchangeRecord); + } + //被邀请人优惠券 + if (activeRecommendChild.getGiftUserType().equals("1") && activeRecommendChild.getActiveGift().equals("1")){ + CardFavorableRecord cardFavorableRecord = new CardFavorableRecord(); + cardFavorableRecord.setCardFavorableId(activeRecommendChild.getVouchersId()); + cardFavorableRecord.setStoreId(activeRecommendRecordsDTO.getStoreId()); + cardFavorableRecord.setMtUserId(ljUser.getId()); + cardFavorableRecord.setName(ljUser.getName()); + cardFavorableRecord.setMobile(ljUser.getMobile()); + cardFavorableRecord.setStatus("0"); + cardFavorableRecord.setExchangeFrom("新人送券"); + cardFavorableRecordService.addCardFavorableRecord(cardFavorableRecord); + } + } + } + userBalanceService.updateById(userBalance); + //被邀请人 + activeRecommendRecords.setInviteeUserId(userId.toString()); + activeRecommendRecords.setInviteeUserName(ljUser.getName()); + return save(activeRecommendRecords); + } + return false; } } diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeRecommend/vo/ActiveRecommendVO.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeRecommend/vo/ActiveRecommendVO.java index 9c1eb40ad..852ea842e 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeRecommend/vo/ActiveRecommendVO.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeRecommend/vo/ActiveRecommendVO.java @@ -3,6 +3,7 @@ package com.fuint.business.marketingActivity.activeRecommend.vo; import com.baomidou.mybatisplus.extension.activerecord.Model; import com.fasterxml.jackson.annotation.JsonFormat; import com.fuint.business.marketingActivity.activeRecommend.entity.ActiveRecommendChild; +import lombok.Data; import java.io.Serializable; import java.util.Date; @@ -15,6 +16,7 @@ import java.util.List; * @since 2023-11-13 15:09:50 */ @SuppressWarnings("serial") +@Data public class ActiveRecommendVO extends Model { //主键id private Integer id; @@ -58,175 +60,5 @@ public class ActiveRecommendVO extends Model { //更新时间 @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") private Date updateTime; - - public String getTitleUrl() { - return titleUrl; - } - - public void setTitleUrl(String titleUrl) { - this.titleUrl = titleUrl; - } - - public String[] getInviterGiftType() { - return inviterGiftType; - } - - public void setInviterGiftType(String[] inviterGiftType) { - this.inviterGiftType = inviterGiftType; - } - - public List getActiveRecommendChildList() { - return activeRecommendChildList; - } - - public void setActiveRecommendChildList(List activeRecommendChildList) { - this.activeRecommendChildList = activeRecommendChildList; - } - - 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 getActivePictureUrl() { - return activePictureUrl; - } - - public void setActivePictureUrl(String activePictureUrl) { - this.activePictureUrl = activePictureUrl; - } - - 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 String getNewuserGiftType() { - return newuserGiftType; - } - - public void setNewuserGiftType(String newuserGiftType) { - this.newuserGiftType = newuserGiftType; - } - - public String getTitle() { - return title; - } - - public void setTitle(String title) { - this.title = title; - } - - public String getInvitationCodeType() { - return invitationCodeType; - } - - public void setInvitationCodeType(String invitationCodeType) { - this.invitationCodeType = invitationCodeType; - } - - public String getRewardDisplay() { - return rewardDisplay; - } - - public void setRewardDisplay(String rewardDisplay) { - this.rewardDisplay = rewardDisplay; - } - - public String getActiveRule() { - return activeRule; - } - - public void setActiveRule(String activeRule) { - this.activeRule = activeRule; - } - - 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 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/order/mapper/OilOrderMapper.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/order/mapper/OilOrderMapper.java index 6a3935a22..fb99640e9 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/order/mapper/OilOrderMapper.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/order/mapper/OilOrderMapper.java @@ -12,6 +12,7 @@ import com.fuint.business.order.vo.OilOrderVo; import com.fuint.business.petrolStationManagement.entity.OilNumber; import org.apache.ibatis.annotations.Param; +import java.math.BigDecimal; import java.util.List; import java.util.Map; @@ -82,7 +83,7 @@ public interface OilOrderMapper extends BaseMapper { * @param amount * @return */ - List selectActiveDiscount(@Param("storeId") Integer storeId, @Param("amount")double amount); + List selectActiveDiscount(@Param("storeId") Integer storeId, @Param("amount") BigDecimal amount); /** * 满减 @@ -90,7 +91,7 @@ public interface OilOrderMapper extends BaseMapper { * @param amount * @return */ - List selectActiveFule(@Param("storeId") Integer storeId, @Param("amount")double amount); + List selectActiveFule(@Param("storeId") Integer storeId, @Param("amount")BigDecimal amount); /** * 消费有礼 @@ -98,5 +99,5 @@ public interface OilOrderMapper extends BaseMapper { * @param amount * @return */ - List selectActiveConsumption(@Param("storeId") Integer storeId, @Param("amount")double amount); + List selectActiveConsumption(@Param("storeId") Integer storeId, @Param("amount")BigDecimal amount); }