|
|
@@ -46,10 +46,7 @@ import com.fs.his.service.*;
|
|
|
import com.fs.his.utils.ConfigUtil;
|
|
|
import com.fs.his.utils.HttpUtil;
|
|
|
import com.fs.his.utils.PhoneUtil;
|
|
|
-import com.fs.his.vo.FsPackageOrderExcelVO;
|
|
|
-import com.fs.his.vo.FsPackageOrderListUVO;
|
|
|
-import com.fs.his.vo.FsPackageOrderListVO;
|
|
|
-import com.fs.his.vo.FsPackageOrderVO;
|
|
|
+import com.fs.his.vo.*;
|
|
|
import com.fs.huifuPay.domain.HuiFuCreateOrder;
|
|
|
import com.fs.huifuPay.domain.HuifuCreateOrderResult;
|
|
|
import com.fs.huifuPay.sdk.opps.core.utils.HuiFuUtils;
|
|
|
@@ -627,14 +624,7 @@ public class FsPackageOrderServiceImpl implements IFsPackageOrderService
|
|
|
order.setCycle(fsPackage.getCycle());
|
|
|
order.setCostDiscountMoney(fsPackage.getTotalCostPrice().subtract(fsPackage.getTotalPrice()));
|
|
|
if(fsPackageOrderMapper.insertFsPackageOrder(order)>0){
|
|
|
- if (param.getIsUserInformation()!=null && param.getIsUserInformation() == 1){
|
|
|
- FsUserInformationCollection fsUserInformationCollection = fsUserInformationCollectionService.selectFsUserInformationCollectionById(param.getUserInformationId());
|
|
|
- if (fsUserInformationCollection != null) {
|
|
|
- fsUserInformationCollection.setPackageOrderCode(order.getOrderSn());
|
|
|
- fsUserInformationCollection.setPackageOrderId(order.getOrderId());
|
|
|
- fsUserInformationCollectionService.updatePackageOrderCode(fsUserInformationCollection);
|
|
|
- }
|
|
|
- }
|
|
|
+ updateFsUserInformationCollectionByPackageOrder(param, order);
|
|
|
String redisKey = String.valueOf(StrUtil.format("{}{}", FsConstants.REDIS_PACKAGE_ORDER_UNPAY, order.getOrderId()));
|
|
|
redisCache.setCacheObject(redisKey,order.getOrderId(),30, TimeUnit.MINUTES);
|
|
|
return R.ok().put("order",order);
|
|
|
@@ -644,6 +634,23 @@ public class FsPackageOrderServiceImpl implements IFsPackageOrderService
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ private void updateFsUserInformationCollectionByPackageOrder(FsPackageOrderCreateParam param, FsPackageOrder order) {
|
|
|
+ if (param.getIsUserInformation()!=null && param.getIsUserInformation() == 1){
|
|
|
+ FsUserInformationCollection fsUserInformationCollection = fsUserInformationCollectionService.selectFsUserInformationCollectionById(param.getUserInformationId());
|
|
|
+ if (fsUserInformationCollection != null) {
|
|
|
+ fsUserInformationCollection.setPackageOrderCode(order.getOrderSn());
|
|
|
+ fsUserInformationCollection.setPackageOrderId(order.getOrderId());
|
|
|
+ fsUserInformationCollectionService.updatePackageOrderCode(fsUserInformationCollection);
|
|
|
+ //更新订单表
|
|
|
+ FsPackageOrder temp = new FsPackageOrder();
|
|
|
+ temp.setOrderId(order.getOrderId());
|
|
|
+ //添加前缀 区分信息采集订单
|
|
|
+ temp.setOrderSn("info"+ order.getOrderSn());
|
|
|
+ fsPackageOrderMapper.updateFsPackageOrder(temp);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
@Override
|
|
|
@Transactional
|
|
|
public R payOrder(FsPackageOrderPayParam param) {
|
|
|
@@ -1870,4 +1877,14 @@ public class FsPackageOrderServiceImpl implements IFsPackageOrderService
|
|
|
}
|
|
|
return R.ok();
|
|
|
}
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 根据storeOrderId 查询信息采集信息
|
|
|
+ * @param orderId
|
|
|
+ * @return FsUserInformationCollection
|
|
|
+ */
|
|
|
+ @Override
|
|
|
+ public FsUserInfoCollectionAndStoreOrderVo selectInformationCollectionByStoreOrderId(Long orderId) {
|
|
|
+ return fsPackageOrderMapper.selectInformationCollectionByStoreOrderId(orderId);
|
|
|
+ }
|
|
|
}
|