zangbin 3 vuotta sitten
vanhempi
commit
e967f21dd9

+ 4 - 0
doc/dada.sql

@@ -1,3 +1,7 @@
 ALTER TABLE lb_dada_dsp ADD COLUMN open_qr_code tinyint(2) DEFAULT '0' COMMENT '打印二维码:1->打印,0->不打印';
 
 ALTER TABLE lb_merchant ADD COLUMN open_qr_code tinyint(2) DEFAULT '0' COMMENT '打印二维码:1->打印,0->不打印';
+
+ALTER TABLE lb_dada_dsp_withdrawal ADD COLUMN before_amount decimal(11,2) NOT NULL DEFAULT '0.00' COMMENT '提现前金额';
+
+ALTER TABLE lb_dada_dsp_withdrawal ADD COLUMN after_amount decimal(11,2) NOT NULL DEFAULT '0.00' COMMENT '提现后金额';

+ 9 - 0
lb-module/src/main/java/com/ydd/module/domain/DadaDspWithdrawal.java

@@ -83,4 +83,13 @@ public class DadaDspWithdrawal implements Serializable {
      */
     private String zfbName;
 
+    /**
+     * 提现前金额
+     */
+    private BigDecimal beforeAmount;
+
+    /**
+     * 提现后金额
+     */
+    private BigDecimal afterAmount;
 }

+ 5 - 0
lb-module/src/main/java/com/ydd/module/dto/SystemOrderDto.java

