diff --git a/ghy-admin/src/main/java/com/ghy/web/controller/customer/CustomerBankController.java b/ghy-admin/src/main/java/com/ghy/web/controller/customer/CustomerBankController.java index 3958dc82..d0daea00 100644 --- a/ghy-admin/src/main/java/com/ghy/web/controller/customer/CustomerBankController.java +++ b/ghy-admin/src/main/java/com/ghy/web/controller/customer/CustomerBankController.java @@ -8,6 +8,7 @@ import com.ghy.common.adapay.model.Merchant; import com.ghy.common.core.domain.AjaxResult; import com.ghy.common.utils.AdapayUtils; import com.ghy.common.utils.ExceptionUtil; +import com.ghy.common.utils.spring.SpringUtils; import com.ghy.customer.domain.CustomerBank; import com.ghy.customer.request.BindBankCardRequest; import com.ghy.customer.service.CustomerBankService; @@ -28,7 +29,7 @@ import java.util.Set; * @author HH 2022/5/20 */ @Slf4j -@Controller +@RestController @RequestMapping("/customer/bankcard") public class CustomerBankController { @@ -47,6 +48,9 @@ public class CustomerBankController { for (Merchant merchant : merchants) { String memberId = AdapayUtils.getCustomerMemberId(request.getCustomerId(), merchant.getDeptId()); + if(adapayService == null){ + adapayService = SpringUtils.getBean(AdapayService.class); + } // 需要先检查一次memberId是否已存在,如果已存在则只需要绑卡即可 Map member = adapayService.queryMember(merchant.getDeptId(), memberId); if (AdapayStatusEnum.succeeded.code.equals(member.get("status")) && memberId.equals(member.get("member_id"))) { diff --git a/ghy-quartz/src/main/java/com/ghy/quartz/service/impl/OrderServiceImpl.java b/ghy-quartz/src/main/java/com/ghy/quartz/service/impl/OrderServiceImpl.java index 4e48982e..c27663a7 100644 --- a/ghy-quartz/src/main/java/com/ghy/quartz/service/impl/OrderServiceImpl.java +++ b/ghy-quartz/src/main/java/com/ghy/quartz/service/impl/OrderServiceImpl.java @@ -139,8 +139,8 @@ public class OrderServiceImpl implements OrderService { // 查询出"待确认"状态的子订单 List orderDetails = orderDetailService.selectByStatus(Collections.singletonList(OrderStatus.FINISH_CHECK.code())); long now = System.currentTimeMillis(); -// long day14ago = now - (60 * 60 * 1000L); - long day14ago = now - 10000L; + long day14ago = now - (60 * 60 * 1000L); +// long day14ago = now - 10000L; for (OrderDetail orderDetail : orderDetails) { // 筛选符合自动确认的订单 if (day14ago > orderDetail.getUpdateTime().getTime()) {