| | |
| | | package cc.mrbird.febs.mall.service.impl; |
| | | |
| | | import cc.mrbird.febs.common.entity.FebsResponse; |
| | | import cc.mrbird.febs.common.enumerates.AgentLevelEnum; |
| | | import cc.mrbird.febs.common.enumerates.DataDictionaryEnum; |
| | | import cc.mrbird.febs.common.enumerates.FlowTypeEnum; |
| | | import cc.mrbird.febs.common.enumerates.MoneyFlowTypeEnum; |
| | | import cc.mrbird.febs.common.enumerates.*; |
| | | import cc.mrbird.febs.common.exception.FebsException; |
| | | import cc.mrbird.febs.common.properties.XcxProperties; |
| | | import cc.mrbird.febs.common.utils.*; |
| | |
| | | import cc.mrbird.febs.mall.vo.*; |
| | | import cc.mrbird.febs.pay.model.BrandWCPayRequestData; |
| | | import cc.mrbird.febs.pay.service.IXcxPayService; |
| | | import cc.mrbird.febs.vip.entity.MallVipConfig; |
| | | import cc.mrbird.febs.vip.mapper.MallVipConfigMapper; |
| | | import cn.hutool.core.bean.BeanUtil; |
| | | import cn.hutool.core.collection.CollUtil; |
| | | import cn.hutool.core.date.DateUtil; |
| | |
| | | private final MallMemberCouponMapper mallMemberCouponMapper; |
| | | private final MallGoodsMapper mallGoodsMapper; |
| | | |
| | | private final MallVipConfigMapper mallVipConfigMapper; |
| | | |
| | | |
| | | @Value("${spring.profiles.active}") |
| | | private String active; |
| | |
| | | mallMember.setName(registerDto.getName()); |
| | | mallMember.setAccountStatus(MallMember.ACCOUNT_STATUS_ENABLE); |
| | | mallMember.setAccountType(MallMember.ACCOUNT_TYPE_NORMAL); |
| | | mallMember.setLevel(AgentLevelEnum.ZERO_LEVEL.name()); |
| | | mallMember.setSex("男"); |
| | | mallMember.setBindPhone(registerDto.getAccount()); |
| | | |
| | |
| | | mallMemberVo.setChildCnt(CollUtil.isNotEmpty(mallMembers) ? mallMembers.size() : 0); |
| | | |
| | | MallMemberWallet wallet = mallMemberWalletMapper.selectWalletByMemberId(mallMemberVo.getId()); |
| | | |
| | | MallVipConfig mallVipConfig = mallVipConfigMapper.selectVipConfigByCode(mallMember.getLevel()); |
| | | |
| | | mallMemberVo.setVipInfo(mallVipConfig); |
| | | mallMemberVo.setBalance(wallet.getBalance()); |
| | | // mallMemberVo.setScore(wallet.getScore()); |
| | | // mallMemberVo.setPrizeScore(wallet.getPrizeScore()); |
| | | mallMemberVo.setPrizeScore(wallet.getPrizeScore()); |
| | | // mallMemberVo.setTotalCost(mallOrderInfoMapper.selectTotalAmount(id)); |
| | | return new FebsResponse().success().data(mallMemberVo); |
| | | } |
| | |
| | | Long id = LoginUserUtil.getLoginUser().getId(); |
| | | moneyFlowDto.setMemberId(id); |
| | | IPage<MoneyFlowVo> pages = mallMoneyFlowMapper.selectApiMoneyFlowInPage(page, moneyFlowDto); |
| | | |
| | | // if (moneyFlowDto.getFlowType() == 3) { |
| | | // pages.getRecords().forEach(item -> { |
| | | // item.setDescription(ScoreFlowTypeEnum.getDescByValue(item.getType())); |
| | | // }); |
| | | // } |
| | | return new FebsResponse().success().data(pages); |
| | | } |
| | | |
| | |
| | | if (apiXcxSaveInfoDto.getBirthday() != null) { |
| | | mallMember.setBirthday(apiXcxSaveInfoDto.getBirthday()); |
| | | } |
| | | |
| | | List<MallVipConfig> configs = mallVipConfigMapper.selectVipConfigList(); |
| | | if (CollUtil.isNotEmpty(configs)) { |
| | | MallVipConfig mallVipConfig = configs.get(0); |
| | | mallMember.setLevel(mallVipConfig.getCode()); |
| | | } |
| | | |
| | | mallMember.setSex(1 == apiXcxSaveInfoDto.getGender() ? "女" : "男"); |
| | | this.baseMapper.updateById(mallMember); |
| | | return new FebsResponse().success(); |