|
|
@@ -81,6 +81,9 @@ import com.fs.store.strategy.ShippingOrder;
|
|
|
import com.fs.store.strategy.ShippingTemplateManager;
|
|
|
import com.fs.store.vo.*;
|
|
|
import com.fs.system.config.SnowflakeUtils;
|
|
|
+import com.fs.system.domain.WxMiniProgramConfig;
|
|
|
+import com.fs.system.mapper.FsCoursePlaySourceConfigMapper;
|
|
|
+import com.fs.system.mapper.WxMiniProgramConfigMapper;
|
|
|
import com.fs.system.service.ISysConfigService;
|
|
|
import com.fs.tzBank.TzBankService;
|
|
|
import com.fs.tzBank.utils.TzConfigUtils;
|
|
|
@@ -126,6 +129,13 @@ public class FsStoreOrderServiceImpl implements IFsStoreOrderService
|
|
|
@Autowired
|
|
|
private CompanyMoneyLogsMapper moneyLogsMapper;
|
|
|
@Autowired
|
|
|
+ private FsUserWxMapper fsUserWxMapper;
|
|
|
+ @Autowired
|
|
|
+ private FsCoursePlaySourceConfigMapper fsCoursePlaySourceConfigMapper;
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ private WxMiniProgramConfigMapper wxMiniProgramConfigMapper;
|
|
|
+ @Autowired
|
|
|
private IFsStoreOrderStatusService orderStatusService;
|
|
|
@Autowired
|
|
|
private FsStoreCartMapper cartMapper;
|
|
|
@@ -419,7 +429,35 @@ public class FsStoreOrderServiceImpl implements IFsStoreOrderService
|
|
|
}
|
|
|
|
|
|
FsUser user=userService.selectFsUserById(order.getUserId());
|
|
|
- if(user!=null&& StringUtils.isNotEmpty(user.getMaOpenId())){
|
|
|
+// String json = configService.selectConfigByKey("store.pay");
|
|
|
+// FsPayConfig fsPayConfig = JSON.parseObject(json, FsPayConfig.class);
|
|
|
+ WxMiniProgramConfig wxMiniProgramConfig = new WxMiniProgramConfig();
|
|
|
+ wxMiniProgramConfig.setAppid(param.getAppId());
|
|
|
+ List<WxMiniProgramConfig> wxMiniProgramConfigs = wxMiniProgramConfigMapper.selectWxMiniProgramConfigList(wxMiniProgramConfig);
|
|
|
+ WxMiniProgramConfig wConfig = wxMiniProgramConfigs.get(0);
|
|
|
+ String openId = null;
|
|
|
+ String appId = param.getAppId();
|
|
|
+ if (StringUtils.isNotBlank(appId)) {
|
|
|
+ //查询fs_user_wx的openId
|
|
|
+ FsUserWx fsUserWx = fsUserWxMapper.selectListByUserIdAndAppId(user.getUserId(),appId);
|
|
|
+ logger.info("用户微信信息==============={}",fsUserWx);
|
|
|
+ if (fsUserWx != null) {
|
|
|
+ openId = fsUserWx.getOpenId();
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ appId = fsCoursePlaySourceConfigMapper.selectFsCoursePlaySourceConfigByAppId(param.getAppId()).getAppid();
|
|
|
+ openId = Objects.isNull(user) ? "" : user.getMaOpenId();
|
|
|
+ if (StringUtils.isBlank(openId)){
|
|
|
+ FsUserWx fsUserWx = fsUserWxMapper.selectListByUserIdAndAppId(user.getUserId(),appId);
|
|
|
+ logger.info("用户微信信息==============={}",fsUserWx);
|
|
|
+ if (Objects.nonNull(fsUserWx)){
|
|
|
+ openId = fsUserWx.getOpenId();
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ if(user!=null&& StringUtils.isNotEmpty(openId)){
|
|
|
//已改价处理
|
|
|
if(order.getIsEditMoney()!=null&&order.getIsEditMoney()==1){
|
|
|
//改过价不做处理
|
|
|
@@ -450,15 +488,14 @@ public class FsStoreOrderServiceImpl implements IFsStoreOrderService
|
|
|
String payCode = SnowflakeUtils.nextId();
|
|
|
|
|
|
if(order.getPayType().equals("1")||order.getPayType().equals("2")){
|
|
|
- String json = configService.selectConfigByKey("store.pay");
|
|
|
- FsPayConfig fsPayConfig = JSON.parseObject(json, FsPayConfig.class);
|
|
|
+
|
|
|
List<FsStorePayment> fsStorePayments = fsStorePaymentMapper.selectFsStorePaymentByOrderIdNew(order.getId());
|
|
|
FsStorePayment storePayment;
|
|
|
if(CollectionUtils.isEmpty(fsStorePayments)){
|
|
|
storePayment=new FsStorePayment();
|
|
|
storePayment.setCompanyId(order.getCompanyId());
|
|
|
storePayment.setCompanyUserId(order.getCompanyUserId());
|
|
|
- storePayment.setPayMode(fsPayConfig.getType());
|
|
|
+ storePayment.setPayMode("wx");
|
|
|
storePayment.setStatus(0);
|
|
|
storePayment.setPayCode(payCode);
|
|
|
storePayment.setPayMoney(order.getPayMoney());
|
|
|
@@ -466,14 +503,15 @@ public class FsStoreOrderServiceImpl implements IFsStoreOrderService
|
|
|
storePayment.setPayTypeCode("weixin");
|
|
|
storePayment.setBusinessType(2);
|
|
|
storePayment.setRemark("商城订单支付");
|
|
|
- storePayment.setOpenId(user.getRealName());
|
|
|
+ storePayment.setOpenId(openId);
|
|
|
storePayment.setUserId(user.getUserId());
|
|
|
+ storePayment.setAppId(appId);
|
|
|
storePayment.setBusinessOrderId(order.getId().toString());
|
|
|
storePayment.setOrderId(order.getId());
|
|
|
fsStorePaymentMapper.insertFsStorePayment(storePayment);
|
|
|
} else {
|
|
|
storePayment = fsStorePayments.get(0);
|
|
|
- storePayment.setPayMode(fsPayConfig.getType());
|
|
|
+ storePayment.setPayMode("wx");
|
|
|
storePayment.setStatus(0);
|
|
|
storePayment.setPayMoney(order.getPayMoney());
|
|
|
storePayment.setCreateTime(new Date());
|
|
|
@@ -481,8 +519,9 @@ public class FsStoreOrderServiceImpl implements IFsStoreOrderService
|
|
|
storePayment.setBusinessType(2);
|
|
|
storePayment.setRemark("商城订单支付");
|
|
|
storePayment.setPayCode(payCode);
|
|
|
- storePayment.setOpenId(user.getRealName());
|
|
|
+ storePayment.setOpenId(openId);
|
|
|
storePayment.setUserId(user.getUserId());
|
|
|
+ storePayment.setAppId(appId);
|
|
|
storePayment.setBusinessOrderId(order.getId().toString());
|
|
|
storePayment.setOrderId(order.getId());
|
|
|
fsStorePaymentMapper.updateFsStorePayment(storePayment);
|
|
|
@@ -493,11 +532,12 @@ public class FsStoreOrderServiceImpl implements IFsStoreOrderService
|
|
|
processContext.setPayType(param.getPayType());
|
|
|
processContext.setPaymentId(storePayment.getPaymentId());
|
|
|
processContext.setPayCode(storePayment.getPayCode());
|
|
|
- processContext.setFsPayConfig(fsPayConfig);
|
|
|
+ processContext.setWxMiniProgramConfig(wConfig);
|
|
|
+ processContext.setStorePayment(storePayment);
|
|
|
processContext.setUserId(order.getUserId());
|
|
|
processContext.setGoodsInfo("商城订单支付");
|
|
|
processContext.setOrderPrefix("store-");
|
|
|
- PaymentHandler payment = PaymentHandlerHolder.findBest(fsPayConfig.getType());
|
|
|
+ PaymentHandler payment = PaymentHandlerHolder.findBest("wx");
|
|
|
if(ObjectUtil.isNull(payment)){
|
|
|
throw new CustomException("支付方式不存在");
|
|
|
}
|
|
|
@@ -1200,6 +1240,7 @@ public class FsStoreOrderServiceImpl implements IFsStoreOrderService
|
|
|
List<FsStorePayment> fsStorePayments = fsStorePaymentService.selectFsStorePaymentByOrderIdNew(order.getId());
|
|
|
if(CollectionUtils.isNotEmpty(fsStorePayments)){
|
|
|
FsStorePayment fsStorePayment = fsStorePayments.get(0);
|
|
|
+ fsWxExpressTask.setAppid(fsStorePayment.getAppId());
|
|
|
fsWxExpressTask.setPayCode(fsStorePayment.getPayCode());
|
|
|
}
|
|
|
fsWxExpressTaskMapper.insert(fsWxExpressTask);
|
|
|
@@ -2453,6 +2494,12 @@ public class FsStoreOrderServiceImpl implements IFsStoreOrderService
|
|
|
payProcessContext.setPayCode(payment.getPayCode());
|
|
|
payProcessContext.setUserId(order.getUserId());
|
|
|
payProcessContext.setOrderPrefix("refund-");
|
|
|
+ WxMiniProgramConfig wxMiniProgramConfig = new WxMiniProgramConfig();
|
|
|
+ wxMiniProgramConfig.setAppid(payment.getAppId());
|
|
|
+ List<WxMiniProgramConfig> wxMiniProgramConfigs = wxMiniProgramConfigMapper.selectWxMiniProgramConfigList(wxMiniProgramConfig);
|
|
|
+ WxMiniProgramConfig wConfig = wxMiniProgramConfigs.get(0);
|
|
|
+ payProcessContext.setWxMiniProgramConfig(wConfig);
|
|
|
+ payProcessContext.setStorePayment(payment);
|
|
|
best.refundOrder(payProcessContext);
|
|
|
}
|
|
|
}
|
|
|
@@ -3153,7 +3200,25 @@ public class FsStoreOrderServiceImpl implements IFsStoreOrderService
|
|
|
@Transactional(rollbackFor = Throwable.class,propagation = Propagation.REQUIRED)
|
|
|
public R otherPayment(FsStoreOrderOtherPayParam param) {
|
|
|
|
|
|
- final WxMaService wxService = WxMaConfiguration.getMaService(properties.getConfigs().get(0).getAppid());
|
|
|
+ String courseMa_appId;
|
|
|
+
|
|
|
+ System.out.println("appid"+param.getCode());
|
|
|
+ logger.info("appid"+param.getCode());
|
|
|
+ if(org.apache.commons.lang3.StringUtils.isNotEmpty(param.getAppId())){
|
|
|
+ try {
|
|
|
+ courseMa_appId = fsCoursePlaySourceConfigMapper.selectFsCoursePlaySourceConfigByAppId(param.getAppId()).getAppid();
|
|
|
+ } catch (Exception e) {
|
|
|
+ courseMa_appId = param.getAppId();
|
|
|
+ }
|
|
|
+ }else{
|
|
|
+ courseMa_appId = properties.getConfigs().get(0).getAppid();
|
|
|
+ }
|
|
|
+ WxMiniProgramConfig wxMiniProgramConfig = new WxMiniProgramConfig();
|
|
|
+ wxMiniProgramConfig.setAppid(param.getAppId());
|
|
|
+ List<WxMiniProgramConfig> wxMiniProgramConfigs = wxMiniProgramConfigMapper.selectWxMiniProgramConfigList(wxMiniProgramConfig);
|
|
|
+ WxMiniProgramConfig wConfig = wxMiniProgramConfigs.get(0);
|
|
|
+
|
|
|
+ final WxMaService wxService = WxMaConfiguration.getMaService(courseMa_appId);
|
|
|
try {
|
|
|
String ip = IpUtil.getRequestIp();
|
|
|
WxMaJscode2SessionResult session = wxService.getUserService().getSessionInfo(param.getCode());
|
|
|
@@ -3189,8 +3254,8 @@ public class FsStoreOrderServiceImpl implements IFsStoreOrderService
|
|
|
|
|
|
|
|
|
String payCode = SnowflakeUtils.nextId();
|
|
|
- String json = configService.selectConfigByKey("store.pay");
|
|
|
- FsPayConfig fsPayConfig = JSON.parseObject(json, FsPayConfig.class);
|
|
|
+ /* String json = configService.selectConfigByKey("store.pay");
|
|
|
+ FsPayConfig fsPayConfig = JSON.parseObject(json, FsPayConfig.class);*/
|
|
|
List<FsStorePayment> fsStorePayments = fsStorePaymentMapper.selectFsStorePaymentByOrderIdNew(order.getId());
|
|
|
|
|
|
FsStorePayment storePayment;
|
|
|
@@ -3199,7 +3264,7 @@ public class FsStoreOrderServiceImpl implements IFsStoreOrderService
|
|
|
storePayment.setCompanyId(order.getCompanyId());
|
|
|
storePayment.setCompanyUserId(order.getCompanyUserId());
|
|
|
storePayment.setStatus(0);
|
|
|
- storePayment.setPayMode(fsPayConfig.getType());
|
|
|
+ storePayment.setPayMode("wx");
|
|
|
storePayment.setPayCode(payCode);
|
|
|
storePayment.setPayMoney(order.getPayMoney());
|
|
|
storePayment.setCreateTime(new Date());
|
|
|
@@ -3207,6 +3272,7 @@ public class FsStoreOrderServiceImpl implements IFsStoreOrderService
|
|
|
storePayment.setBusinessType(2);
|
|
|
storePayment.setRemark("商城订单支付");
|
|
|
storePayment.setOpenId(session.getOpenid());
|
|
|
+ storePayment.setAppId(courseMa_appId);
|
|
|
storePayment.setUserId(user.getUserId());
|
|
|
storePayment.setBusinessOrderId(order.getId().toString());
|
|
|
storePayment.setOrderId(order.getId());
|
|
|
@@ -3218,6 +3284,7 @@ public class FsStoreOrderServiceImpl implements IFsStoreOrderService
|
|
|
storePayment.setCreateTime(new Date());
|
|
|
storePayment.setPayTypeCode("weixin");
|
|
|
storePayment.setBusinessType(2);
|
|
|
+ storePayment.setAppId(courseMa_appId);
|
|
|
storePayment.setRemark("商城订单支付");
|
|
|
storePayment.setOpenId(session.getOpenid());
|
|
|
storePayment.setUserId(user.getUserId());
|
|
|
@@ -3226,7 +3293,7 @@ public class FsStoreOrderServiceImpl implements IFsStoreOrderService
|
|
|
fsStorePaymentMapper.updateFsStorePayment(storePayment);
|
|
|
}
|
|
|
|
|
|
- PaymentHandler payment = PaymentHandlerHolder.findBest(fsPayConfig.getType());
|
|
|
+ PaymentHandler payment = PaymentHandlerHolder.findBest("wx");
|
|
|
if(ObjectUtil.isNull(payment)){
|
|
|
throw new CustomException("支付方式不存在");
|
|
|
}
|
|
|
@@ -3235,7 +3302,8 @@ public class FsStoreOrderServiceImpl implements IFsStoreOrderService
|
|
|
processContext.setPayType(null);
|
|
|
processContext.setPaymentId(storePayment.getPaymentId());
|
|
|
processContext.setPayCode(storePayment.getPayCode());
|
|
|
- processContext.setFsPayConfig(fsPayConfig);
|
|
|
+ processContext.setWxMiniProgramConfig(wConfig);
|
|
|
+ processContext.setStorePayment(storePayment);
|
|
|
processContext.setUserId(order.getUserId());
|
|
|
processContext.setGoodsInfo("商城订单支付");
|
|
|
processContext.setOrderPrefix("store-");
|
|
|
@@ -3255,7 +3323,22 @@ public class FsStoreOrderServiceImpl implements IFsStoreOrderService
|
|
|
@Override
|
|
|
@Transactional(rollbackFor = Throwable.class, propagation = Propagation.REQUIRED)
|
|
|
public R otherPaymentRemain(FsStoreOrderOtherPayParam param) {
|
|
|
- final WxMaService wxService = WxMaConfiguration.getMaService(properties.getConfigs().get(0).getAppid());
|
|
|
+ String courseMa_appId;
|
|
|
+
|
|
|
+ System.out.println("appid"+param.getCode());
|
|
|
+ logger.info("appid"+param.getCode());
|
|
|
+ if(org.apache.commons.lang3.StringUtils.isNotEmpty(param.getAppId())){
|
|
|
+ try {
|
|
|
+ courseMa_appId = fsCoursePlaySourceConfigMapper.selectFsCoursePlaySourceConfigByAppId(param.getAppId()).getAppid();
|
|
|
+ } catch (Exception e) {
|
|
|
+ courseMa_appId = param.getAppId();
|
|
|
+ }
|
|
|
+ }else{
|
|
|
+ courseMa_appId = properties.getConfigs().get(0).getAppid();
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ final WxMaService wxService = WxMaConfiguration.getMaService(courseMa_appId);
|
|
|
try {
|
|
|
String ip = IpUtil.getRequestIp();
|
|
|
WxMaJscode2SessionResult session = wxService.getUserService().getSessionInfo(param.getCode());
|
|
|
@@ -3295,6 +3378,30 @@ public class FsStoreOrderServiceImpl implements IFsStoreOrderService
|
|
|
//易宝支付
|
|
|
String json = configService.selectConfigByKey("store.pay");
|
|
|
FsPayConfig fsPayConfig = JSON.parseObject(json, FsPayConfig.class);
|
|
|
+
|
|
|
+ String openId = null;
|
|
|
+ String appId = param.getAppId();
|
|
|
+ if (StringUtils.isNotBlank(appId)) {
|
|
|
+ //查询fs_user_wx的openId
|
|
|
+ FsUserWx fsUserWx = fsUserWxMapper.selectListByUserIdAndAppId(user.getUserId(),appId);
|
|
|
+ logger.info("用户微信信息==============={}",fsUserWx);
|
|
|
+ if (fsUserWx != null) {
|
|
|
+ openId = fsUserWx.getOpenId();
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ appId = fsPayConfig.getAppId();
|
|
|
+ openId = Objects.isNull(user) ? "" : user.getMaOpenId();
|
|
|
+ if (StringUtils.isBlank(openId)){
|
|
|
+ FsUserWx fsUserWx = fsUserWxMapper.selectListByUserIdAndAppId(user.getUserId(),appId);
|
|
|
+ logger.info("用户微信信息==============={}",fsUserWx);
|
|
|
+ if (Objects.nonNull(fsUserWx)){
|
|
|
+ openId = fsUserWx.getOpenId();
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
FsStorePayment storePayment=new FsStorePayment();
|
|
|
storePayment.setCompanyId(order.getCompanyId());
|
|
|
storePayment.setCompanyUserId(order.getCompanyUserId());
|
|
|
@@ -3305,7 +3412,7 @@ public class FsStoreOrderServiceImpl implements IFsStoreOrderService
|
|
|
storePayment.setPayTypeCode("weixin");
|
|
|
storePayment.setBusinessType(2);
|
|
|
storePayment.setRemark("商城订单尾款支付");
|
|
|
- storePayment.setOpenId(user.getRealName());
|
|
|
+ storePayment.setOpenId(openId);
|
|
|
storePayment.setUserId(user.getUserId());
|
|
|
storePayment.setBusinessOrderId(order.getId().toString());
|
|
|
storePayment.setOrderId(order.getId());
|
|
|
@@ -3315,7 +3422,8 @@ public class FsStoreOrderServiceImpl implements IFsStoreOrderService
|
|
|
if (fsPayConfig.getType().equals("hf")){
|
|
|
HuiFuCreateOrder o = new HuiFuCreateOrder();
|
|
|
o.setTradeType("T_MINIAPP");
|
|
|
- o.setOpenid(user.getMaOpenId());
|
|
|
+ o.setOpenid(openId);
|
|
|
+ o.setAppId(appId);
|
|
|
o.setReqSeqId("store_remain-"+storePayment.getPayCode());
|
|
|
o.setTransAmt(storePayment.getPayMoney().toString());
|
|
|
o.setGoodsDesc("支付订单尾款");
|
|
|
@@ -3324,6 +3432,7 @@ public class FsStoreOrderServiceImpl implements IFsStoreOrderService
|
|
|
FsStorePayment mt=new FsStorePayment();
|
|
|
mt.setPaymentId(storePayment.getPaymentId());
|
|
|
mt.setTradeNo(result.getHf_seq_id());
|
|
|
+ mt.setAppId(appId);
|
|
|
fsStorePaymentMapper.updateFsStorePayment(mt);
|
|
|
redisCache.setCacheObject("isPaying:"+order.getId(),order.getId().toString(),1, TimeUnit.MINUTES);
|
|
|
return R.ok().put("result",result.getPay_info());
|
|
|
@@ -3338,7 +3447,7 @@ public class FsStoreOrderServiceImpl implements IFsStoreOrderService
|
|
|
p.setBody("支付订单尾款");
|
|
|
p.setIsMinipg("1");
|
|
|
p.setReturnUrl(fsPayConfig.getYbNotifyUrl());
|
|
|
- p.setOpenId(user.getMaOpenId());
|
|
|
+ p.setOpenId(openId);
|
|
|
p.setAttach("");
|
|
|
p.setStoreid("0");
|
|
|
CreateWxOrderResult wxOrder = ybPayService.createWxOrder(p);
|
|
|
@@ -3695,10 +3804,32 @@ public class FsStoreOrderServiceImpl implements IFsStoreOrderService
|
|
|
return R.error("此订单已支付");
|
|
|
}
|
|
|
FsUser user=userService.selectFsUserById(order.getUserId());
|
|
|
- if(user!=null&& StringUtils.isNotEmpty(user.getMaOpenId())){
|
|
|
+ String json = configService.selectConfigByKey("store.pay");
|
|
|
+ FsPayConfig fsPayConfig = JSON.parseObject(json, FsPayConfig.class);
|
|
|
+ String openId = null;
|
|
|
+ String appId = param.getAppId();
|
|
|
+ if (StringUtils.isNotBlank(appId)) {
|
|
|
+ //查询fs_user_wx的openId
|
|
|
+ FsUserWx fsUserWx = fsUserWxMapper.selectListByUserIdAndAppId(user.getUserId(),appId);
|
|
|
+ logger.info("用户微信信息==============={}",fsUserWx);
|
|
|
+ if (fsUserWx != null) {
|
|
|
+ openId = fsUserWx.getOpenId();
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ appId = fsPayConfig.getAppId();
|
|
|
+ openId = Objects.isNull(user) ? "" : user.getMaOpenId();
|
|
|
+ if (StringUtils.isBlank(openId)){
|
|
|
+ FsUserWx fsUserWx = fsUserWxMapper.selectListByUserIdAndAppId(user.getUserId(),appId);
|
|
|
+ logger.info("用户微信信息==============={}",fsUserWx);
|
|
|
+ if (Objects.nonNull(fsUserWx)){
|
|
|
+ openId = fsUserWx.getOpenId();
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ if(user!=null&& StringUtils.isNotEmpty(openId)){
|
|
|
String payCode = SnowflakeUtils.nextId();
|
|
|
- String json = configService.selectConfigByKey("store.pay");
|
|
|
- FsPayConfig fsPayConfig = JSON.parseObject(json, FsPayConfig.class);
|
|
|
+
|
|
|
|
|
|
FsStorePayment storePayment=new FsStorePayment();
|
|
|
storePayment.setCompanyId(order.getCompanyId());
|
|
|
@@ -3711,7 +3842,7 @@ public class FsStoreOrderServiceImpl implements IFsStoreOrderService
|
|
|
storePayment.setPayTypeCode("weixin");
|
|
|
storePayment.setBusinessType(2);
|
|
|
storePayment.setRemark("商城订单尾款支付");
|
|
|
- storePayment.setOpenId(user.getRealName());
|
|
|
+ storePayment.setOpenId(openId);
|
|
|
storePayment.setUserId(user.getUserId());
|
|
|
storePayment.setBusinessOrderId(order.getId().toString());
|
|
|
storePayment.setOrderId(order.getId());
|
|
|
@@ -3720,7 +3851,8 @@ public class FsStoreOrderServiceImpl implements IFsStoreOrderService
|
|
|
if (fsPayConfig.getType().equals("hf")){
|
|
|
HuiFuCreateOrder o = new HuiFuCreateOrder();
|
|
|
o.setTradeType("T_MINIAPP");
|
|
|
- o.setOpenid(user.getMaOpenId());
|
|
|
+ o.setOpenid(openId);
|
|
|
+ o.setAppId(appId);
|
|
|
o.setReqSeqId("store_remain-"+storePayment.getPayCode());
|
|
|
o.setTransAmt(storePayment.getPayMoney().toString());
|
|
|
o.setGoodsDesc("商城订单尾款支付");
|
|
|
@@ -3730,6 +3862,7 @@ public class FsStoreOrderServiceImpl implements IFsStoreOrderService
|
|
|
FsStorePayment mt=new FsStorePayment();
|
|
|
mt.setPaymentId(storePayment.getPaymentId());
|
|
|
mt.setTradeNo(result.getHf_seq_id());
|
|
|
+ mt.setAppId(appId);
|
|
|
fsStorePaymentMapper.updateFsStorePayment(mt);
|
|
|
redisCache.setCacheObject("isPaying:"+order.getId(),order.getId().toString(),1, TimeUnit.MINUTES);
|
|
|
return R.ok().put("result",result.getPay_info());
|
|
|
@@ -3745,7 +3878,7 @@ public class FsStoreOrderServiceImpl implements IFsStoreOrderService
|
|
|
p.setBody("商城订单尾款支付");
|
|
|
p.setIsMinipg("1");
|
|
|
p.setReturnUrl(fsPayConfig.getYbNotifyUrl());
|
|
|
- p.setOpenId(user.getMaOpenId());
|
|
|
+ p.setOpenId(openId);
|
|
|
p.setAttach("");
|
|
|
p.setStoreid("0");
|
|
|
CreateWxOrderResult wxOrder = ybPayService.createWxOrder(p);
|