diff --git a/fuintAdmin/src/views/EventMarketing/activeConsumption/index.vue b/fuintAdmin/src/views/EventMarketing/activeConsumption/index.vue index 0426f9aff..ea91ec9ca 100644 --- a/fuintAdmin/src/views/EventMarketing/activeConsumption/index.vue +++ b/fuintAdmin/src/views/EventMarketing/activeConsumption/index.vue @@ -10,7 +10,7 @@
-
@@ -42,7 +42,7 @@ {{ item }} - + + :key="item.id"> @@ -142,7 +142,7 @@ @click="addPoints(pointOrderType)">
-
+
消费满 @@ -170,7 +170,7 @@ @click="addGrowthValues(growthValueOrderType)">
-
+
消费满 @@ -199,7 +199,7 @@ @click="addCoupons(couponOrderType)">
-
+
消费满 @@ -470,6 +470,7 @@ export default { }) }, getInfo() { + console.log("从修改页面带过来的id",this.activeId) getInfoActivity(this.activeId).then(res => { if (res.data) { this.ruleForm = res.data @@ -505,15 +506,16 @@ export default { this.weekDay = [] this.monthDay = [] } - if (res.data.pointList) { + if (res.data.pointList && res.data.pointList.length > 0) { + console.log("当前消费有礼活动的子表 集合", res.data.pointList) this.pointList = res.data.pointList this.pointOrderType = res.data.pointList[0].orderType } - if (res.data.growthValueList) { + if (res.data.growthValueList && res.data.growthValueList.length > 0) { this.growthValueList = res.data.growthValueList this.growthValueOrderType = res.data.growthValueList[0].orderType } - if (res.data.couponList) { + if (res.data.couponList && res.data.couponList.length > 0) { this.couponList = res.data.couponList this.couponOrderType = res.data.couponList[0].orderType } diff --git a/fuintAdmin/src/views/power/payment/index.vue b/fuintAdmin/src/views/power/payment/index.vue index e2ac137c8..e17516256 100644 --- a/fuintAdmin/src/views/power/payment/index.vue +++ b/fuintAdmin/src/views/power/payment/index.vue @@ -548,6 +548,8 @@ export default { created() { this.getList(); this.tableData1list(); + //机构下拉 + this.selectChildByDeptIdApi(); }, methods: { submitEnable(val){ @@ -677,10 +679,14 @@ export default { this.formRule.deptId = this.deptId }, addMerchantShow() { + console.log("点击新增商户",this.deptListSelect) + console.log("id",this.deptId) + this.addMerchantTitile = '新增商户信息' this.addMerchants = true this.form = {} - this.form.deptId = this.deptId + this.form.deptId = this.deptListSelect[0].deptId + this.getDeptList(this.form.deptId) }, chooseDept(deptId){ this.form.merchantName = "" diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/order/service/impl/AllOrderInfoServiceImpl.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/order/service/impl/AllOrderInfoServiceImpl.java index 9d8189908..5b2cb8299 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/order/service/impl/AllOrderInfoServiceImpl.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/order/service/impl/AllOrderInfoServiceImpl.java @@ -10,6 +10,7 @@ import com.alibaba.excel.EasyExcel; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.core.toolkit.Wrappers; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.fuint.api.fuyou.entity.MerchantConfig; @@ -20,15 +21,21 @@ import com.fuint.business.convenienceSore.dto.LJGoodsDto; import com.fuint.business.convenienceSore.mapper.LJGoodsMapper; import com.fuint.business.convenienceSore.service.LJGoodsService; import com.fuint.business.convenienceSore.service.StockTrackService; +import com.fuint.business.fleet.mapper.FleetInfoMapper; +import com.fuint.business.fleet.mapper.FleetLinesChangeMapper; +import com.fuint.business.fleet.mapper.FleetMemberMapper; import com.fuint.business.largeSscreen.vo.OrderGoodsVO; import com.fuint.business.marketingActivity.cardCoupon.entity.CardCouponUser; import com.fuint.business.marketingActivity.cardCoupon.mapper.CardCouponUserMapper; import com.fuint.business.marketingActivity.cardFavorable.service.CardFavorableRecordService; +import com.fuint.business.marketingActivity.cardFule.entity.CardFuelRecord; +import com.fuint.business.marketingActivity.cardFule.mapper.CardFuelRecordMapper; import com.fuint.business.marketingActivity.cardValueOrders.entity.CardValueOrders; import com.fuint.business.order.dto.AllOrderInfoDto; import com.fuint.business.order.dto.AllOrderInfoRes; import com.fuint.business.order.entity.*; import com.fuint.business.order.mapper.AllOrderInfoMapper; +import com.fuint.business.order.mapper.CardBalanceChangeMapper; import com.fuint.business.order.mapper.OilOrderMapper; import com.fuint.business.order.mapper.OrderGoodsMapper; import com.fuint.business.order.service.*; @@ -46,6 +53,10 @@ import com.fuint.business.petrolStationManagement.service.OilTrackingService; import com.fuint.business.store.entity.MtStore; import com.fuint.business.store.mapper.MtStoreMapper; import com.fuint.business.store.service.StoreService; +import com.fuint.business.userManager.entity.MtUserFuel; +import com.fuint.business.userManager.entity.UserBalance; +import com.fuint.business.userManager.mapper.MtUserFuelMapper; +import com.fuint.business.userManager.mapper.UserBalanceMapper; import com.fuint.business.userManager.service.UserBalanceService; import com.fuint.common.dto.AccountInfo; import com.fuint.common.service.MemberService; @@ -92,9 +103,29 @@ public class AllOrderInfoServiceImpl extends ServiceImpl q1 = Wrappers.query(); + q1.eq("mt_user_id", allOrder.getUserId()) + .eq("store_id", allOrder.getStoreId()); + UserBalance userBalance = userBalanceMapper.selectOne(q1); +// 如果订单有油品 + OilOrder oilOrder = null; + if (ObjectUtil.isNotEmpty(cashierOrder.getOilOrderId())) { + oilOrder = oilOrderMapper.selectById(cashierOrder.getOilOrderId()); + } // 3.如果支付类型 是 支付宝 微信 银联 则调用第三方支付接口 进行退款 if (allOrder.getPayType().equals("WECHAT") || allOrder.getPayType().equals("UNIONPAY") || allOrder.getPayType().equals("ALIPAY")) { @@ -569,13 +610,12 @@ public class AllOrderInfoServiceImpl extends ServiceImpl refund = fyPayService.refund(map); } - +// 修改 总订单 收银台订单 退款状态 退款金额 退款人 allOrder.setRefMoney(allOrder.getGoodsMoney()); allOrder.setRefBy(String.valueOf(now.getId())); allOrder.setStatus("refund"); allOrder.setRefOrderNo(map.get("refundOrderNo")); baseMapper.updateById(allOrder); - CashierOrder cashierOrder = cashierOrderService.selectCashierOrder(orderNo); cashierOrder.setStatus("refund"); cashierOrderService.updateById(cashierOrder); @@ -589,6 +629,12 @@ public class AllOrderInfoServiceImpl extends ServiceImpl q2 = Wrappers.query(); + q2.eq("mt_user_id", userBalance.getMtUserId()) + .eq("oil_name", oilOrder.getOils()) + .eq("store_id", userBalance.getStoreId()); + MtUserFuel mtUserFuel = mtUserFuelMapper.selectOne(q2); + } if (orderNo.equals("car_card_value")) { @@ -604,7 +650,7 @@ public class AllOrderInfoServiceImpl extends ServiceImpl impleme //在查询囤油卡信息 List userFuels = mtUserFuelMapper.selectUserFuelAndOilName(it); it.setUserFuels(userFuels); - //判断当前用户是否存在车队 + //判断当前用户是否存在车队 一个用户只能有一个车队卡 List fleetInfoUniVos = fleetInfoService.queryByStoreId(nowAccountInfo.getStoreId(),it.getId()); if (CollUtil.isNotEmpty(fleetInfoUniVos)) { it.setFleetInfoUniVos(fleetInfoUniVos);