修复缴费记录逾期天数问题
This commit is contained in:
@@ -420,8 +420,9 @@ public class OpenEquipmentController extends BaseController {
|
|||||||
String back = ImageUtil.ImageBase64(images.get(1) + "?x-oss-process=image/resize,w_750/quality,Q_80");
|
String back = ImageUtil.ImageBase64(images.get(1) + "?x-oss-process=image/resize,w_750/quality,Q_80");
|
||||||
|
|
||||||
IdcardRespVO verify = idcardService.verify(front, back);
|
IdcardRespVO verify = idcardService.verify(front, back);
|
||||||
|
System.out.println("verify res : " + verify);
|
||||||
if(!"FP00000".equals(verify.getCode())) {
|
if(!"FP00000".equals(verify.getCode())) {
|
||||||
return fail("请上传身份证正面照片");
|
return fail("请上传身份证正面照片." + verify.getMessage() + verify.getCode());
|
||||||
}
|
}
|
||||||
if(verify.getIssueDate() == null || verify.getIssueOrg() == null || verify.getExpireDate() == null) {
|
if(verify.getIssueDate() == null || verify.getIssueOrg() == null || verify.getExpireDate() == null) {
|
||||||
return fail("请上传身份证反面照片");
|
return fail("请上传身份证反面照片");
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
package com.gxwebsoft.shop.controller;
|
package com.gxwebsoft.shop.controller;
|
||||||
|
|
||||||
|
import cn.hutool.core.date.DateUnit;
|
||||||
import cn.hutool.core.date.DateUtil;
|
import cn.hutool.core.date.DateUtil;
|
||||||
import cn.hutool.core.io.FileUtil;
|
import cn.hutool.core.io.FileUtil;
|
||||||
import cn.hutool.core.util.IdUtil;
|
import cn.hutool.core.util.IdUtil;
|
||||||
@@ -132,9 +133,13 @@ public class OrderController extends BaseController {
|
|||||||
for (Order order : list) {
|
for (Order order : list) {
|
||||||
//计算缴费总钱数
|
//计算缴费总钱数
|
||||||
List<OrderPay> orderPays = orderPayCollect.get(order.getOrderId());
|
List<OrderPay> orderPays = orderPayCollect.get(order.getOrderId());
|
||||||
|
order.setOrderPays(orderPays);
|
||||||
if (null != orderPays && !orderPays.isEmpty()) {
|
if (null != orderPays && !orderPays.isEmpty()) {
|
||||||
BigDecimal sum = orderPays.stream().map(OrderPay::getOrderPrice).reduce(BigDecimal.ZERO, BigDecimal::add);
|
BigDecimal sum = orderPays.stream().map(OrderPay::getOrderPrice).reduce(BigDecimal.ZERO, BigDecimal::add);
|
||||||
order.setTotalPayPrice(sum);
|
order.setTotalPayPrice(sum);
|
||||||
|
OrderPay lastOrderPay = orderPays.get(orderPays.size() - 1);
|
||||||
|
// 计算剩余天数
|
||||||
|
order.setRestDay((int) DateUtil.between(lastOrderPay.getExpirationTime(), new Date(), DateUnit.DAY));
|
||||||
} else {
|
} else {
|
||||||
order.setTotalPayPrice(BigDecimal.ZERO);
|
order.setTotalPayPrice(BigDecimal.ZERO);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -343,6 +343,10 @@ public class Order implements Serializable {
|
|||||||
@TableField(exist = false)
|
@TableField(exist = false)
|
||||||
private BigDecimal totalPayPrice;
|
private BigDecimal totalPayPrice;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "订单交费总数")
|
||||||
|
@TableField(exist = false)
|
||||||
|
private List<OrderPay> orderPays;
|
||||||
|
|
||||||
public Integer getRestDay() {
|
public Integer getRestDay() {
|
||||||
if(null != orderStatus){
|
if(null != orderStatus){
|
||||||
switch(orderStatus){
|
switch(orderStatus){
|
||||||
|
|||||||
Reference in New Issue
Block a user