| @@ -5,6 +5,8 @@ import java.util.HashMap; | |||
| import java.util.List; | |||
| import java.util.Map; | |||
| import com.iformall.domain.po.*; | |||
| import com.iformall.mapper.*; | |||
| import org.slf4j.Logger; | |||
| import org.slf4j.LoggerFactory; | |||
| import org.springframework.aop.framework.AopContext; | |||
| @@ -16,24 +18,12 @@ import org.springframework.transaction.annotation.Transactional; | |||
| import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; | |||
| import com.iformall.common.ErrorCode; | |||
| import com.iformall.domain.po.WxAppinfo; | |||
| import com.iformall.domain.po.WxCUser; | |||
| import com.iformall.domain.po.WxOrder; | |||
| import com.iformall.domain.po.WxPayAccount; | |||
| import com.iformall.domain.po.WxPayOrder; | |||
| import com.iformall.enums.EnumAppType; | |||
| import com.iformall.enums.EnumOrderStatus; | |||
| import com.iformall.enums.EnumOrderType; | |||
| import com.iformall.enums.EnumPayStatus; | |||
| import com.iformall.enums.EnumRefundStatus; | |||
| import com.iformall.exception.MallinkException; | |||
| import com.iformall.mapper.WxAppinfoMapper; | |||
| import com.iformall.mapper.WxCUserMapper; | |||
| import com.iformall.mapper.WxCouponMapper; | |||
| import com.iformall.mapper.WxOrderGroupMapper; | |||
| import com.iformall.mapper.WxOrderMapper; | |||
| import com.iformall.mapper.WxPayAccountMapper; | |||
| import com.iformall.mapper.WxPayOrderMapper; | |||
| import com.iformall.service.WxAppinfoService; | |||
| import com.iformall.service.WxOrderService; | |||
| import com.iformall.service.WxPayOrderService; | |||
| @@ -68,9 +58,12 @@ public class OrderExpiringSchedule { | |||
| @Autowired | |||
| WxPayOrderMapper wxPayOrderMapper; | |||
| @Autowired | |||
| WxCUserMapper wxCUserMapper; | |||
| @Autowired | |||
| WxCUserBasicInfoMapper wxCUserBasicInfoMapper; | |||
| @Autowired | |||
| WxAppinfoService wxAppinfoService; | |||
| @@ -204,12 +197,20 @@ public class OrderExpiringSchedule { | |||
| if (null == wxpayOrder) { | |||
| return false; | |||
| } | |||
| WxCUser user = wxCUserMapper.selectById(wxpayOrder.getCUserId()); | |||
| WxCUserBasicInfo user = wxCUserBasicInfoMapper.selectById(wxpayOrder.getCUserId()); | |||
| //找不到用户,问题单,不能删 | |||
| if (null == user) { | |||
| return true; | |||
| } | |||
| WxAppinfo appInfo = wxAppinfoService.getByAppId(user.getAppId()); | |||
| WxCUser cuUser = new WxCUser(); | |||
| cuUser.updateTenantInfo(order); | |||
| cuUser.setUserId(user.getId()); | |||
| WxCUser cUser = wxCUserMapper.selectOne(new QueryWrapper(cuUser)); | |||
| //找不到用户,问题单,不能删 | |||
| if (null == cUser) { | |||
| return true; | |||
| } | |||
| WxAppinfo appInfo = wxAppinfoService.getByAppId(cUser.getAppId()); | |||
| //找不到appInfo,问题单,不能删 | |||
| if(appInfo == null) { | |||
| return true; | |||