|
@@ -2,6 +2,7 @@ package com.citu.module.pay.controller.admin.order;
|
|
|
|
|
|
import cn.hutool.core.collection.CollectionUtil;
|
|
|
import com.citu.framework.apilog.core.annotation.ApiAccessLog;
|
|
|
+import com.citu.framework.common.enums.UserTypeEnum;
|
|
|
import com.citu.framework.common.pojo.CommonResult;
|
|
|
import com.citu.framework.common.pojo.PageResult;
|
|
|
import com.citu.framework.excel.core.util.ExcelUtils;
|
|
@@ -11,6 +12,7 @@ import com.citu.module.pay.convert.order.PayOrderConvert;
|
|
|
import com.citu.module.pay.dal.dataobject.app.PayAppDO;
|
|
|
import com.citu.module.pay.dal.dataobject.order.PayOrderDO;
|
|
|
import com.citu.module.pay.dal.dataobject.order.PayOrderExtensionDO;
|
|
|
+import com.citu.module.pay.framework.pay.core.CurrencyPayClient;
|
|
|
import com.citu.module.pay.framework.pay.core.WalletPayClient;
|
|
|
import com.citu.module.pay.service.app.PayAppService;
|
|
|
import com.citu.module.pay.service.order.PayOrderService;
|
|
@@ -35,6 +37,7 @@ import static com.citu.framework.apilog.core.enums.OperateTypeEnum.EXPORT;
|
|
|
import static com.citu.framework.common.pojo.CommonResult.success;
|
|
|
import static com.citu.framework.common.util.collection.CollectionUtils.convertList;
|
|
|
import static com.citu.framework.common.util.servlet.ServletUtils.getClientIP;
|
|
|
+import static com.citu.framework.security.core.util.SecurityFrameworkUtils.getLoginUserDataId;
|
|
|
import static com.citu.framework.web.core.util.WebFrameworkUtils.getLoginUserId;
|
|
|
import static com.citu.framework.web.core.util.WebFrameworkUtils.getLoginUserType;
|
|
|
|
|
@@ -84,6 +87,13 @@ public class PayOrderController {
|
|
|
channelExtras.put(WalletPayClient.USER_TYPE_KEY, String.valueOf(getLoginUserType()));
|
|
|
reqVO.setChannelExtras(channelExtras);
|
|
|
}
|
|
|
+ // 自定义货币支付 支付
|
|
|
+ if (Objects.equals(reqVO.getChannelCode(), PayChannelEnum.CURRENCY.getCode())) {
|
|
|
+ Map<String, String> channelExtras = reqVO.getChannelExtras() == null ?
|
|
|
+ Maps.newHashMapWithExpectedSize(1) : reqVO.getChannelExtras();
|
|
|
+ channelExtras.put(CurrencyPayClient.USER_TYPE_KEY, String.valueOf(UserTypeEnum.MEMBER.getValue()));
|
|
|
+ reqVO.setChannelExtras(channelExtras);
|
|
|
+ }
|
|
|
|
|
|
// 2. 提交支付
|
|
|
PayOrderSubmitRespVO respVO = orderService.submitOrder(reqVO, getClientIP());
|
|
@@ -109,7 +119,7 @@ public class PayOrderController {
|
|
|
@PreAuthorize("@ss.hasPermission('pay:order:export')")
|
|
|
@ApiAccessLog(operateType = EXPORT)
|
|
|
public void exportOrderExcel(@Valid PayOrderExportReqVO exportReqVO,
|
|
|
- HttpServletResponse response) throws IOException {
|
|
|
+ HttpServletResponse response) throws IOException {
|
|
|
List<PayOrderDO> list = orderService.getOrderList(exportReqVO);
|
|
|
if (CollectionUtil.isEmpty(list)) {
|
|
|
ExcelUtils.write(response, "支付订单.xls", "数据",
|