|
@@ -15,11 +15,13 @@ import com.fs.common.core.domain.R;
|
|
|
import com.fs.common.utils.DateUtils;
|
|
|
import com.fs.common.utils.IPUtils;
|
|
|
import com.fs.common.utils.ServletUtils;
|
|
|
+import com.fs.common.utils.StringUtils;
|
|
|
import com.fs.company.domain.CompanyConfig;
|
|
|
import com.fs.company.domain.CompanyUser;
|
|
|
import com.fs.company.mapper.CompanyConfigMapper;
|
|
|
import com.fs.company.service.ICompanyService;
|
|
|
import com.fs.company.service.ICompanyUserService;
|
|
|
+import com.fs.core.utils.OrderCodeUtils;
|
|
|
import com.fs.course.config.RedPacketConfig;
|
|
|
import com.fs.course.service.IFsCourseRedPacketLogService;
|
|
|
import com.fs.pay.pay.config.PayConfig;
|
|
@@ -406,7 +408,11 @@ public class FsStorePaymentServiceImpl implements IFsStorePaymentService
|
|
|
System.out.println("appid:"+config.getAppId());
|
|
|
request.setOpenid(param.getOpenId());
|
|
|
|
|
|
- String code = String.valueOf(IdUtil.getSnowflake(0, 0).nextId());
|
|
|
+// String code = String.valueOf(IdUtil.getSnowflake(0, 0).nextId());
|
|
|
+ String code = OrderCodeUtils.getOrderSn();
|
|
|
+ if(StringUtils.isEmpty(code)){
|
|
|
+ return R.error("红包单号生成失败,请重试");
|
|
|
+ }
|
|
|
request.setOutBillNo("fsCourse" + code);
|
|
|
|
|
|
Integer amount = WxPayUnifiedOrderRequest.yuanToFen(param.getAmount() != null ? param.getAmount().toString() : "0.1");
|
|
@@ -450,7 +456,11 @@ public class FsStorePaymentServiceImpl implements IFsStorePaymentService
|
|
|
|
|
|
TransferBatchesRequest request = new TransferBatchesRequest();
|
|
|
request.setAppid(config.getAppId());
|
|
|
- String code = IdUtil.getSnowflake(0, 0).nextIdStr();
|
|
|
+// String code = IdUtil.getSnowflake(0, 0).nextIdStr();
|
|
|
+ String code = OrderCodeUtils.getOrderSn();
|
|
|
+ if(StringUtils.isEmpty(code)){
|
|
|
+ return R.error("红包单号生成失败,请重试");
|
|
|
+ }
|
|
|
request.setOutBatchNo("fsCourse" + code);
|
|
|
request.setBatchRemark("课堂答题奖励");
|
|
|
request.setBatchName("课堂答题奖励");
|