fix: 修改档次信息
parent
d84b6869f5
commit
aa88423153
|
@ -1,9 +1,11 @@
|
||||||
package cn.iocoder.yudao.module.shop.response.order;
|
package cn.iocoder.yudao.module.shop.response.order;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.EqualsAndHashCode;
|
import lombok.EqualsAndHashCode;
|
||||||
import lombok.experimental.Accessors;
|
import lombok.experimental.Accessors;
|
||||||
|
import org.springframework.format.annotation.DateTimeFormat;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
|
@ -85,6 +87,8 @@ public class StoreOrderDetailInfoResponse implements Serializable {
|
||||||
private String payType;
|
private String payType;
|
||||||
|
|
||||||
@Schema(description = "创建时间")
|
@Schema(description = "创建时间")
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
private Date createTime;
|
private Date createTime;
|
||||||
|
|
||||||
@Schema(description = "订单状态(0:待发货;1:待收货;2:已收货,待评价;3:已完成;)")
|
@Schema(description = "订单状态(0:待发货;1:待收货;2:已收货,待评价;3:已完成;)")
|
||||||
|
|
|
@ -107,21 +107,16 @@ public class RechargeGearServiceImpl implements RechargeGearService {
|
||||||
List<RechargeGearDO> rechargeGearDOS = rechargeGearMapper.selectList(Wrappers.<RechargeGearDO>lambdaQuery()
|
List<RechargeGearDO> rechargeGearDOS = rechargeGearMapper.selectList(Wrappers.<RechargeGearDO>lambdaQuery()
|
||||||
.eq(RechargeGearDO::getDeleted, 0));
|
.eq(RechargeGearDO::getDeleted, 0));
|
||||||
List<RechargeGearRespVO> rechargeGearRespVOS = RechargeGearConvert.INSTANCE.convertList(rechargeGearDOS);
|
List<RechargeGearRespVO> rechargeGearRespVOS = RechargeGearConvert.INSTANCE.convertList(rechargeGearDOS);
|
||||||
RechargeOrderDO orderDO = orderMapper.selectOne(Wrappers.<RechargeOrderDO>lambdaQuery().eq(RechargeOrderDO::getUid, loginUser.getId())
|
List<PhoneRecordDO> infoDOS = phoneRecordMapper.selectList(Wrappers.<PhoneRecordDO>lambdaQuery().eq(PhoneRecordDO::getUserId, loginUser.getId()));
|
||||||
.eq(RechargeOrderDO::getPaid,1)
|
Map<Long, List<PhoneRecordDO>> collect = infoDOS.stream().collect(Collectors.groupingBy(PhoneRecordDO::getRechargeGearId));
|
||||||
.last("LIMIT 1"));
|
rechargeGearRespVOS.forEach(vo -> {
|
||||||
if (Objects.nonNull(orderDO)) {
|
List<PhoneRecordDO> infoDOS1 = collect.get(vo.getId());
|
||||||
List<PhoneRecordDO> infoDOS = phoneRecordMapper.selectList(Wrappers.<PhoneRecordDO>lambdaQuery().eq(PhoneRecordDO::getRechargeOrderId, orderDO.getId()));
|
if (!CollectionUtils.isEmpty(infoDOS1)) {
|
||||||
Map<Long, List<PhoneRecordDO>> collect = infoDOS.stream().collect(Collectors.groupingBy(PhoneRecordDO::getRechargeGearId));
|
vo.setIsExist("1");
|
||||||
rechargeGearRespVOS.forEach(vo -> {
|
} else {
|
||||||
List<PhoneRecordDO> infoDOS1 = collect.get(vo.getId());
|
vo.setIsExist("0");
|
||||||
if (!CollectionUtils.isEmpty(infoDOS1)) {
|
}
|
||||||
vo.setIsExist("1");
|
});
|
||||||
} else {
|
|
||||||
vo.setIsExist("0");
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
return rechargeGearRespVOS;
|
return rechargeGearRespVOS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -130,21 +125,16 @@ public class RechargeGearServiceImpl implements RechargeGearService {
|
||||||
List<RechargeGearDO> rechargeGearDOS = rechargeGearMapper.selectList(Wrappers.<RechargeGearDO>lambdaQuery()
|
List<RechargeGearDO> rechargeGearDOS = rechargeGearMapper.selectList(Wrappers.<RechargeGearDO>lambdaQuery()
|
||||||
.eq(RechargeGearDO::getDeleted, 0));
|
.eq(RechargeGearDO::getDeleted, 0));
|
||||||
List<RechargeGearRespVO> rechargeGearRespVOS = RechargeGearConvert.INSTANCE.convertList(rechargeGearDOS);
|
List<RechargeGearRespVO> rechargeGearRespVOS = RechargeGearConvert.INSTANCE.convertList(rechargeGearDOS);
|
||||||
RechargeOrderDO orderDO = orderMapper.selectOne(Wrappers.<RechargeOrderDO>lambdaQuery().eq(RechargeOrderDO::getUserPhone, phone)
|
List<PhoneRecordDO> infoDOS = phoneRecordMapper.selectList(Wrappers.<PhoneRecordDO>lambdaQuery().eq(PhoneRecordDO::getPhone, phone));
|
||||||
.eq(RechargeOrderDO::getPaid,1)
|
Map<Long, List<PhoneRecordDO>> collect = infoDOS.stream().collect(Collectors.groupingBy(PhoneRecordDO::getRechargeGearId));
|
||||||
.last("LIMIT 1"));
|
rechargeGearRespVOS.forEach(vo -> {
|
||||||
if (Objects.nonNull(orderDO)) {
|
List<PhoneRecordDO> infoDOS1 = collect.get(vo.getId());
|
||||||
List<PhoneRecordDO> infoDOS = phoneRecordMapper.selectList(Wrappers.<PhoneRecordDO>lambdaQuery().eq(PhoneRecordDO::getRechargeOrderId, orderDO.getId()));
|
if (!CollectionUtils.isEmpty(infoDOS1)) {
|
||||||
Map<Long, List<PhoneRecordDO>> collect = infoDOS.stream().collect(Collectors.groupingBy(PhoneRecordDO::getRechargeGearId));
|
vo.setIsExist("1");
|
||||||
rechargeGearRespVOS.forEach(vo -> {
|
} else {
|
||||||
List<PhoneRecordDO> infoDOS1 = collect.get(vo.getId());
|
vo.setIsExist("0");
|
||||||
if (!CollectionUtils.isEmpty(infoDOS1)) {
|
}
|
||||||
vo.setIsExist("1");
|
});
|
||||||
} else {
|
|
||||||
vo.setIsExist("0");
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
return rechargeGearRespVOS;
|
return rechargeGearRespVOS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue