From c08ad4084249a4faa1210c0808ce11067c72c022 Mon Sep 17 00:00:00 2001 From: zhaohengkun Date: Thu, 31 Oct 2024 10:02:33 +0800 Subject: [PATCH] 1 --- .../controller/CardValueController.java | 14 ++ .../cardValue/mapper/CardValueMapper.java | 9 ++ .../cardValue/mapper/xml/CardValueMapper.xml | 125 ++++++++++++++++++ .../cardValue/service/CardValueService.java | 3 + .../service/impl/CardValueServiceImpl.java | 7 + fuintCashierWeb/src/api/newHome/newHome.js | 4 +- .../newHomeComponents/memberRecharge.vue | 60 ++++----- .../cashier/orderComponents/order_Cashier.vue | 14 +- 8 files changed, 201 insertions(+), 35 deletions(-) create mode 100644 fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardValue/mapper/xml/CardValueMapper.xml 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 0552aa39c..53b7fde9d 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 @@ -116,6 +116,20 @@ public class CardValueController extends BaseController { public ResponseObject selectById(@PathVariable Serializable id) { return getSuccessResult(this.cardValueService.getOneById(id)); } + + /** + * + * 查询储值卡活动 以及优惠券子表 + */ + @GetMapping("/cardValueAndRecordList") + public ResponseObject cardValueAndRecordList(CardValue cardValue) { + //获取当前登录用户 + AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo(); + cardValue.setStoreId(nowAccountInfo.getStoreId()); + return getSuccessResult(this.cardValueService.cardValueAndRecordList(cardValue)); + } + + /** * 获取使用时的详细信息 * diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardValue/mapper/CardValueMapper.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardValue/mapper/CardValueMapper.java index 338ecd379..f20f4d163 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardValue/mapper/CardValueMapper.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardValue/mapper/CardValueMapper.java @@ -2,6 +2,11 @@ package com.fuint.business.marketingActivity.cardValue.mapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.fuint.business.marketingActivity.cardValue.entity.CardValue; +import com.fuint.business.marketingActivity.cardValue.vo.CardValueVO; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.List; /** * 储值卡表(CardValue)表数据库访问层 @@ -9,7 +14,11 @@ import com.fuint.business.marketingActivity.cardValue.entity.CardValue; * @author makejava * @since 2023-10-31 09:41:57 */ +@Mapper public interface CardValueMapper extends BaseMapper { + + List cardValueList(@Param("obj") CardValue cardValue); + } diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardValue/mapper/xml/CardValueMapper.xml b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardValue/mapper/xml/CardValueMapper.xml new file mode 100644 index 000000000..3aa711785 --- /dev/null +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardValue/mapper/xml/CardValueMapper.xml @@ -0,0 +1,125 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardValue/service/CardValueService.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardValue/service/CardValueService.java index 137247d15..9b7df7403 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardValue/service/CardValueService.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardValue/service/CardValueService.java @@ -46,6 +46,9 @@ public interface CardValueService extends IService { CardValueVO getOneById(Serializable id); List getCoupons(Integer userId,Integer cardValueId); + + List cardValueAndRecordList(CardValue cardValue); + /** * 新增数据 * @param cardValueDTO diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardValue/service/impl/CardValueServiceImpl.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardValue/service/impl/CardValueServiceImpl.java index 864f3ed68..cea32c380 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardValue/service/impl/CardValueServiceImpl.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardValue/service/impl/CardValueServiceImpl.java @@ -331,6 +331,13 @@ public class CardValueServiceImpl extends ServiceImpl cardValueAndRecordList(CardValue cardValue) { + + List cardValues = super.baseMapper.cardValueList(cardValue); + return cardValues; + } + /** * 新增数据 * @param cardValueDTO diff --git a/fuintCashierWeb/src/api/newHome/newHome.js b/fuintCashierWeb/src/api/newHome/newHome.js index 542b6ceb4..a36fd9ecf 100644 --- a/fuintCashierWeb/src/api/newHome/newHome.js +++ b/fuintCashierWeb/src/api/newHome/newHome.js @@ -29,10 +29,10 @@ export function cashRegisterGoodsList() { method: 'get', }) } - +// 查询储值卡活动 以及优惠券子表 export function cardValueList() { return request({ - url: '/business/marketingActivity/cardValue/cardValueList', + url: '/business/marketingActivity/cardValue/cardValueAndRecordList', method: 'get', }) } diff --git a/fuintCashierWeb/src/views/cashier/NewComponents/newHomeComponents/memberRecharge.vue b/fuintCashierWeb/src/views/cashier/NewComponents/newHomeComponents/memberRecharge.vue index fd0a139fd..f570e27a1 100644 --- a/fuintCashierWeb/src/views/cashier/NewComponents/newHomeComponents/memberRecharge.vue +++ b/fuintCashierWeb/src/views/cashier/NewComponents/newHomeComponents/memberRecharge.vue @@ -119,14 +119,16 @@ export default { oilNumberId:null }, this.selectCard.cardType = index - this.getCardValueList() + //切换 电子储值卡 囤油卡 礼品卡 初始化 + this.getCardValueList() }, chooseActive(data){ data.cardType = this.selectCard.cardType this.selectCard = data - this.selectCard.cardCouponList = [] + this.selectCard.cardCouponList = data.cardCouponList }, + //切换初始化 getCardValueList(){ let that = this cardValueList().then(res=>{ @@ -154,7 +156,7 @@ export default {