diff --git a/.idea/uiDesigner.xml b/.idea/uiDesigner.xml new file mode 100644 index 000000000..2b63946d5 --- /dev/null +++ b/.idea/uiDesigner.xml @@ -0,0 +1,124 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/fuintAdmin/src/views/EventMarketing/SaveBlock/index.vue b/fuintAdmin/src/views/EventMarketing/SaveBlock/index.vue index 6e49630d3..1537259f0 100644 --- a/fuintAdmin/src/views/EventMarketing/SaveBlock/index.vue +++ b/fuintAdmin/src/views/EventMarketing/SaveBlock/index.vue @@ -276,19 +276,17 @@
- - - 不赠送 - 赠送 - + + + + + 添加
-
-
+
附加特权
page, CardCouponUser cardCouponUser) { + return getSuccessResult(this.cardCouponUserService.page(page, new QueryWrapper<>(cardCouponUser))); + } + + /** + * 通过主键查询单条数据 + * + * @param id 主键 + * @return 单条数据 + */ + @GetMapping("{id}") + public ResponseObject selectOne(@PathVariable Serializable id) { + return getSuccessResult(this.cardCouponUserService.getById(id)); + } + + /** + * 新增数据 + * + * @param cardCouponUser 实体对象 + * @return 新增结果 + */ + @PostMapping + public ResponseObject insert(@RequestBody CardCouponUser cardCouponUser) { + return getSuccessResult(this.cardCouponUserService.save(cardCouponUser)); + } + + /** + * 修改数据 + * + * @param cardCouponUser 实体对象 + * @return 修改结果 + */ + @PutMapping + public ResponseObject update(@RequestBody CardCouponUser cardCouponUser) { + return getSuccessResult(this.cardCouponUserService.updateById(cardCouponUser)); + } + + /** + * 删除数据 + * + * @param idList 主键结合 + * @return 删除结果 + */ + @DeleteMapping + public ResponseObject delete(@RequestParam("idList") List idList) { + return getSuccessResult(this.cardCouponUserService.removeByIds(idList)); + } +} + diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardCoupon/entity/CardCoupon.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardCoupon/entity/CardCoupon.java index ef2ebc197..bc92392b6 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardCoupon/entity/CardCoupon.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardCoupon/entity/CardCoupon.java @@ -4,6 +4,7 @@ import java.time.LocalTime; import java.util.Date; import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.extension.activerecord.Model; import com.fasterxml.jackson.annotation.JsonFormat; @@ -130,6 +131,9 @@ public class CardCoupon extends Model { private String updateBy; //更新时间 private Date updateTime; + //当次获取数量 + @TableField(exist = false) + private Integer giftCardToatl; } diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardCoupon/entity/CardCouponUser.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardCoupon/entity/CardCouponUser.java new file mode 100644 index 000000000..a664367bb --- /dev/null +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardCoupon/entity/CardCouponUser.java @@ -0,0 +1,55 @@ +package com.fuint.business.marketingActivity.cardCoupon.entity; + +import java.util.Date; +import com.baomidou.mybatisplus.extension.activerecord.Model; +import lombok.Data; + +import java.io.Serializable; + +/** + * 用户优惠卷表2024(CardCouponUser)表实体类 + * + * @author makejava + * @since 2024-09-22 15:14:30 + */ + +@Data +public class CardCouponUser extends Model { + //主键id + private Integer id; + //所属连锁店id + private Integer chainStoreId; + //所属店铺id + private Integer storeId; + //会员id + private Integer mtUserId; + //会员手机号码 + private String mobile; + //来源类型 1储值卡2囤油卡.... + private String fromType; + //活动id + private Integer activeId; + //优惠券id + private Integer cardCouponId; + //有效期开始时间 + private Date startTime; + //有效期结束时间 + private Date endTime; + //0未使用1已核销 + private String status; + //使用时间 + private Date useTime; + //订单总表all order 的主键 + private Integer orderId; + //创建者 + private String createBy; + //创建时间 + private Date createTime; + //更新者 + private String updateBy; + //更新时间 + private Date updateTime; + + +} + diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardCoupon/mapper/CardCouponUserMapper.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardCoupon/mapper/CardCouponUserMapper.java new file mode 100644 index 000000000..3bd24967d --- /dev/null +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardCoupon/mapper/CardCouponUserMapper.java @@ -0,0 +1,15 @@ +package com.fuint.business.marketingActivity.cardCoupon.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.fuint.business.marketingActivity.cardCoupon.entity.CardCouponUser; + +/** + * 用户优惠卷表2024(CardCouponUser)表数据库访问层 + * + * @author makejava + * @since 2024-09-22 15:14:30 + */ +public interface CardCouponUserMapper extends BaseMapper { + +} + diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardCoupon/service/CardCouponUserService.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardCoupon/service/CardCouponUserService.java new file mode 100644 index 000000000..db3bbbfba --- /dev/null +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardCoupon/service/CardCouponUserService.java @@ -0,0 +1,22 @@ +package com.fuint.business.marketingActivity.cardCoupon.service; + +import com.baomidou.mybatisplus.extension.service.IService; +import com.fuint.business.marketingActivity.cardCoupon.entity.CardCouponUser; + +/** + * 用户优惠卷表2024(CardCouponUser)表服务接口 + * + * @author makejava + * @since 2024-09-22 15:14:30 + */ +public interface CardCouponUserService extends IService { + /** + * 判断用户是否还能领取该优惠卷 + * @param couponId 优惠卷id + * @param userId 用户主键 + * @return true 能 false 不能 + */ + boolean userCanGet(Integer couponId,Integer userId); + +} + diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardCoupon/service/impl/CardCouponUserServiceImpl.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardCoupon/service/impl/CardCouponUserServiceImpl.java new file mode 100644 index 000000000..eb6bf9a9e --- /dev/null +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardCoupon/service/impl/CardCouponUserServiceImpl.java @@ -0,0 +1,60 @@ +package com.fuint.business.marketingActivity.cardCoupon.service.impl; + +import cn.hutool.core.collection.CollectionUtil; +import cn.hutool.core.date.DateUtil; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.fuint.business.marketingActivity.cardCoupon.entity.CardCoupon; +import com.fuint.business.marketingActivity.cardCoupon.mapper.CardCouponUserMapper; +import com.fuint.business.marketingActivity.cardCoupon.entity.CardCouponUser; +import com.fuint.business.marketingActivity.cardCoupon.service.CardCouponService; +import com.fuint.business.marketingActivity.cardCoupon.service.CardCouponUserService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + +/** + * 用户优惠卷表2024(CardCouponUser)表服务实现类 + * + * @author makejava + * @since 2024-09-22 15:14:30 + */ +@Service("cardCouponUserService") +public class CardCouponUserServiceImpl extends ServiceImpl implements CardCouponUserService { + @Autowired + private CardCouponService cardCouponService; + /** + * 判断用户是否还能领取该优惠卷 + * @param couponId 优惠卷id + * @param userId 用户主键 + * @return true 能 false 不能 + */ + @Override + public boolean userCanGet(Integer couponId, Integer userId) { + CardCoupon cardCoupon = cardCouponService.getById(couponId); + if (cardCoupon.getTfTotal()<=cardCoupon.getTfTotal()){ + //领取数量大于策略中的送出总量 + return false; + } + String nowDate = DateUtil.format(new Date(), "yyyy-MM-dd"); + LambdaQueryWrapper queryWrapper =new LambdaQueryWrapper<>(); + queryWrapper.eq(CardCouponUser::getCardCouponId,couponId).eq(CardCouponUser::getMtUserId,userId); + List list = this.list(queryWrapper); + if (CollectionUtil.isEmpty(list)){ + list =new ArrayList<>(); + } + if (list.size()>=cardCoupon.getGetNumLimit()){ + //当前用户领取已到达上限 + return false; + } + //获取当日获取数量 + long count = list.stream().filter(it -> { + return DateUtil.format(it.getCreateTime(), "yyyy-MM-dd").equals(nowDate); + }).count(); + return count < cardCoupon.getDayGetLimit(); + } +} + 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 161f3587f..217104a56 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 @@ -69,6 +69,17 @@ public class CardValueController extends BaseController { return getSuccessResult(this.cardValueService.selectAllApplet(cardValue)); } + + /** + * 查询本站会员充值卡列表 + * @param cardValue + * @return + */ + @GetMapping("cardValueList") + public ResponseObject cardValueList(@Param("cardValue") CardValue cardValue) { + return getSuccessResult(this.cardValueService.cardValueList(cardValue)); + } + /** * 通过主键查询单条数据 * @@ -90,7 +101,16 @@ public class CardValueController extends BaseController { public ResponseObject selectById(@PathVariable Serializable id) { return getSuccessResult(this.cardValueService.getOneById(id)); } - + /** + * 获取使用时的详细信息 + * + * @param cardValueId 主键 + * @return 单条数据 + */ + @GetMapping("/getCoupons") + public ResponseObject getCoupons(@RequestParam("userId") Integer userId,@RequestParam("cardValueId") Integer cardValueId) { + return getSuccessResult(this.cardValueService.getCoupons(userId,cardValueId)); + } /** * 新增数据 * diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardValue/entity/CardValue.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardValue/entity/CardValue.java index 07dfdc41d..5f833f727 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardValue/entity/CardValue.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardValue/entity/CardValue.java @@ -3,12 +3,15 @@ package com.fuint.business.marketingActivity.cardValue.entity; import java.util.Date; import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.extension.activerecord.Model; import com.fasterxml.jackson.annotation.JsonFormat; +import com.fuint.business.marketingActivity.cardCoupon.entity.CardCoupon; import lombok.Data; import java.io.Serializable; +import java.util.List; /** * 储值卡表(CardValue)表实体类 @@ -87,6 +90,8 @@ public class CardValue extends Model { //20240821追加字段 //活动名称 private String activeName; + @TableField(exist = false) + private List cardCoupons; } diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardValue/mapper/CardValueChildMapper.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardValue/mapper/CardValueChildMapper.java index 9047a05c1..4b3cbef9d 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardValue/mapper/CardValueChildMapper.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardValue/mapper/CardValueChildMapper.java @@ -1,7 +1,11 @@ package com.fuint.business.marketingActivity.cardValue.mapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.fuint.business.marketingActivity.cardCoupon.entity.CardCoupon; import com.fuint.business.marketingActivity.cardValue.entity.CardValueChild; +import org.apache.ibatis.annotations.Param; + +import java.util.List; /** * 储值卡子表(CardValueChild)表数据库访问层 @@ -10,5 +14,6 @@ import com.fuint.business.marketingActivity.cardValue.entity.CardValueChild; * @since 2023-11-20 17:50:59 */ public interface CardValueChildMapper extends BaseMapper { + List getByCardId(@Param("cardValueId") Integer cardValueId); } diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardValue/mapper/xml/CardValueChildMapper.xml b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardValue/mapper/xml/CardValueChildMapper.xml new file mode 100644 index 000000000..6cd46c444 --- /dev/null +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardValue/mapper/xml/CardValueChildMapper.xml @@ -0,0 +1,16 @@ + + + + + + + + + diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardValue/service/CardValueChildService.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardValue/service/CardValueChildService.java index 7340266d9..d32763fe8 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardValue/service/CardValueChildService.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardValue/service/CardValueChildService.java @@ -1,8 +1,11 @@ package com.fuint.business.marketingActivity.cardValue.service; import com.baomidou.mybatisplus.extension.service.IService; +import com.fuint.business.marketingActivity.cardCoupon.entity.CardCoupon; import com.fuint.business.marketingActivity.cardValue.entity.CardValueChild; +import java.util.List; + /** * 储值卡子表(CardValueChild)表服务接口 * @@ -10,5 +13,5 @@ import com.fuint.business.marketingActivity.cardValue.entity.CardValueChild; * @since 2023-11-20 17:51:06 */ public interface CardValueChildService extends IService { - + List getByCardId(Integer cardValueId); } 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 03146539e..137247d15 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 @@ -3,6 +3,7 @@ package com.fuint.business.marketingActivity.cardValue.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.cardCoupon.entity.CardCoupon; import com.fuint.business.marketingActivity.cardValue.dto.CardValueDTO; import com.fuint.business.marketingActivity.cardValue.entity.CardValue; import com.fuint.business.marketingActivity.cardValue.vo.CardValueAppletVO; @@ -43,6 +44,7 @@ public interface CardValueService extends IService { * @return */ CardValueVO getOneById(Serializable id); + List getCoupons(Integer userId,Integer cardValueId); /** * 新增数据 @@ -66,6 +68,8 @@ public interface CardValueService extends IService { */ List selectAllApplet(CardValue cardValue); + List cardValueList (CardValue cardValue); + /** * 删除数据 * @param id diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardValue/service/impl/CardValueChildServiceImpl.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardValue/service/impl/CardValueChildServiceImpl.java index c4f524b4a..7a9a3a9d9 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardValue/service/impl/CardValueChildServiceImpl.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardValue/service/impl/CardValueChildServiceImpl.java @@ -1,11 +1,14 @@ package com.fuint.business.marketingActivity.cardValue.service.impl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.fuint.business.marketingActivity.cardCoupon.entity.CardCoupon; import com.fuint.business.marketingActivity.cardValue.entity.CardValueChild; import com.fuint.business.marketingActivity.cardValue.mapper.CardValueChildMapper; import com.fuint.business.marketingActivity.cardValue.service.CardValueChildService; import org.springframework.stereotype.Service; +import java.util.List; + /** * 储值卡子表(CardValueChild)表服务实现类 * @@ -15,5 +18,9 @@ import org.springframework.stereotype.Service; @Service("cardValueChildService") public class CardValueChildServiceImpl extends ServiceImpl implements CardValueChildService { + @Override + public List getByCardId(Integer cardValueId) { + return baseMapper.getByCardId(cardValueId); + } } 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 fcd5ea727..43ce6b7b9 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 @@ -1,5 +1,6 @@ package com.fuint.business.marketingActivity.cardValue.service.impl; +import cn.hutool.core.date.DateUtil; import cn.hutool.core.util.ObjectUtil; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; @@ -15,6 +16,9 @@ import com.fuint.business.marketingActivity.activeConsumption.vo.ActiveConsumpti import com.fuint.business.marketingActivity.activeDiscount.entity.ActiveDiscount; import com.fuint.business.marketingActivity.activeDiscount.entity.ActiveDiscountChild; import com.fuint.business.marketingActivity.activeDiscount.vo.ActiveDiscountVO; +import com.fuint.business.marketingActivity.cardCoupon.entity.CardCoupon; +import com.fuint.business.marketingActivity.cardCoupon.entity.CardCouponUser; +import com.fuint.business.marketingActivity.cardCoupon.service.CardCouponUserService; import com.fuint.business.marketingActivity.cardExchange.entity.CardExchange; import com.fuint.business.marketingActivity.cardExchange.mapper.CardExchangeMapper; import com.fuint.business.marketingActivity.cardFavorable.entity.CardFavorable; @@ -33,6 +37,7 @@ import com.fuint.business.member.service.ILJStaffService; import com.fuint.business.store.service.StoreService; import com.fuint.business.storeInformation.service.ILJStoreService; import com.fuint.business.userManager.service.LJUserGradeService; +import com.fuint.common.dto.AccountInfo; import com.fuint.common.service.StaffService; import com.fuint.common.util.TokenUtil; import com.fuint.repository.mapper.MtStaffMapper; @@ -86,6 +91,8 @@ public class CardValueServiceImpl extends ServiceImpl getCoupons(Integer userId,Integer cardValueId) { + List cardCoupons = cardValueChildService.getByCardId(cardValueId); + //过滤 + return cardCoupons.stream().filter(it -> { + return cardCouponUserService.userCanGet(it.getId(), userId); + }).collect(Collectors.toList()); + + } + /** * 新增数据 * @param cardValueDTO @@ -525,6 +542,19 @@ public class CardValueServiceImpl extends ServiceImpl cardValueList(CardValue cardValue) { + //获取当前登录用户 + AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo(); + String nowTime = DateUtil.format(new Date(), "yyyy-MM-dd")+"00:00:00"; + LambdaQueryWrapper queryWrapper =new LambdaQueryWrapper<>(); + queryWrapper.eq(CardValue::getStoreId,nowAccountInfo.getStoreId()).eq(CardValue::getIsonline,"0").eq(CardValue::getActiveStatus,"1").and(it->{ + return it.eq(CardValue::getActiveTime,"1").or().eq(CardValue::getActiveTime,"2") + .ge(CardValue::getStartTime,nowTime).le(CardValue::getEndTime,nowTime); + }).orderByAsc(CardValue::getRechargeBalance); + return this.list(queryWrapper); + } + /** * 删除数据 * @param id diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/petrolStationManagement/mapper/xml/OilGunMapper.xml b/fuintBackend/fuint-application/src/main/java/com/fuint/business/petrolStationManagement/mapper/xml/OilGunMapper.xml index f1424e00e..65ac256b9 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/petrolStationManagement/mapper/xml/OilGunMapper.xml +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/petrolStationManagement/mapper/xml/OilGunMapper.xml @@ -160,13 +160,13 @@ select zong.*, o2.oil_name FROM (SELECT o1.*, - o2.oil_name as oil_name_id, + o2.oil_name as oilNameId, o2.oil_type as oilType, o2.oil_price as oilPrice FROM oil_gun o1 - LEFT JOIN oil_number o2 ON o1.number_id = o2.number_id + LEFT JOIN oil_number o2 ON o1.number_id = o2.number_id WHERE o1.store_id = #{storeId} and o1.status = '启用' ) as zong - LEFT JOIN oil_name as o2 on zong.oil_name_id = o2.id + LEFT JOIN oil_name as o2 on zong.oilNameId = o2.id diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/petrolStationManagement/vo/OilCashRegisterVo.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/petrolStationManagement/vo/OilCashRegisterVo.java index 277f9c018..dd02f326a 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/petrolStationManagement/vo/OilCashRegisterVo.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/petrolStationManagement/vo/OilCashRegisterVo.java @@ -20,5 +20,6 @@ public class OilCashRegisterVo extends OilGun { * 关联表 挂牌价 */ private BigDecimal oilPrice; + private Integer oilNameId; } diff --git a/fuintCashierWeb/src/api/newHome/newHome.js b/fuintCashierWeb/src/api/newHome/newHome.js index 7b0cc5b41..786cf1be2 100644 --- a/fuintCashierWeb/src/api/newHome/newHome.js +++ b/fuintCashierWeb/src/api/newHome/newHome.js @@ -15,3 +15,17 @@ export function cashRegisterGoodsList() { method: 'get', }) } + +export function cardValueList() { + return request({ + url: '/business/marketingActivity/cardValue/cardValueList', + method: 'get', + }) +} +export function getCoupons(param) { + return request({ + url: '/business/marketingActivity/cardValue/getCoupons', + method: 'get', + params:param + }) +} diff --git a/fuintCashierWeb/src/views/cashier/NewComponents/newHome.vue b/fuintCashierWeb/src/views/cashier/NewComponents/newHome.vue index 37b9f4a34..f7adc0436 100644 --- a/fuintCashierWeb/src/views/cashier/NewComponents/newHome.vue +++ b/fuintCashierWeb/src/views/cashier/NewComponents/newHome.vue @@ -403,7 +403,7 @@ width="910px" center > - + 取 消 确认充值 @@ -436,7 +436,7 @@ import refuelingAmount from './newHomeComponents/refuelingAmount.vue' import {cashRegisterList, cashRegisterGoodsList} from '@/api/newHome/newHome.js' import {QRCodeByStoreId} from "@/api/staff/qrcode"; import {userListByPhone} from "@/api/cashier/user"; -import Vue from 'vue'; + import { VueClipboard } from 'vue-clipboard2'; export default { @@ -846,6 +846,10 @@ export default { }, addMemberRecharge() { this.memberRecharge = true + this.$nextTick(res=>{ + this.$refs.rechargeRef.getCardValueList(); + }) + }, changeBox() { this.boxShow = !this.boxShow diff --git a/fuintCashierWeb/src/views/cashier/NewComponents/newHomeComponents/memberRecharge.vue b/fuintCashierWeb/src/views/cashier/NewComponents/newHomeComponents/memberRecharge.vue index 7a179c147..0b109606d 100644 --- a/fuintCashierWeb/src/views/cashier/NewComponents/newHomeComponents/memberRecharge.vue +++ b/fuintCashierWeb/src/views/cashier/NewComponents/newHomeComponents/memberRecharge.vue @@ -1,7 +1,15 @@