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