| | |
| | | package com.mzl.flower.service.impl.wallet; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.mzl.flower.entity.coupon.CouponTemplateDO; |
| | | import com.mzl.flower.entity.wallet.WalletDO; |
| | | import com.mzl.flower.enums.TrueOrFalseEnum; |
| | | import com.mzl.flower.mapper.wallet.WalletMapper; |
| | | import com.mzl.flower.service.wallet.WalletService; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | |
| | | @Service |
| | | public class WalletServiceImpl extends ServiceImpl<WalletMapper, WalletDO> implements WalletService { |
| | | |
| | | |
| | | @Override |
| | | public WalletDO getBySupplierId(Long supplierId) { |
| | | // 根据供应商ID获取钱包信息 |
| | | if (supplierId != null) { |
| | | // 查询的条件的deleted的字段得为0 |
| | | return getOne(new LambdaQueryWrapper<WalletDO>() |
| | | .eq(WalletDO::getDeleted, TrueOrFalseEnum.FALSE.isFlag()) |
| | | .eq(WalletDO::getSupplierId, supplierId)); |
| | | } |
| | | return null; |
| | | } |
| | | } |