fix: 充值相关
parent
65a76c4efd
commit
c3a72e4245
|
@ -1262,11 +1262,11 @@ public class StoreOrderServiceImpl extends ServiceImpl<StoreOrderMapper, StoreOr
|
|||
RechargeGearDO rechargeGearDO = rechargeGearService.getRechargeGear(rechargeGearId.toString());
|
||||
PhoneRecordDO phoneRecordDO = new PhoneRecordDO();
|
||||
PhoneRecordAdd phoneRecordAdd = new PhoneRecordAdd();
|
||||
phoneRecordDO.setUserId(Long.valueOf(orderDO.getUid()));
|
||||
phoneRecordDO.setRechargeOrderId(Long.valueOf(orderDO.getId()));
|
||||
phoneRecordDO.setUserId(orderDO.getUid());
|
||||
phoneRecordDO.setRechargeOrderId(orderDO.getId());
|
||||
phoneRecordDO.setPhone(orderDO.getUserPhone());
|
||||
phoneRecordDO.setRefundFeeAmount(replace(info.getPrice()));
|
||||
phoneRecordDO.setRechargeGearId(Long.valueOf(info.getRechargeGearId()));
|
||||
phoneRecordDO.setRechargeGearId(info.getRechargeGearId());
|
||||
LocalDateTime localDateTime = LocalDateTime.now();
|
||||
LocalDateTime newLocalDateTime = LocalDateTimeUtil.offset(localDateTime, 12, ChronoUnit.MONTHS);
|
||||
phoneRecordDO.setRefundFeeEndDate(newLocalDateTime);
|
||||
|
|
|
@ -4,6 +4,7 @@ import cn.hutool.core.util.StrUtil;
|
|||
import cn.hutool.http.HttpRequest;
|
||||
import cn.iocoder.yudao.framework.common.exception.ServiceException;
|
||||
import cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils;
|
||||
import cn.iocoder.yudao.framework.tenant.core.aop.TenantIgnore;
|
||||
import cn.iocoder.yudao.module.member.api.user.MemberUserApi;
|
||||
import cn.iocoder.yudao.module.member.api.user.dto.MemberUserRespDTO;
|
||||
import cn.iocoder.yudao.module.shop.controller.app.recharge.vo.PhoneRecordAdd;
|
||||
|
@ -18,10 +19,12 @@ import org.springframework.stereotype.Service;
|
|||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import org.springframework.util.CollectionUtils;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import cn.iocoder.yudao.module.shop.controller.admin.recharge.vo.*;
|
||||
import cn.iocoder.yudao.module.shop.dal.dataobject.recharge.PhoneRecordDO;
|
||||
|
@ -81,16 +84,16 @@ public class PhoneRecordServiceImpl implements PhoneRecordService {
|
|||
}
|
||||
|
||||
@Override
|
||||
@TenantIgnore
|
||||
@Transactional
|
||||
public Boolean deletePhoneGearByOrderId(Long orderId) {
|
||||
log.info("-------------------------orderId{}",orderId);
|
||||
List<PhoneRecordDO> recordDOS = phoneRecordMapper.selectList(Wrappers.<PhoneRecordDO>lambdaQuery().eq(PhoneRecordDO::getRechargeOrderId, orderId));
|
||||
log.info("-------------------------recordDOS{},{}",recordDOS,recordDOS.size());
|
||||
if (!CollectionUtils.isEmpty(recordDOS)) {
|
||||
recordDOS.forEach(e->{
|
||||
e.setDeleted(Boolean.TRUE);
|
||||
int i = phoneRecordMapper.updateById(e);
|
||||
log.info("-------------------------i{}---------------------",i);
|
||||
});
|
||||
Set<Long> ids = recordDOS.stream().map(PhoneRecordDO::getId).collect(Collectors.toSet());
|
||||
log.info("-------------------------ids{}",ids);
|
||||
phoneRecordMapper.deleteBatchIds(ids);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue