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