diff --git a/fuintAdmin/src/views/EventMarketing/yijiancoupon/index.vue b/fuintAdmin/src/views/EventMarketing/yijiancoupon/index.vue index 6521f16fe..63029d650 100644 --- a/fuintAdmin/src/views/EventMarketing/yijiancoupon/index.vue +++ b/fuintAdmin/src/views/EventMarketing/yijiancoupon/index.vue @@ -630,7 +630,7 @@ export default { this.opendetails = true let data = { id:row.id, - exchangeFrom:"店铺一键送券!" + exchangeFrom:"店铺一键送券" } await looklook(data).then(res=>{ if(res.data){ diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/integral/service/impl/IntegralSettingsServiceImpl.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/integral/service/impl/IntegralSettingsServiceImpl.java index 746e3d699..db1d63e87 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/integral/service/impl/IntegralSettingsServiceImpl.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/integral/service/impl/IntegralSettingsServiceImpl.java @@ -338,6 +338,15 @@ public class IntegralSettingsServiceImpl implements IntegralSettingsService { private void countPoints(IntegralSettings integralSettings,String oilId,Double amount,Integer userId){ LJStore store = iljStoreService.selectStoreByStoreId(integralSettings.getStoreId()); UserBalance balance = userBalanceService.selectUserBalance(userId, store.getChainStoreId()); + IntegralDetail integralDetail = new IntegralDetail(); + integralDetail.setStoreId(integralSettings.getStoreId()); + integralDetail.setChainStoreId(integralSettings.getChainStoreId()); + integralDetail.setPointsChange(Double.valueOf(integralSettings.getRefuelPoints())); + integralDetail.setCurrentPoints(balance.getPoints() + integralSettings.getRefuelPoints()); + integralDetail.setChangeType("1"); + integralDetail.setChangeReason("充值"); + integralDetail.setUserId(balance.getMtUserId()); + IntegralDetail integralDetail1 = integralDetailService.insert2(integralDetail); if (ObjectUtil.isNotEmpty(balance)) { if (integralSettings.getRefuelSceneRules()==0) { // 通用规则 @@ -361,6 +370,7 @@ public class IntegralSettingsServiceImpl implements IntegralSettingsService { } } userBalanceService.updateUserBalance(balance); + } } diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeConsumption/service/ActiveConsumptionChildService.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeConsumption/service/ActiveConsumptionChildService.java index 24c5abe2c..53627efc5 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeConsumption/service/ActiveConsumptionChildService.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeConsumption/service/ActiveConsumptionChildService.java @@ -20,7 +20,7 @@ public interface ActiveConsumptionChildService extends IService selectList(Serializable id); - List detailRecord(ActiveConsumption activeConsumption); + List detailRecord(ActiveConsumption activeConsumption); CardFavorableCountVO detailCount(Serializable id); } diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeConsumption/service/impl/ActiveConsumptionChildServiceImpl.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeConsumption/service/impl/ActiveConsumptionChildServiceImpl.java index 6071a4b68..b49e048f0 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeConsumption/service/impl/ActiveConsumptionChildServiceImpl.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeConsumption/service/impl/ActiveConsumptionChildServiceImpl.java @@ -18,6 +18,8 @@ import org.springframework.stereotype.Service; import javax.annotation.Resource; import java.io.Serializable; +import java.util.ArrayList; +import java.util.HashMap; import java.util.List; /** @@ -41,19 +43,45 @@ public class ActiveConsumptionChildServiceImpl extends ServiceImpl detailRecord(ActiveConsumption activeConsumption) { + public List detailRecord(ActiveConsumption activeConsumption) { + + ArrayList objects = new ArrayList<>(); // 查询优惠券领取记录 AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo(); LambdaQueryWrapper queryWrapper = new LambdaQueryWrapper<>(); queryWrapper.eq(CardFavorableRecord::getActiveId, activeConsumption.getId()); - queryWrapper.eq(CardFavorableRecord::getExchangeFrom, activeConsumption.getExchangeFrom()); - queryWrapper.eq(CardFavorableRecord::getStoreId, nowAccountInfo.getStoreId()); + queryWrapper.like(CardFavorableRecord::getExchangeFrom, activeConsumption.getExchangeFrom()); if (ObjectUtils.isNotEmpty(activeConsumption.getActiveStartTime()) && ObjectUtils.isNotEmpty(activeConsumption.getActiveEndTime())){ queryWrapper.between(CardFavorableRecord::getCreateTime, activeConsumption.getActiveStartTime(), activeConsumption.getActiveEndTime()); } queryWrapper.eq(CardFavorableRecord::getStoreId, nowAccountInfo.getStoreId()); List favorableRecords = cardFavorableRecordService.list(queryWrapper); - return favorableRecords; + + for (CardFavorableRecord favorableRecord : favorableRecords) { + HashMap objectObjectHashMap = new HashMap<>(); + objectObjectHashMap.put("name",favorableRecord.getName()); + objectObjectHashMap.put("mobile",favorableRecord.getMobile()); + objectObjectHashMap.put("createTime",favorableRecord.getCreateTime()); + objectObjectHashMap.put("exchangeFrom",favorableRecord.getExchangeFrom()); + objects.add(objectObjectHashMap); + } + LambdaQueryWrapper queryWrapper1 = new LambdaQueryWrapper<>(); + queryWrapper1.eq(CardExchangeRecord::getActiveId, activeConsumption.getId()); + queryWrapper1.like(CardExchangeRecord::getExchangeFrom, activeConsumption.getExchangeFrom()); + if (ObjectUtils.isNotEmpty(activeConsumption.getActiveStartTime()) && ObjectUtils.isNotEmpty(activeConsumption.getActiveEndTime())){ + queryWrapper1.between(CardExchangeRecord::getCreateTime, activeConsumption.getActiveStartTime(), activeConsumption.getActiveEndTime()); + } + queryWrapper1.eq(CardExchangeRecord::getStoreId, nowAccountInfo.getStoreId()); + List record1 = cardExchangeRecordService.list(queryWrapper1); + for (CardExchangeRecord cardExchangeRecord : record1) { + HashMap objectObjectHashMap1 = new HashMap<>(); + objectObjectHashMap1.put("name",cardExchangeRecord.getName()); + objectObjectHashMap1.put("mobile",cardExchangeRecord.getMobile()); + objectObjectHashMap1.put("createTime",cardExchangeRecord.getCreateTime()); + objectObjectHashMap1.put("exchangeFrom",cardExchangeRecord.getExchangeFrom()); + objects.add(objectObjectHashMap1); + } + return objects; } @Override diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeExchange/service/impl/ActiveExchangeServiceImpl.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeExchange/service/impl/ActiveExchangeServiceImpl.java index 775c44903..01ffdfea7 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeExchange/service/impl/ActiveExchangeServiceImpl.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeExchange/service/impl/ActiveExchangeServiceImpl.java @@ -982,7 +982,6 @@ public class ActiveExchangeServiceImpl implements ActiveExchangeService { paymentActiveVO.setMemberFavorableAmount(bigDecimal2); } } - } if (oilTypebyId.equals("天然气")) { if (ljUserGrade.getGasolineDiscount().equals("无优惠")) { @@ -1086,7 +1085,7 @@ public class ActiveExchangeServiceImpl implements ActiveExchangeService { @Override public void activeConsumption (PaymentActiveDTO paymentActiveDTO) throws Exception { //消费有礼 - AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo(); + // AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo(); ArrayList activeConsumptionVOS1 = new ArrayList<>(); List activeConsumptionVOS = oilOrderMapper.selectActiveConsumption(paymentActiveDTO.getStoreId(), paymentActiveDTO.getOrderAmount()); if (CollectionUtils.isNotEmpty(activeConsumptionVOS)) { @@ -1100,7 +1099,7 @@ public class ActiveExchangeServiceImpl implements ActiveExchangeService { if (ObjectUtils.isNotEmpty(paymentActiveDTO.getUserId())){ queryWrapper.eq(ActiveConsumptionRecord::getUserId,paymentActiveDTO.getUserId()); }else { - queryWrapper.eq(ActiveConsumptionRecord::getUserId,nowAccountInfo.getId()); + queryWrapper.eq(ActiveConsumptionRecord::getUserId,paymentActiveDTO.getUserId()); } List list = activeConsumptionRecordService.list(queryWrapper); @@ -1112,7 +1111,7 @@ public class ActiveExchangeServiceImpl implements ActiveExchangeService { if (ObjectUtils.isNotEmpty(paymentActiveDTO.getUserId())){ activeConsumptionRecord.setUserId(paymentActiveDTO.getUserId()); }else { - activeConsumptionRecord.setUserId(nowAccountInfo.getId()); + activeConsumptionRecord.setUserId(paymentActiveDTO.getUserId()); } activeConsumptionRecord.setStoreId(paymentActiveDTO.getStoreId()); activeConsumptionRecordService.save(activeConsumptionRecord); diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeOneCoupon/service/impl/ActiveOneCouponServiceImpl.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeOneCoupon/service/impl/ActiveOneCouponServiceImpl.java index 052bd7d15..297c2dd23 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeOneCoupon/service/impl/ActiveOneCouponServiceImpl.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeOneCoupon/service/impl/ActiveOneCouponServiceImpl.java @@ -159,7 +159,7 @@ public class ActiveOneCouponServiceImpl extends ServiceImpl queryWrapper1 = new LambdaQueryWrapper<>(); - queryWrapper1.eq(CardFavorableRecord::getExchangeFrom, "店铺一键送券!"); + queryWrapper1.eq(CardFavorableRecord::getExchangeFrom, "店铺一键送券"); queryWrapper1.eq(CardFavorableRecord::getActiveId, record.getId()); queryWrapper1.eq(CardFavorableRecord::getStoreId, record.getStoreId()); List list = cardFavorableRecordService.list(queryWrapper1); @@ -170,7 +170,7 @@ public class ActiveOneCouponServiceImpl extends ServiceImpl queryWrapper2 = new LambdaQueryWrapper<>(); - queryWrapper2.eq(CardExchangeRecord::getExchangeFrom, "店铺一键送券!"); + queryWrapper2.eq(CardExchangeRecord::getExchangeFrom, "店铺一键送券"); queryWrapper2.eq(CardExchangeRecord::getActiveId, record.getId()); queryWrapper2.eq(CardExchangeRecord::getStoreId, record.getStoreId()); List list2 = cardExchangeRecordService.list(queryWrapper2); diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardExchange/controller/CardExchangeRecordController.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardExchange/controller/CardExchangeRecordController.java index f0bd532d4..2e430474a 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardExchange/controller/CardExchangeRecordController.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardExchange/controller/CardExchangeRecordController.java @@ -139,13 +139,13 @@ public class CardExchangeRecordController extends BaseController { ljOrder.setPayUser(byId.getMobile()); ljOrder.setStoreId(nowAccountInfo.getStoreId()); ljOrder.setUserId(byId.getMtUserId()); - ljOrder.setGoodsNum(1); + ljOrder.setGoodsNum(byId.getProductCount()); ljOrder.setPayType("0"); ljOrder.setStatus("paid"); ljOrder.setPayTime(new Date()); ljOrder.setStaffId(nowAccountInfo.getStaffId()); ljOrderService.addGoodOrder(ljOrder,giftId); - stockStatisticService.insertStockStatisticTrack(giftId,0.0,"核销兑换!",1); + stockStatisticService.insertStockStatisticTrack(giftId,0.0,"核销兑换!",byId.getProductCount()); return getSuccessResult(this.cardExchangeRecordService.updateById(cardExchangeRecord)); } diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardExchange/entity/CardExchangeRecord.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardExchange/entity/CardExchangeRecord.java index 083efe80d..a7331b4b2 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardExchange/entity/CardExchangeRecord.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardExchange/entity/CardExchangeRecord.java @@ -30,6 +30,7 @@ public class CardExchangeRecord extends Model { private Integer chainStorId; //所属店铺id private Integer storeId; + private Integer productCount; //员工id private Integer mtStaffId; //员工姓名 diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardExchange/service/impl/CardExchangeRecordServiceImpl.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardExchange/service/impl/CardExchangeRecordServiceImpl.java index 6e25fb516..7c604a43b 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardExchange/service/impl/CardExchangeRecordServiceImpl.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardExchange/service/impl/CardExchangeRecordServiceImpl.java @@ -126,6 +126,7 @@ public class CardExchangeRecordServiceImpl extends ServiceImpl and cfr.status = #{cardFavorableDTOS.useStatus} - - - and cfr.status = #{cardFavorableDTOS.useStatus} - and cfr.store_id = #{cardFavorableDTOS.storeId} and cf.type != 1 UNION ALL SELECT @@ -123,11 +118,12 @@ LEFT JOIN card_exchange ce ON cer.card_exchange_id = ce.id WHERE cer.mt_user_id = #{cardFavorableDTOS.id} + + and cer.status = #{cardFavorableDTOS.useStatus} + + and cer.store_id = #{cardFavorableDTOS.storeId} and ce.type = 0 or cer.mt_user_id = #{cardFavorableDTOS.id} and ce.type = 1 - - and cer.status = #{cardFavorableDTOS.useStatus} - - + and cer.status = #{cardFavorableDTOS.useStatus} and cer.store_id = #{cardFavorableDTOS.storeId} UNION ALL @@ -141,12 +137,7 @@ WHERE cer.mt_user_id = #{cardFavorableDTOS.id} and ce.type = 1 - - and cer.status = #{cardFavorableDTOS.useStatus} - - - and cer.status = #{cardFavorableDTOS.useStatus} - + and cer.status = #{cardFavorableDTOS.useStatus} and cer.store_id = #{cardFavorableDTOS.storeId} and cer.status = #{cardFavorableDTOS.useStatus} diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardFavorable/service/impl/CardFavorableRecordServiceImpl.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardFavorable/service/impl/CardFavorableRecordServiceImpl.java index 54ba49359..38bd39531 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardFavorable/service/impl/CardFavorableRecordServiceImpl.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardFavorable/service/impl/CardFavorableRecordServiceImpl.java @@ -443,7 +443,7 @@ public class CardFavorableRecordServiceImpl extends ServiceImpl couponVOS = cardFavorableRecordMapper.selectAllByCondition(page,cardFavorableDTOS); List records = couponVOS.getRecords(); + for (CouponVO record : records) { + if (record.getCouponType().equals("兑换券")){ + record.setCouponContent(record.getSatisfiedAmount()); + } + } //有效期 List collect = records.stream().filter(s -> s.getEndTime().getTime() < System.currentTimeMillis()).collect(Collectors.toList()); if (ObjectUtils.isNotEmpty(collect)){ diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/order/entity/OilOrder.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/order/entity/OilOrder.java index 71e3bbd63..9c4730433 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/order/entity/OilOrder.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/order/entity/OilOrder.java @@ -92,6 +92,8 @@ public class OilOrder extends BaseEntity implements Serializable { * 优惠金额 */ private Double balanceAmount; + private Double levelAmount; + private Double activeAmount; /** * 优惠金额 */ diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/order/service/impl/OilOrderServiceImpl.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/order/service/impl/OilOrderServiceImpl.java index 5607e0596..a32a583e8 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/order/service/impl/OilOrderServiceImpl.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/order/service/impl/OilOrderServiceImpl.java @@ -233,7 +233,11 @@ public class OilOrderServiceImpl extends ServiceImpl i } // 优惠券 if (ObjectUtil.isNotEmpty(oilOrderVo.getCouponId())) { - CardFavorableVO cardFavorableVO = cardFavorableService.selectOneById(oilOrderVo.getCouponId()); + //CardFavorableVO cardFavorableVO = cardFavorableService.selectOneById(oilOrderVo.getCouponId()); + LambdaQueryWrapper queryWrapper = new LambdaQueryWrapper<>(); + queryWrapper.eq(CardFavorableRecord::getCardFavorableId, oilOrderVo.getCouponId()); + queryWrapper.eq(CardFavorableRecord::getMtUserId, oilOrderVo.getUserId()); + CardFavorableRecord cardFavorableVO = cardFavorableRecordService.getOne(queryWrapper); oilOrderVo.setCouponAmount(cardFavorableVO.getDiscountAmount()); } else { oilOrderVo.setCouponAmount(0.0); @@ -278,6 +282,8 @@ public class OilOrderServiceImpl extends ServiceImpl i Double goodsActualPay = Double.valueOf(map.get("goodsActualPay")); // 找零金额 Double seekZero = Double.valueOf(map.get("seekZero")); + Double levelAmount = Double.valueOf(map.get("levelAmount")); + Double activeAmount = Double.valueOf(map.get("activeAmount")); // 优惠券id Integer cardFavorableId = null; if (StringUtils.isNotEmpty(map.get("cardFavorableId"))){ @@ -442,6 +448,8 @@ public class OilOrderServiceImpl extends ServiceImpl i staffCommissionService.countStaffCommission(staffId,storeId,oilAmount,oilActualPay,"1",orderNo); } order.setCouponId(recordId); + order.setActiveAmount(activeAmount); + order.setLevelAmount(levelAmount); }else { order.setOrderType("子订单"); order.setOrderAmount(amount); @@ -1592,7 +1600,7 @@ public class OilOrderServiceImpl extends ServiceImpl i }else {} // 修改用户成长值 Integer consumeNum = balance.getConsumeNum(); - balance.setConsumeNum(consumeNum+1); + // balance.setConsumeNum(consumeNum+1); userBalanceService.updateUserBalance(balance); this.insertGrowthValueChange(userid,storeId,addGrowthVal,growthAfter,orderNo); diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/userManager/controller/LJUserController.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/userManager/controller/LJUserController.java index 007112f7f..d048583fe 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/userManager/controller/LJUserController.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/userManager/controller/LJUserController.java @@ -220,7 +220,7 @@ public class LJUserController extends BaseController { */ @DeleteMapping("/{id}") public ResponseObject remove(@PathVariable Integer id){ - userService.deleteUserById(id); + userService.deleteUserBy(id); return getSuccessResult("操作成功"); } diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/userManager/service/LJUserService.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/userManager/service/LJUserService.java index 9fbd055fe..87a7dc385 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/userManager/service/LJUserService.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/userManager/service/LJUserService.java @@ -114,7 +114,8 @@ public interface LJUserService extends IService { * 根据id删除会员信息 * @param id */ - public void deleteUserById(Integer id); + public void deleteUserById(Integer id,Integer storeId); + public void deleteUserBy(Integer id); /** * 增加会员信息 diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/userManager/service/MtInvitationService.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/userManager/service/MtInvitationService.java index 4687edfd6..218c9ba3f 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/userManager/service/MtInvitationService.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/userManager/service/MtInvitationService.java @@ -59,5 +59,5 @@ public interface MtInvitationService { * 根据会员id和店铺id删除用户邀请注册信息 * @param userId */ - void deleteByUserIdAndeStoreId(Integer userId); + void deleteByUserIdAndeStoreId(Integer userId,Integer storeId); } diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/userManager/service/UserBalanceService.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/userManager/service/UserBalanceService.java index 8a6f7c998..8052041e8 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/userManager/service/UserBalanceService.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/userManager/service/UserBalanceService.java @@ -22,7 +22,7 @@ public interface UserBalanceService extends IService { * 根据用户id和店铺id删除会员储值信息 * @param userId */ - public void deleteUserBalanceByUserId(Integer userId); + public void deleteUserBalanceByUserId(Integer userId,Integer storeId); /** * 根据用户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 aa80d6120..8fa662989 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 @@ -291,15 +291,28 @@ public class LJUserServiceImpl extends ServiceImpl impleme * @param id */ @Override - public void deleteUserById(Integer id) { - balanceService.deleteUserBalanceByUserId(id); + public void deleteUserById(Integer id,Integer storeId) { + balanceService.deleteUserBalanceByUserId(id,storeId); List userBalances = balanceService.selectUserBalance(id); if (userBalances.size()==0){ baseMapper.deleteById(id); } - invitationService.deleteByUserIdAndeStoreId(id); + invitationService.deleteByUserIdAndeStoreId(id,storeId); + } + + @Override + public void deleteUserBy(Integer id) { + AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo(); + balanceService.deleteUserBalanceByUserId(id,nowAccountInfo.getStoreId()); + + List userBalances = balanceService.selectUserBalance(id); + if (userBalances.size()==0){ + baseMapper.deleteById(id); + } + + invitationService.deleteByUserIdAndeStoreId(id,nowAccountInfo.getStoreId()); } @Autowired diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/userManager/service/impl/MtInvitationServiceImpl.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/userManager/service/impl/MtInvitationServiceImpl.java index 7b21b430a..2f3c99a49 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/userManager/service/impl/MtInvitationServiceImpl.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/userManager/service/impl/MtInvitationServiceImpl.java @@ -89,11 +89,10 @@ public class MtInvitationServiceImpl implements MtInvitationService { } @Override - public void deleteByUserIdAndeStoreId(Integer userId) { - AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo(); + public void deleteByUserIdAndeStoreId(Integer userId,Integer storeId) { QueryWrapper queryWrapper = new QueryWrapper<>(); queryWrapper.eq("userId",userId); - queryWrapper.eq("storeId",nowAccountInfo.getStoreId()); + queryWrapper.eq("storeId",storeId); mtInvitationMapper.delete(queryWrapper); } } diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/userManager/service/impl/UserBalanceServiceImpl.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/userManager/service/impl/UserBalanceServiceImpl.java index 090dc3c89..76b2b10e4 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/userManager/service/impl/UserBalanceServiceImpl.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/userManager/service/impl/UserBalanceServiceImpl.java @@ -46,9 +46,9 @@ public class UserBalanceServiceImpl extends ServiceImpl(); queryWrapper.eq("mt_user_id",userId); queryWrapper.eq("chain_store_id",store.getChainStoreId()); diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/common/annotation/ExpirationCheck.java b/fuintBackend/fuint-application/src/main/java/com/fuint/common/annotation/ExpirationCheck.java new file mode 100644 index 000000000..cc790247d --- /dev/null +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/common/annotation/ExpirationCheck.java @@ -0,0 +1,9 @@ +package com.fuint.common.annotation; + +import java.lang.annotation.*; + +@Target(ElementType.METHOD) +@Retention(RetentionPolicy.RUNTIME) +@Documented +public @interface ExpirationCheck { +} diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/common/service/impl/MemberServiceImpl.java b/fuintBackend/fuint-application/src/main/java/com/fuint/common/service/impl/MemberServiceImpl.java index fb294b474..90eca587a 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/common/service/impl/MemberServiceImpl.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/common/service/impl/MemberServiceImpl.java @@ -811,7 +811,7 @@ public class MemberServiceImpl extends ServiceImpl impleme } // 新增余额信息 - if (ObjectUtil.isNotEmpty(storeId) && storeId !="") { + if (ObjectUtil.isNotEmpty(storeId) && !storeId.equals("")) { createVaseInfo(mtUser, storeId, staffId, inviterId); } @@ -834,15 +834,15 @@ public class MemberServiceImpl extends ServiceImpl impleme if (ObjectUtil.isNotEmpty(user)){ - if (mtUserMobile.getId()!=user.getId()){ - ljUserService.deleteUserById(user.getId()); + if (!mtUserMobile.getId().equals(user.getId())){ + ljUserService.deleteUserById(user.getId(),Integer.parseInt(storeId)); } } int i = baseMapper.updateById(mtUserMobile); // 新增余额信息 - if (ObjectUtil.isNotEmpty(storeId) && storeId !="") { + if (ObjectUtil.isNotEmpty(storeId) && !storeId.equals("")) { createVaseInfo(mtUserMobile,storeId,staffId,inviterId); } diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/common/shiroConfig/ShiroConfig.java b/fuintBackend/fuint-application/src/main/java/com/fuint/common/shiroConfig/ShiroConfig.java index 6ee3f4f5a..91e8593f5 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/common/shiroConfig/ShiroConfig.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/common/shiroConfig/ShiroConfig.java @@ -49,6 +49,7 @@ public class ShiroConfig { filterMap.put("/excel/export","anon"); //根据地理位置获取最近的店铺信息 filterMap.put("/business/storeInformation/store/recentlyStore","anon"); + filterMap.put("/business/storeInformation/store/isRecharge","anon"); //会员扫码进入小程序后根据id获取店铺信息 filterMap.put("/business/storeInformation/store/queryStoreById","anon"); filterMap.put("/backendApi/store/loginVerification","anon"); diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/common/util/TokenUtil.java b/fuintBackend/fuint-application/src/main/java/com/fuint/common/util/TokenUtil.java index 3a99ca3f5..156c4662e 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/common/util/TokenUtil.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/common/util/TokenUtil.java @@ -121,7 +121,7 @@ public class TokenUtil { if (accountInfo == null) { return; } - RedisUtil.set(Constants.SESSION_ADMIN_USER + accountInfo.getToken(), accountInfo, TOKEN_OVER_TIME); + RedisUtil.set(Constants.SESSION_ADMIN_USER + accountInfo.getToken(), accountInfo); } /** @@ -179,4 +179,4 @@ public class TokenUtil { } throw new LoginEffectiveException("登录失效,请重新登录"); } -} \ No newline at end of file +} diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/module/AlipayApi/controller/AlipayController.java b/fuintBackend/fuint-application/src/main/java/com/fuint/module/AlipayApi/controller/AlipayController.java index 6e0c82627..eb3f99d53 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/module/AlipayApi/controller/AlipayController.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/module/AlipayApi/controller/AlipayController.java @@ -83,7 +83,7 @@ public class AlipayController extends BaseController { user.setUserId(userId); if (ObjectUtil.isNotEmpty(user1)) { if (user1.getId()!=user.getId()){ - userService.deleteUserById(user1.getId()); + userService.deleteUserById(user1.getId(),Integer.parseInt(storeId)); } } userService.updateById(user); diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/module/backendApi/controller/BackendSourceController.java b/fuintBackend/fuint-application/src/main/java/com/fuint/module/backendApi/controller/BackendSourceController.java index d8e1508b1..2bb758dec 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/module/backendApi/controller/BackendSourceController.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/module/backendApi/controller/BackendSourceController.java @@ -195,6 +195,7 @@ public class BackendSourceController extends BaseController { editSource.setSourceStyle(sort); editSource.setIsMenu(isMenu); editSource.setSourceCode(editSource.getPath()); + editSource.setMerchantId(Integer.valueOf(param.get("merchantId").toString())); String eName = ""; String[] paths = path.split("/"); diff --git a/gasStation-uni/pages/index/index.vue b/gasStation-uni/pages/index/index.vue index 1b2786a52..16ae4ef3a 100644 --- a/gasStation-uni/pages/index/index.vue +++ b/gasStation-uni/pages/index/index.vue @@ -251,20 +251,16 @@ this.storeId = uni.getStorageSync("storeId") this.chainStoreId = uni.getStorageSync("chainStoreId") this.staffId = uni.getStorageSync("inviteStaffId") - await this.getUserAuthority(); + // await this.getUserAuthority(); // await this.getOilType(); } else { if (uni.getStorageSync("storeId")) { this.storeId = uni.getStorageSync("storeId") - } else { - let storeId = "34"; - - uni.setStorageSync("storeId", storeId) } - await this.getUserAuthority(); // await this.getOilType(); } + await this.getUserAuthority(); await this.getTheJudgmentIsTheSame(); } else { await this.getUserAuthority(); diff --git a/gasStation-uni/pagesRefuel/orderDetail/index.vue b/gasStation-uni/pagesRefuel/orderDetail/index.vue index 6c6dbd1a4..3646020c6 100644 --- a/gasStation-uni/pagesRefuel/orderDetail/index.vue +++ b/gasStation-uni/pagesRefuel/orderDetail/index.vue @@ -253,6 +253,8 @@ memberFavorableAmount: "", type: "", }, + levelAmount: 0, + activeAmount: 0, // 是否为固定等级会员 isFixingLevel: false, } @@ -321,7 +323,9 @@ type: this.preferentialData.type, balanceAmountSale: this.balanceRedece, oilCardAmountSale: this.oilCardRedece, - ifLogin: this.ifLogin + ifLogin: this.ifLogin, + levelAmount: this.levelAmount, + activeAmount: this.activeAmount }; let _this = this; request({ @@ -895,12 +899,14 @@ this.preferentialData = res.data if (res.data.memberFavorableAmount) { this.gradeRedece = res.data.memberFavorableAmount + this.levelAmount = res.data.memberFavorableAmount } if (res.data.cardFavorableAmount) { this.couponRedece = res.data.cardFavorableAmount } if (res.data.activeFavorableAmount) { this.fullRedece = res.data.activeFavorableAmount + this.activeAmount = res.data.activeFavorableAmount } console.log(this.gradeRedece, this.couponRedece, this.fullRedece, res.data .memberFavorableAmount, "2231");