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 c1269e312..f069bbbfb 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 @@ -1,6 +1,7 @@ package com.fuint.business.userManager.service.impl; import cn.hutool.core.util.ObjectUtil; +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.extension.plugins.pagination.Page; @@ -62,6 +63,8 @@ public class LJUserServiceImpl extends ServiceImpl impleme @Autowired @Lazy private OilOrderService orderService; + @Autowired + private IMtUserFuelService userFuelService; /** * 根据条件分页查询会员信息 @@ -330,7 +333,14 @@ public class LJUserServiceImpl extends ServiceImpl impleme public LJUserVo queryUserByStoreIdAndUserId(Integer storeId) { AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo(); LJStore store = storeService.selectStoreByStoreId(storeId); - return baseMapper.queryUserByChainStoreId(nowAccountInfo.getId(),store.getChainStoreId()); + LJUserVo ljUserVo = baseMapper.queryUserByChainStoreId(nowAccountInfo.getId(), store.getChainStoreId()); + //用户的储值卡总额 = 储值金额+赠送金额 要记得使用 + //在查询囤油卡信息 + LambdaQueryWrapper queryWrapper =new LambdaQueryWrapper<>(); + queryWrapper.eq(MtUserFuel::getStoreId,storeId).eq(MtUserFuel::getMtUserId,nowAccountInfo.getId()); + List list = userFuelService.list(queryWrapper); + ljUserVo.setUserFuels(list); + return ljUserVo; } @Override diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/userManager/vo/LJUserVo.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/userManager/vo/LJUserVo.java index 289238336..86a2da580 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/userManager/vo/LJUserVo.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/userManager/vo/LJUserVo.java @@ -5,12 +5,15 @@ import com.alibaba.excel.annotation.ExcelProperty; import com.alibaba.excel.annotation.write.style.ColumnWidth; import com.baomidou.mybatisplus.annotation.TableField; import com.fasterxml.jackson.annotation.JsonFormat; +import com.fuint.business.userManager.entity.MtUserFuel; import com.fuint.business.userManager.util.GenderConverter; import com.fuint.framework.entity.BaseEntity; +import com.fuint.repository.model.MtUser; import lombok.Data; import java.math.BigDecimal; import java.util.Date; +import java.util.List; @Data @ExcelIgnoreUnannotated @@ -160,4 +163,6 @@ public class LJUserVo extends BaseEntity { * 用户来源:员工码;门店扫码;会员导入;会员邀请 */ private String userSource; + //囤油卡信息 + private List userFuels; }