|
|
@@ -46,6 +46,7 @@ import com.zhongshu.card.server.core.domain.org.UserAccount;
|
|
|
import com.zhongshu.card.server.core.domain.payment.ExpenseFlow;
|
|
|
import com.zhongshu.card.server.core.domain.school.CardInfo;
|
|
|
import com.zhongshu.card.server.core.httpRequest.ApiRequestService;
|
|
|
+import com.zhongshu.card.server.core.service.base.CommonService;
|
|
|
import com.zhongshu.card.server.core.service.base.SuperService;
|
|
|
import com.zhongshu.card.server.core.service.devices.DeviceInfoServiceImpl;
|
|
|
import com.zhongshu.card.server.core.service.devices.permiss.DevicePermissVerifyService;
|
|
|
@@ -64,10 +65,7 @@ import org.springframework.stereotype.Service;
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
|
|
|
import java.math.BigDecimal;
|
|
|
-import java.util.ArrayList;
|
|
|
-import java.util.Collections;
|
|
|
-import java.util.List;
|
|
|
-import java.util.Map;
|
|
|
+import java.util.*;
|
|
|
import java.util.stream.Collectors;
|
|
|
|
|
|
/**
|
|
|
@@ -119,6 +117,8 @@ public class ExpenseFlowServiceImpl extends SuperService implements ExpenseFlowS
|
|
|
|
|
|
@Autowired
|
|
|
private OrganizationManagerServiceImpl organizationManagerService;
|
|
|
+ @Autowired
|
|
|
+ private CommonService commonService;
|
|
|
|
|
|
/**
|
|
|
* 创建流水
|
|
|
@@ -885,7 +885,14 @@ public class ExpenseFlowServiceImpl extends SuperService implements ExpenseFlowS
|
|
|
OrderState orderState = entity.getOrderState();
|
|
|
// 订单参数验证成功,并且 未支付
|
|
|
if (entity.getVerifyParamIsSuccess() != null && entity.getVerifyParamIsSuccess() && orderState == OrderState.WAIT_PAYMENT) {
|
|
|
+ if (entity.getExpirationTime() <= System.currentTimeMillis()) {
|
|
|
+ isCanPay = Boolean.TRUE;
|
|
|
+ } else {
|
|
|
+ payMsg = "支付超时";
|
|
|
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ payMsg = entity.getVerifyParamMsg();
|
|
|
}
|
|
|
}
|
|
|
model.setIsCanPay(isCanPay);
|
|
|
@@ -899,7 +906,11 @@ public class ExpenseFlowServiceImpl extends SuperService implements ExpenseFlowS
|
|
|
* @param entity
|
|
|
*/
|
|
|
public void markOrderTimeOut(ExpenseFlow entity) {
|
|
|
-
|
|
|
+ if (entity != null) {
|
|
|
+ Map<String, Object> standardData = new HashMap<>();
|
|
|
+ standardData.put("orderState", OrderState.CLOSED);
|
|
|
+ commonService.updateData(entity.getId(), standardData, ExpenseFlow.class.getSimpleName());
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
/**
|