@@ -423,6 +423,11 @@ public class SystemOrderDto implements Serializable {
      */
     private Integer platformType;
 
+    /**
+     * 外卖平台名称
+     */
+    private String platformName;
+
     List<DeliveryStatus> deliveryStatusList;
 
     /**

+ 4 - 0
lb-module/src/main/java/com/ydd/module/service/impl/DadaDspWithdrawalServiceImpl.java

@@ -106,7 +106,11 @@ public class DadaDspWithdrawalServiceImpl extends ServiceImpl<DadaDspWithdrawalM
         if (result1 != 1) {
             throw new CustomWebException("发起提现失败!");
         }
+        withdrawal.setBeforeAmount(dadaDsp.getAmount());
         dadaDsp.setAmount(dadaDsp.getAmount().subtract(withdrawal.getAmount()));
+        withdrawal.setAfterAmount(dadaDsp.getAmount());
+
+        baseMapper.updateById(withdrawal);
         boolean result2 = iDadaDspService.updateById(dadaDsp);
         if (!result2) {
             throw new CustomWebException("发起提现失败!");

+ 20 - 0
lb-module/src/main/java/com/ydd/module/service/impl/OrderServiceImpl.java

@@ -1407,6 +1407,26 @@ public class OrderServiceImpl extends ServiceImpl<OrderMapper, Order> implements
                     o.setOriginalOrderSn(originalOrderSn);
                 }
             }
+            // 手动发单外卖平台名称
+            if ((o.getWaimaiOrderId() == null) && (o.getPlatformType() != null) && (o.getPlatformType() != 0)) {
+              Integer platformType = o.getPlatformType();
+              if (platformType == 1) {
+                 // 美团
+                  o.setPlatformName("美团");
+              } else if (platformType == 2) {
+                  // 饿了么
+                  o.setPlatformName("饿了么");
+              } else if (platformType == 3) {
+                  // 饿百零售
+                  o.setPlatformName("饿百零售");
+              } else if (platformType == 5) {
+                  // 美团闪购
+                  o.setPlatformName("美团闪购");
+              } else if (platformType == 6) {
+                  // 京东到家
+                  o.setPlatformName("京东到家");
+              }
+            }
         }
         stopWatch4.stop();
         log.info("列表循环耗时: {} ms", stopWatch4.getTotalTimeMillis());

+ 1 - 1
lb-module/src/main/resources/mapper/module/DadaDspWithdrawalMapper.xml

@@ -50,7 +50,7 @@
         ddw.zfb_name,
         ddw.remark,
         dd.name,
-        dd.amount as totalAccountAmount
+        dd.before_amount
         from lb_dada_dsp_withdrawal ddw left join lb_dada_dsp dd on ddw.dada_dsp_id = dd.id
         where 1 = 1
         <if test='params.status != null and params.status != ""'>

+ 1 - 1
web-ui/src/views/module/dadaWithdrawal/index.vue

@@ -31,7 +31,7 @@
 
     <el-table v-loading="loading" :data="dadaDspWithdrawalList" stripe border highlight-current-row style="width: 100%">
       <el-table-column label="提现配送商" align="center" prop="name"/>
-      <el-table-column label="账户总金额" align="center" prop="totalAccountAmount" />
+      <el-table-column label="账户总金额" align="center" prop="beforeAmount" />
       <el-table-column label="提现金额" align="center" prop="amount"/>
       <el-table-column label="提现账户" align="center" prop="account"/>
       <el-table-column label="支付宝姓名" align="center" prop="zfbName">

+ 19 - 13
web-ui/src/views/module/order/index.vue

@@ -332,9 +332,9 @@
         <template slot-scope="scope">
           <div style="margin-bottom: 10px; padding: 3px">
             <el-row>
-              <el-col :span="11">
+              <el-col :span="10">
                 <el-tag type="success">
-                  <span
+                  <!-- <span
                     v-if="
                       (scope.row.waimaiOrderId != null &&
                       scope.row.waimaiOrderId != '') ||
@@ -343,10 +343,18 @@
                     "
                   >
                     {{ scope.row.dspWaimaiName }}
+                  </span> -->
+                  <span
+                    v-if="
+                      scope.row.waimaiOrderId != null &&
+                      scope.row.waimaiOrderId != ''
+                    "
+                  >
+                    {{ scope.row.dspWaimaiName }}
                   </span>
                   <span v-else> 猎豹 </span>
                 </el-tag>
-                <el-tag type="warning" style="margin-left: 20px">
+                <el-tag type="warning" style="margin-left: 10px">
                   <span
                     v-if="
                       scope.row.merchantId != null && scope.row.merchantId != ''
@@ -356,17 +364,15 @@
                   </span>
                   <span v-else> 个人 </span>
                 </el-tag>
-                <el-tag type="info" style="margin-left: 20px">
+                <el-tag type="info" style="margin-left: 10px">
                   <span v-if="scope.row.takeType == 0"> 普通 </span>
                   <span v-if="scope.row.takeType == 1 || scope.row.takeType == 2"> 预约 </span>
                 </el-tag>
-                <span  style="margin-left: 20px">订单号:
-                  <div class="serial">
-                    <span class="serial_text" v-if="scope.row.platformType != null && scope.row.platformType == 0">猎豹 </span>
-                    <span class="serial_text" v-if="scope.row.platformType != null && scope.row.platformType == 1">美团 </span>
-                    <span class="serial_text" v-if="scope.row.platformType != null && scope.row.platformType == 2">饿了么 </span>
-                    <span class="serial_text" v-if="scope.row.platformType != null && scope.row.platformType == 3">饿百零售 </span>
-                    <span class="serial_text" v-if="scope.row.platformType != null && scope.row.platformType == 5">美团闪购 </span>
+                <span  style="margin-left: 10px">订单号:
+                  <div class="serial" :style="scope.row.platformName != undefined ? 'width:125px' : 'width:45px'">
+                    <span class="serial_text" v-if="scope.row.platformName != undefined">
+                      {{scope.row.platformName}}
+                    </span>
                     <span class="serial_text" v-if="scope.row.daySeq != null">{{scope.row.daySeq}} &nbsp; #</span>
                   </div>
                   <el-button style="user-select: unset" type="text" @click="deliveryInfo(scope.row.orderSn)" v-if="type != 2">
@@ -405,7 +411,7 @@
                   </div>
                 </div>
               </el-col>
-              <el-col :span="7">
+              <el-col :span="8">
                 <div style="margin-bottom: 10px; text-align: left" v-if="
                       scope.row.waimaiOrderId != null &&
                       scope.row.waimaiOrderId != ''
@@ -1938,7 +1944,7 @@ i.receiptLogo::before {
   background-color: RGB(50,122,244);
   border-radius: 50px 50px;
   height: 29px;
-  width: 115px;
+  // width: 115px;
   line-height: 29px;
   text-align: center;
   display: inline-block;