|
@@ -53,10 +53,8 @@ import com.fs.erp.utils.ErpContextHolder;
|
|
|
import com.fs.express.FsStoreDeliversService;
|
|
|
import com.fs.express.cache.FsStoreDeliversCacheService;
|
|
|
import com.fs.huifuPay.domain.HuiFuCreateOrder;
|
|
|
-import com.fs.huifuPay.domain.HuiFuRefundResult;
|
|
|
import com.fs.huifuPay.domain.HuifuCreateOrderResult;
|
|
|
import com.fs.huifuPay.dto.*;
|
|
|
-import com.fs.huifuPay.sdk.opps.core.request.V2TradePaymentScanpayRefundRequest;
|
|
|
import com.fs.huifuPay.service.HuiFuService;
|
|
|
import com.fs.pay.pay.domain.CreateWxOrderResult;
|
|
|
import com.fs.pay.pay.domain.RefundResult;
|
|
@@ -64,7 +62,6 @@ import com.fs.pay.pay.dto.OrderQueryDTO;
|
|
|
import com.fs.pay.pay.dto.RefundDTO;
|
|
|
import com.fs.pay.pay.dto.WxJspayDTO;
|
|
|
import com.fs.pay.pay.service.PayService;
|
|
|
-import com.fs.pay.pay.util.PayUtil;
|
|
|
import com.fs.store.cache.IFsUserCacheService;
|
|
|
import com.fs.store.cache.impl.IFsStoreProductCacheServiceImpl;
|
|
|
import com.fs.store.config.StoreConfig;
|
|
@@ -82,6 +79,7 @@ import com.fs.store.service.channel.param.PayProcessContext;
|
|
|
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.service.ISysConfigService;
|
|
|
import com.fs.tzBank.TzBankService;
|
|
|
import com.fs.tzBank.utils.TzConfigUtils;
|
|
@@ -273,6 +271,12 @@ public class FsStoreOrderServiceImpl implements IFsStoreOrderService
|
|
|
@Autowired
|
|
|
private FsUserMapper fsUserMapper;
|
|
|
|
|
|
+ @Value("${snowflake.worker-id:1}")
|
|
|
+ private long workerId;
|
|
|
+
|
|
|
+ @Value("${snowflake.datacenter-id:1}")
|
|
|
+ private long datacenterId;
|
|
|
+
|
|
|
@Override
|
|
|
public void syncExpressToWx() {
|
|
|
List<FsWxExpressTask> fsWxExpressTasks = fsWxExpressTaskMapper.selectPendingData();
|
|
@@ -437,7 +441,7 @@ public class FsStoreOrderServiceImpl implements IFsStoreOrderService
|
|
|
}
|
|
|
orderService.updateFsStoreOrder(order);
|
|
|
}
|
|
|
- String payCode = IdUtil.getSnowflake(0, 0).nextIdStr();
|
|
|
+ String payCode = SnowflakeUtils.nextId();
|
|
|
|
|
|
if(order.getPayType().equals("1")||order.getPayType().equals("2")){
|
|
|
String json = configService.selectConfigByKey("store.pay");
|
|
@@ -807,7 +811,8 @@ public class FsStoreOrderServiceImpl implements IFsStoreOrderService
|
|
|
}
|
|
|
}
|
|
|
//生成分布式唯一值
|
|
|
- String orderSn = IdUtil.getSnowflake(0, 0).nextIdStr();
|
|
|
+ String orderSn = SnowflakeUtils.nextId();
|
|
|
+
|
|
|
//是否使用积分
|
|
|
Boolean isIntegral=false;
|
|
|
//组合数据
|
|
@@ -1546,7 +1551,7 @@ public class FsStoreOrderServiceImpl implements IFsStoreOrderService
|
|
|
}
|
|
|
}
|
|
|
//生成分布式唯一值
|
|
|
- String orderSn = IdUtil.getSnowflake(0, 0).nextIdStr();
|
|
|
+ String orderSn = SnowflakeUtils.nextId();
|
|
|
//组合数据
|
|
|
CompanyUser user= companyUserService.selectCompanyUserById(param.getCompanyUserId());
|
|
|
FsStoreOrder storeOrder = new FsStoreOrder();
|
|
@@ -3134,7 +3139,7 @@ public class FsStoreOrderServiceImpl implements IFsStoreOrderService
|
|
|
}
|
|
|
|
|
|
|
|
|
- String payCode = IdUtil.getSnowflake(0, 0).nextIdStr();
|
|
|
+ String payCode = SnowflakeUtils.nextId();
|
|
|
String json = configService.selectConfigByKey("store.pay");
|
|
|
FsPayConfig fsPayConfig = JSON.parseObject(json, FsPayConfig.class);
|
|
|
List<FsStorePayment> fsStorePayments = fsStorePaymentMapper.selectFsStorePaymentByOrderIdNew(order.getId());
|
|
@@ -3235,7 +3240,7 @@ public class FsStoreOrderServiceImpl implements IFsStoreOrderService
|
|
|
if(!order.getIsPayRemain().equals(0)){
|
|
|
return R.error("此订单已支付");
|
|
|
}
|
|
|
- String payCode = IdUtil.getSnowflake(0, 0).nextIdStr();
|
|
|
+ String payCode = SnowflakeUtils.nextId();
|
|
|
//易宝支付
|
|
|
String json = configService.selectConfigByKey("store.pay");
|
|
|
FsPayConfig fsPayConfig = JSON.parseObject(json, FsPayConfig.class);
|
|
@@ -3640,7 +3645,7 @@ public class FsStoreOrderServiceImpl implements IFsStoreOrderService
|
|
|
}
|
|
|
FsUser user=userService.selectFsUserById(order.getUserId());
|
|
|
if(user!=null&& StringUtils.isNotEmpty(user.getMaOpenId())){
|
|
|
- String payCode = IdUtil.getSnowflake(0, 0).nextIdStr();
|
|
|
+ String payCode = SnowflakeUtils.nextId();
|
|
|
String json = configService.selectConfigByKey("store.pay");
|
|
|
FsPayConfig fsPayConfig = JSON.parseObject(json, FsPayConfig.class);
|
|
|
|