diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardValue/dto/CardValueRecordDTO.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardValue/dto/CardValueRecordDTO.java index 8a7f1d902..a1b0a0634 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardValue/dto/CardValueRecordDTO.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardValue/dto/CardValueRecordDTO.java @@ -27,6 +27,7 @@ public class CardValueRecordDTO extends CardValueRecord { private String appltType; private String paymentType; private String payStatus; + private String payChannel; private String types; @JsonFormat(pattern = "yyyy-MM-dd" , timezone = "GMT+8") private Date expireTime; diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardValue/service/impl/CardValueRecordServiceImpl.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardValue/service/impl/CardValueRecordServiceImpl.java index 84c56b507..c253559a6 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardValue/service/impl/CardValueRecordServiceImpl.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardValue/service/impl/CardValueRecordServiceImpl.java @@ -434,6 +434,7 @@ public class CardValueRecordServiceImpl extends ServiceImpl支付方式金额"); if (ObjectUtil.isNotEmpty(paymentAggregationAll)) { for (Map stringObjectMap : paymentAggregationAll) { - sb.append(""+calculatePaymentMethod(stringObjectMap.get("payType").toString()).toString()+""); + + + sb.append(""+calculatePaymentMethod(stringObjectMap.get("payType").toString())+""); sb.append(""+Optional.ofNullable(stringObjectMap.get("paidAmount")).orElse("0").toString()+""); } } diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/printer/template/PrintIntegralReport.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/printer/template/PrintIntegralReport.java index 216678f3a..1f1427e2b 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/printer/template/PrintIntegralReport.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/printer/template/PrintIntegralReport.java @@ -22,7 +22,7 @@ public class PrintIntegralReport { AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo(); - sb.append("
订单统计\r\n
"); + sb.append("
积分兑换\r\n
"); sb.append("打印时间:"+formattedDateTime +"\r\n"); sb.append("店铺名称:"+nowAccountInfo.getStoreName() +"\r\n"); @@ -30,10 +30,10 @@ public class PrintIntegralReport { if (ObjectUtil.isNotEmpty(handover.get("shoppingCart"))) { sb.append(""); - List> o = (List>)handover.get("shoppingCart"); - for (Map stringStringMap : o) { + List> o = (List>)handover.get("shoppingCart"); + for (Map stringStringMap : o) { sb.append(""); - sb.append(""); + sb.append(""); sb.append(""); } sb.append("
商品名称商品数量价格
"+stringStringMap.get("giftName")+""+((ObjectUtil.isNotEmpty(stringStringMap.get("markPurchases")))?stringStringMap.get("markPurchases").toString():"0"+""+((ObjectUtil.isNotEmpty(stringStringMap.get("markPurchases")))?stringStringMap.get("markPurchases").toString():"0")+""+ stringStringMap.get("price")+"
"); @@ -45,12 +45,10 @@ public class PrintIntegralReport { if (ObjectUtil.isNotEmpty(handover.get("allPoints"))) { sb.append("总积分:"+handover.get("allPoints")+"\r\n"); sb.append("--------------------------------\r\n"); - } if (ObjectUtil.isNotEmpty(handover.get("allAmout"))) { sb.append("总价格:¥"+handover.get("allAmout")+"\r\n"); sb.append("--------------------------------\r\n"); - } sb.append("
谢谢惠顾,欢迎下次光临!
"); diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/userManager/mapper/xml/LJUserMapper.xml b/fuintBackend/fuint-application/src/main/java/com/fuint/business/userManager/mapper/xml/LJUserMapper.xml index cb0f0c19f..c575d2646 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/userManager/mapper/xml/LJUserMapper.xml +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/userManager/mapper/xml/LJUserMapper.xml @@ -9,7 +9,7 @@ left join mt_invitation mi on mu.id = mi.userId - select mu.*,mub.grade_id,mub.card_balance,mub.points,mub.consume_num,mub.growth_value,mub.refuel_money, + select mu.*,mub.id balanceId,mub.grade_id,mub.card_balance,mub.points,mub.consume_num,mub.growth_value,mub.refuel_money, mub.second_card,mub.fixing_level,mub.create_time balCreateTime FROM mt_user mu LEFT JOIN mt_user_balance mub ON mu.id = mub.mt_user_id diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/userManager/service/impl/LJUserServiceImpl.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/userManager/service/impl/LJUserServiceImpl.java index 8fa662989..f9da85ae0 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/userManager/service/impl/LJUserServiceImpl.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/userManager/service/impl/LJUserServiceImpl.java @@ -175,7 +175,7 @@ public class LJUserServiceImpl extends ServiceImpl impleme */ @Override public LJUserVo selectUserById(int id,Integer storeId) { - if (storeId==null){ + if (ObjectUtil.isEmpty(storeId)){ AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo(); storeId = nowAccountInfo.getStoreId(); } diff --git a/pos-uni/pagesHome/MemberRecharge/MemberRecharge.vue b/pos-uni/pagesHome/MemberRecharge/MemberRecharge.vue index ff49c4505..0fc587036 100644 --- a/pos-uni/pagesHome/MemberRecharge/MemberRecharge.vue +++ b/pos-uni/pagesHome/MemberRecharge/MemberRecharge.vue @@ -127,11 +127,11 @@ listindex: 0, memberId: 0, numList: [ - "50元", - "100元", - "300元", - "500元", - "1000元", + // "50元", + // "100元", + // "300元", + // "500元", + // "1000元", "自定义金额", ], isChooseUser: false, @@ -173,6 +173,29 @@ methods: { // 自定义金额 custom() { + + + if (this.numList.length > 0) { + // const changeList = this.cardValueList + this.numList.forEach(change => { + if (data >= change.rechargeBalance) { + this.order.points = change.points + this.order.bidBalance = change.bidBalance + this.order.giftBalance = change.giftBalance + this.order.growthValue = change.growthValue + this.order.rechargeBalance = change.rechargeBalance + + this.order.royaltyType = change.royaltyType + this.order.percentageCommissions = change.percentageCommissions + this.order.amountCommission = change.amountCommission + this.order.cardValueId = change.id + } + }) + } + + + this.order.rechargType = 1 + console.log(this.value); this.order.amount = this.value this.realyPayBills = this.order.amount @@ -189,11 +212,25 @@ } }).then((res) => { this.numList = res.data.records + this.numList.sort((a, b) => a.rechargeBalance - b.rechargeBalance); this.order.amount = this.numList[0].rechargeBalance this.order.rechargeBalance = this.numList[0].rechargeBalance this.order.points = this.numList[0].points this.realyPayBills = this.numList[0].rechargeBalance + + + this.order.bidBalance = this.numList[0].bidBalance + this.order.points = this.numList[0].points + this.order.giftBalance = this.numList[0].giftBalance + this.order.growthValue = this.numList[0].growthValue + this.order.cardValueId = this.numList[0].id + // this.order.amount = null + this.order.royaltyType = this.numList[0].royaltyType + this.order.rechargType = 0 + this.order.percentageCommissions = this.numList[0].percentageCommissions + this.order.amountCommission = this.numList[0].amountCommission + }) }, getmemberId(num, payType) { @@ -216,12 +253,24 @@ }, getindex(index, data) { this.listindex = index + this.order.rechargType = 0 if (data) { this.order.amount = data.rechargeBalance this.order.rechargeBalance = data.rechargeBalance this.order.points = data.points this.realyPayBills = data.rechargeBalance - this.order.rechargeBalance = data.rechargeBalance + + this.order.bidBalance = file.bidBalance + this.order.points = file.points + this.order.giftBalance = file.giftBalance + this.order.growthValue = file.growthValue + this.order.cardValueId = file.id + // this.order.amount = null + this.order.royaltyType = file.royaltyType + this.order.percentageCommissions = file.percentageCommissions + this.order.amountCommission = file.amountCommission + + } else { this.order.amount = this.value this.realyPayBills = this.value @@ -273,9 +322,15 @@ this.order.authCode = this.authCode this.order.realyPayBills = this.realyPayBills this.order.actualPayment = actualPayment + // cardValueId + // growthValue + // rechargeType + // royaltyType + this.order.makeChange = 0 + // url: 'business/marketingActivi ty/cardFuelRecord/prepaidFuelTopUp', request({ - url: 'business/marketingActivity/cardFuelRecord/prepaidFuelTopUp', + url: 'business/marketingActivity/cardValueRecord/prepaidCardTopUp', method: 'post', data: this.order }).then((res) => {