|
|
|
@ -2,19 +2,23 @@ package cn.iocoder.yudao.module.shop.service.recharge;
|
|
|
|
|
|
|
|
|
|
import cn.hutool.core.date.LocalDateTimeUtil;
|
|
|
|
|
import cn.hutool.core.util.NumberUtil;
|
|
|
|
|
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
|
|
|
|
import cn.iocoder.yudao.framework.security.core.LoginUser;
|
|
|
|
|
import cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils;
|
|
|
|
|
import cn.iocoder.yudao.framework.tenant.core.context.TenantContextHolder;
|
|
|
|
|
import cn.iocoder.yudao.module.member.api.user.MemberUserApi;
|
|
|
|
|
import cn.iocoder.yudao.module.member.api.user.dto.AppUserInfoReqDTO;
|
|
|
|
|
import cn.iocoder.yudao.module.member.api.user.dto.MemberUserRespDTO;
|
|
|
|
|
import cn.iocoder.yudao.module.shop.controller.admin.recharge.vo.*;
|
|
|
|
|
import cn.iocoder.yudao.module.shop.controller.app.member.vo.PromoterMemberOrderVO;
|
|
|
|
|
import cn.iocoder.yudao.module.shop.controller.app.member.vo.ShoppingMemberOrderVO;
|
|
|
|
|
import cn.iocoder.yudao.module.shop.convert.recharge.RechargeOrderConvert;
|
|
|
|
|
import cn.iocoder.yudao.module.shop.dal.dataobject.recharge.RechargeOrderDO;
|
|
|
|
|
import cn.iocoder.yudao.module.shop.dal.dataobject.recharge.RechargeOrderInfoDO;
|
|
|
|
|
import cn.iocoder.yudao.module.shop.dal.mysql.order.StoreOrderMapper;
|
|
|
|
|
import cn.iocoder.yudao.module.shop.dal.mysql.recharge.RechargeOrderInfoMapper;
|
|
|
|
|
import cn.iocoder.yudao.module.shop.dal.mysql.recharge.RechargeOrderMapper;
|
|
|
|
|
import cn.iocoder.yudao.module.shop.request.member.MemberChangeTieRequest;
|
|
|
|
|
import cn.iocoder.yudao.module.shop.request.member.RefundRequest;
|
|
|
|
|
import cn.iocoder.yudao.module.shop.response.member.MemberHeadResponse;
|
|
|
|
|
import cn.iocoder.yudao.module.system.api.tenant.TenantApi;
|
|
|
|
|
import cn.iocoder.yudao.module.system.api.tenant.dto.TenantDTO;
|
|
|
|
@ -23,32 +27,23 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
|
|
|
|
import javax.annotation.Resource;
|
|
|
|
|
|
|
|
|
|
import org.springframework.util.Assert;
|
|
|
|
|
import org.springframework.util.CollectionUtils;
|
|
|
|
|
import org.springframework.validation.annotation.Validated;
|
|
|
|
|
|
|
|
|
|
import javax.annotation.Resource;
|
|
|
|
|
import java.math.BigDecimal;
|
|
|
|
|
import java.time.DayOfWeek;
|
|
|
|
|
import java.time.LocalDate;
|
|
|
|
|
import java.time.LocalDateTime;
|
|
|
|
|
import java.time.format.DateTimeFormatter;
|
|
|
|
|
import java.time.temporal.TemporalAdjusters;
|
|
|
|
|
import java.util.*;
|
|
|
|
|
import java.util.Collection;
|
|
|
|
|
import java.util.List;
|
|
|
|
|
import java.util.Map;
|
|
|
|
|
import java.util.Objects;
|
|
|
|
|
import java.util.stream.Collectors;
|
|
|
|
|
|
|
|
|
|
import cn.iocoder.yudao.module.shop.controller.admin.recharge.vo.*;
|
|
|
|
|
import cn.iocoder.yudao.module.shop.dal.dataobject.recharge.RechargeOrderDO;
|
|
|
|
|
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
|
|
|
|
|
|
|
|
|
import cn.iocoder.yudao.module.shop.convert.recharge.RechargeOrderConvert;
|
|
|
|
|
import cn.iocoder.yudao.module.shop.dal.mysql.recharge.RechargeOrderMapper;
|
|
|
|
|
|
|
|
|
|
import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception;
|
|
|
|
|
import static cn.iocoder.yudao.module.shop.enums.ErrorCodeConstants.*;
|
|
|
|
|
import static java.util.stream.Collectors.toMap;
|
|
|
|
|
import static cn.iocoder.yudao.module.shop.enums.ErrorCodeConstants.RECHARGE_ORDER_NOT_EXISTS;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 订单 Service 实现类
|
|
|
|
@ -145,8 +140,9 @@ public class RechargeOrderServiceImpl implements RechargeOrderService {
|
|
|
|
|
orderDOS.forEach(e -> {
|
|
|
|
|
e.setStatus(updateReqVO.getStatus());
|
|
|
|
|
});
|
|
|
|
|
rechargeOrderMapper.updateBatch(orderDOS, orderDOS.size());
|
|
|
|
|
}
|
|
|
|
|
return null;
|
|
|
|
|
return Boolean.TRUE;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|