dos hace 1 mes
padre
commit
9839d0b29b

+ 10 - 5
game-business/src/main/java/com/game/business/controller/AppUsersCashrecordController.java

@@ -176,15 +176,20 @@ public class AppUsersCashrecordController extends BaseController
                 }
 //                Double amount = (appUsersCashrecord.getMoney().doubleValue() - appUsersCashrecord.getService().doubleValue()) * 100;
                 Double amount = (appUsersCashrecord.getMoney().doubleValue()) * 100;
-                Map<String, Object> map = PayOrderUtils.getPayUrl(String.valueOf(appUsersCashrecord.getOrderno()),appChargeChannel.getChannelKey(),amount.intValue(),extra);
-                String url = "";
+                String orderno = IdUtil.fastUUID();
+                logger.info("流水{},订单{} 发起提现",cashrecord.getOrderno(),orderno);
+                Map<String, Object> map = PayOrderUtils.getPayUrl(orderno,appChargeChannel.getChannelKey(),amount.intValue(),extra);
+//                String url = "";
+                AppUsersCashrecord cashRecord = new AppUsersCashrecord();
+                cashRecord.setId(appUsersCashrecord.getId());
+                cashRecord.setTradeNo(orderno);
                 if("1".equals(String.valueOf(map.get("code")))){
-                    url = map.get("data").toString();
-                    AppUsersCashrecord cashRecord = new AppUsersCashrecord();
-                    cashRecord.setId(appUsersCashrecord.getId());
+//                    url = map.get("data").toString();
+
                     cashRecord.setCashOutStatus(3L); //转出中
                     appUsersCashrecordService.updateAppUsersCashrecord(cashRecord);
                 }else{
+                    appUsersCashrecordService.updateAppUsersCashrecord(cashRecord);
                     throw new ServiceException("发起提现失败: " + map.get("msg"));
                 }
             }

+ 1 - 1
game-business/src/main/java/com/game/business/service/impl/AppUsersCashrecordServiceImpl.java

@@ -118,7 +118,7 @@ public class AppUsersCashrecordServiceImpl extends ServiceImpl<AppUsersCashrecor
     @DataSource(DataSourceType.SLAVE)
     public AppUsersCashrecord getByOrderNo(String orderNo) {
         LambdaQueryWrapper<AppUsersCashrecord> queryWrapper = new LambdaQueryWrapper<>();
-        queryWrapper.eq(AppUsersCashrecord::getOrderno,orderNo);
+        queryWrapper.eq(AppUsersCashrecord::getTradeNo,orderNo);
         return appUsersCashrecordMapper.selectOne(queryWrapper);
     }
 }

+ 2 - 0
game-business/src/main/java/com/game/business/util/other/PayOrderUtils.java

@@ -95,7 +95,9 @@ public class PayOrderUtils {
                 JSONObject jsonObject = JSON.parseObject(result);
                 String code = jsonObject.getString("retCode");
                 if(code == null || !code.equals("0")){
+                    resultMap.put("code", -1);
                     resultMap.put("msg", "调起通道失败[通道提示:请联系客服!]");
+                    return resultMap;
                 }
 
                 String payUrl = jsonObject.getString("payUrl");

+ 6 - 2
game-ui/src/views/business/cashrecord/index.vue

@@ -85,7 +85,8 @@
       <el-table-column type="selection" width="55" align="center" />
       <el-table-column fixed label="id" align="center" prop="id" />
       <el-table-column fixed label="UID" align="center" prop="uid" />
-      <el-table-column fixed label="订单号" align="center" prop="orderno" />
+      <el-table-column fixed label="流水号" align="center" prop="orderno" />
+      <el-table-column fixed label="订单号" align="center" prop="tradeNo" />
       <el-table-column label="货币单位类型" align="center" prop="unitType">
         <template slot-scope="scope">
           <dict-tag :options="dict.type.app_user_cash_unit" :value="scope.row.unitType"/>
@@ -170,9 +171,12 @@
         <el-form-item label="用户ID" prop="uid">
           <el-input disabled v-model="form.uid" placeholder="请输入用户ID" />
         </el-form-item>
-        <el-form-item label="订单号" prop="orderno">
+        <el-form-item label="流水号" prop="orderno">
           <el-input disabled v-model="form.orderno" placeholder="请输入订单号" />
         </el-form-item>
+        <el-form-item label="订单号" prop="tradeNo">
+          <el-input disabled v-model="form.tradeNo" placeholder="请输入订单号" />
+        </el-form-item>
         <el-form-item label="提现数量" prop="votes">
           <el-input disabled v-model="form.votes" placeholder="请输入提现数量(所有类型cash_type都有值)" />
         </el-form-item>