| | |
| | |
|
| | | import org.springframework.stereotype.Service;
|
| | |
|
| | | import com.alibaba.druid.util.StringUtils;
|
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
| | | import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
|
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
| | |
| | | memberQuickBuySaleEntity.setMemberId(member.getId());
|
| | | memberQuickBuySaleEntity.setAmountUsdt(memberQuickBuySaleDto.getAmountUsdt());
|
| | | memberQuickBuySaleEntity.setAmountCny(memberQuickBuySaleDto.getAmountCny());
|
| | | memberQuickBuySaleEntity.setUnitPrice(memberQuickBuySaleDto.getUnitPrice());
|
| | | memberQuickBuySaleEntity.setCreateTime(new Date());
|
| | | memberQuickBuySaleEntity.setOrderNo(chargeNo);
|
| | | memberQuickBuySaleEntity.setOrderType("B");
|
| | |
| | | MemberEntity member = LoginUserUtils.getAppLoginUser();
|
| | | QueryWrapper<MemberQuickBuySaleEntity> queryWrapper = new QueryWrapper<>();
|
| | | queryWrapper.eq("member_id", member.getId());
|
| | | queryWrapper.eq("order_type", type);
|
| | | if(!StringUtils.isEmpty(type)) {
|
| | | queryWrapper.eq("order_type", type);
|
| | | }
|
| | | List<MemberQuickBuySaleEntity> memberQuickBuySaleEntityList = memberQuickBuySaleDao.selectList(queryWrapper);
|
| | | List<MemberQuickBuySaleDetailVo> memberQuickBuySaleDetailVoList = MemberQuickBuySaleEntityMapper.INSTANCE.entityListToVoList(memberQuickBuySaleEntityList);
|
| | | return Result.ok(memberQuickBuySaleDetailVoList);
|
| | |
| | | public Result cancelRecharge(Long id) {
|
| | | // 获取当前登录用户
|
| | | MemberEntity member = LoginUserUtils.getAppLoginUser();
|
| | | if(member==null) {
|
| | | return Result.fail("登录用户已失效");
|
| | | }
|
| | | MemberQuickBuySaleEntity memberQuickBuySaleEntity = memberQuickBuySaleDao.selectByIdAndMemberId(id,member.getId());
|
| | | memberQuickBuySaleEntity.setOrderStatus(1);
|
| | | memberQuickBuySaleEntity.setOrderStatus(MemberQuickBuySaleEntity.CHARGE_STATUS_CANCEL_USER);
|
| | | memberQuickBuySaleDao.updateById(memberQuickBuySaleEntity);
|
| | |
|
| | | // 判断是否存在足够余额
|