From 61aa8f5175dc47d72829e5da05158d46737a87bf Mon Sep 17 00:00:00 2001 From: zhaohengkun Date: Fri, 11 Oct 2024 17:22:12 +0800 Subject: [PATCH] 1 --- .../impl/CardCouponUserServiceImpl.java | 3 +- .../userManager/mapper/xml/LJUserMapper.xml | 104 +++++++++++------- .../service/impl/PayCenterServiceImpl.java | 1 + .../main/java/com/fuint/pay/vo/CouponVO.java | 2 + 4 files changed, 72 insertions(+), 38 deletions(-) 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 index 46006f242..22f06d295 100644 --- 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 @@ -85,7 +85,8 @@ public class CardCouponUserServiceImpl extends ServiceImpl selectAllList(Integer storeId, Integer userId, Date nowDate) { - return cardCouponUserMapper.selectAllList(storeId, userId, DateUtil.formatDate(nowDate)); + String s = DateUtil.format(nowDate, "yyyy-MM-dd HH:mm:ss"); + return cardCouponUserMapper.selectAllList(storeId, userId, s); } @Override 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 35552032a..e13a59524 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 @@ -2,16 +2,44 @@ - select mu.*,mub.grade_id,mub.card_balance,mub.points,mub.consume_num,mub.growth_value,mub.refuel_money, - mub.second_card,mub.fixing_level, - mi.storeId,mi.staffId,mi.inviterId,mub.chain_store_id from mt_user mu - left join mt_user_balance mub on mu.id = mub.mt_user_id - 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, + mub.second_card, + mub.fixing_level, + mi.storeId, + mi.staffId, + mi.inviterId, + mub.chain_store_id + from mt_user mu + left join mt_user_balance mub on mu.id = mub.mt_user_id + left join mt_invitation mi on mu.id = mi.userId - 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,mub.remark remark,mub.user_label_id userLabelId, - mub.user_status,mub.store_id mubStoreId,mub.recharge_num,mub.used_amount,mub.used_points,mub.give_amount,mub.user_source + 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, + mub.remark remark, + mub.user_label_id userLabelId, + mub.user_status, + mub.store_id mubStoreId, + mub.recharge_num, + mub.used_amount, + mub.used_points, + mub.give_amount, + mub.user_source FROM mt_user mu LEFT JOIN mt_user_balance mub ON mu.id = mub.mt_user_id @@ -187,10 +215,10 @@ select mu.*, - mub.id balanceId, + mub.id balanceId, + mub.card_balance cardBalance, + mub.points, + mub.growth_value growthValue, + mub.refuel_money refuelMoney + from mt_user mu + left join mt_user_balance mub on mu.id = mub.mt_user_id + where mu.id = #{userId} limit 1 + + + - - @@ -330,7 +356,7 @@ LEFT JOIN mt_user_balance mub ON mu.id = mub.mt_user_id mu.id = #{id} - and mub.chain_store_id =#{chainStoreId} + and mub.chain_store_id =#{chainStoreId} diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/pay/service/impl/PayCenterServiceImpl.java b/fuintBackend/fuint-application/src/main/java/com/fuint/pay/service/impl/PayCenterServiceImpl.java index a814c15e9..488ba065d 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/pay/service/impl/PayCenterServiceImpl.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/pay/service/impl/PayCenterServiceImpl.java @@ -479,6 +479,7 @@ public class PayCenterServiceImpl implements PayCenterService { couponVO.setCouponId(rule.getId()); couponVO.setName(rule.getName()); couponVO.setUseWithOther(rule.getUseWithOther()); + couponVO.setType(rule.getType()); //计算优惠金额 couponVO.setDisAmount(checkUtil.computeDisAmountCoupon(rule, oilAmount, oilLiter)); rtnList.add(couponVO); diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/pay/vo/CouponVO.java b/fuintBackend/fuint-application/src/main/java/com/fuint/pay/vo/CouponVO.java index a77efa1c6..b444b05cc 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/pay/vo/CouponVO.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/pay/vo/CouponVO.java @@ -21,4 +21,6 @@ public class CouponVO implements Serializable { private String useWithOther; /** 优惠金额 */ private Double disAmount; +// 优惠卷类型 + private String type; }