|
|
|
@@ -19,6 +19,7 @@ import com.iformall.pay.*; |
|
|
|
import com.iformall.service.*; |
|
|
|
import com.iformall.service.helper.WxPayOrderServiceHelper; |
|
|
|
import com.iformall.service.pay.PayServiceFactory; |
|
|
|
import com.iformall.service.pay.entity.CreateCUser; |
|
|
|
import com.iformall.service.pay.entity.PayAdapterResult; |
|
|
|
import com.iformall.service.pay.entity.PayExtraParam; |
|
|
|
import com.iformall.service.pay.entity.PayQueryAdapterResult; |
|
|
|
@@ -1096,13 +1097,20 @@ public class WxPayOrderServiceImpl implements WxPayOrderService { |
|
|
|
@Transactional(propagation = Propagation.REQUIRED, readOnly = false, rollbackFor = {Exception.class}) |
|
|
|
public void handleMicroOrderPaySuccess(Object result,String transcationId,EnumPayWay payWay, WxPayOrder record ,WxMerchantBUser user,WxAppinfo appInfo,PayExtraParam params) { |
|
|
|
//B端操作,需要生成cUser |
|
|
|
Long cUserId; |
|
|
|
CreateCUser cUser = null; |
|
|
|
try { |
|
|
|
cUserId = payServiceFactory.getCPassivePayService(payWay.getCode()).createCUserAfterPay(result, appInfo); |
|
|
|
cUser = payServiceFactory.getCPassivePayService(payWay.getCode()).createCUserAfterPay(result, appInfo); |
|
|
|
} catch (Exception e1) { |
|
|
|
logger.error("创建C端用户失败: " ,e1); |
|
|
|
throw new MallinkException(ErrorCode.DB_FAIL.getCode(), "创建C端用户失败: " + e1.getMessage()); |
|
|
|
} |
|
|
|
//如果用户是会员,则用会员ID, 如果没有,则用渠道用户ID(如wxCuser,支付宝user) |
|
|
|
Long cUserId = null; |
|
|
|
if (cUser.isBasicInfo()) { |
|
|
|
cUserId = cUser.getBasicUserId(); |
|
|
|
}else { |
|
|
|
cUserId = cUser.getCUserId(); |
|
|
|
} |
|
|
|
WxPayOrderServiceImpl proxy = (WxPayOrderServiceImpl) AopContext.currentProxy(); |
|
|
|
WxOrder order = proxy.handler(record,transcationId,cUserId); |
|
|
|
if (null == order) { |
|
|
|
|