afa 8 月之前
父节点
当前提交
891fa340f5

+ 3 - 2
application/api/controller/Ledger.php

@@ -187,13 +187,14 @@ class Ledger extends Api
             $this->error(__('Parameter error'));
         }
         $real   = bcsub($amount, bcmul(getConfig('chabao_giveaway'), $amount, 2), 2) ; // 手续费
+
         // 启动事务
         Db::startTrans();
         try {
 
             $user = $userModel->getByAddress($address);
-            if(empty($user)) throw new Exception(__("转账用户不存在"));    
-            if($user['id'] == $this->auth->id) throw new Exception(__("转账用户不能是自己"));  
+            if(empty($user)) throw new Exception(__("赠送用户不存在"));    
+            if($user['id'] == $this->auth->id) throw new Exception(__("赠送用户不能是自己"));  
             $chabao = $ledgerWalletModel::getWalletChaBao($this->auth->id);
             if(bccomp($amount, $chabao, 2) > 0) throw new Exception(__("余额不足请前往充值"), 15001);
         

+ 3 - 3
application/api/controller/Order.php

@@ -206,7 +206,7 @@ class Order extends Api
         $this->success('ok');
     }
 
-    //转账赠送
+    //赠送22
     public function giveaway(ProductOrder $productOrder, UserModel $userModel, LedgerWalletModel $ledgerWalletModel)
     {
         $params = $this->request->post();
@@ -220,8 +220,8 @@ class Order extends Api
             if(empty($order_info) || empty($order_info->is_gift)) throw new Exception(__("参数有误,无可用产品"));
 
             $user = $userModel->getByAddress($params['address']);
-            if(empty($user)) throw new Exception(__("转账用户不存在"));    
-            if($user['id'] == $order_info['user_id']) throw new Exception(__("转账用户不能是自己"));  
+            if(empty($user)) throw new Exception(__("赠送用户不存在"));    
+            if($user['id'] == $order_info['user_id']) throw new Exception(__("赠送用户不能是自己"));  
 
             $chabao = $ledgerWalletModel::getWalletTotalChaBao($this->auth->id);
             $fees   = $order_info->gift_fee> 0? bcmul($order_info['price'], bcdiv($order_info->gift_fee, 100, 2), 2): 0;   

+ 4 - 4
application/api/lang/en.php

@@ -17,19 +17,19 @@ return [
     '提现'                                   => 'Withdraw',
     '分享'                                   => 'Share',
     '退回'                                   => 'Return',
-    '转账'                                   => 'Transfer',
+    '赠送'                                   => 'Gift fee',
     '布道津贴'                               => 'Preaching allowance',
     '社区津贴'                               => 'Community allowance',
     '服务津贴'                               => 'Service allowance',
     '共创津贴'                               => 'Co creation allowance',
     '系统调整'                               => 'System Adjustments',
-    '转账支出'                               => 'Transfer Expenses',
-    '转账收款'                                                                    => 'Transfer Receipt',
+    '转账支出'                               => 'Translate Expenses',
+    '转账收款'                                                                    => 'Translate Receipt',
     '抢购未开始'                                                                  => 'The flash sale has not started yet',
     '当前订单转让金额为'                                                           => 'The current order transfer amount is',
     '已购买'                                                                      => 'Purchased',
     '转让中'                                                                      => 'On consignment',
-    '已转账'                                                                      => 'Transferred',
+    '已赠送'                                                                      => 'Gifted',
     '已转让'                                                                      => 'Consigned',
     '已提货'                                                                      => 'Gifted',
     '已取消'                                                                      => 'Cancelled',

+ 3 - 3
application/api/lang/en/order.php

@@ -12,10 +12,10 @@ return [
       '已转让'                                => 'Consigned',
       '已发货'                                => 'Shipped',
       '已取消'                                => 'Cancelled',
-      '转账'                                  => 'Transfer',
+      '赠送'                                  => 'Giveaway',
       '关闭'                                  => 'Closure',
-      '转账用户不存在'                         => 'The transfer user does not exist',
-      '转账用户不能是自己'                     => 'The user who sends the transfer cannot be yourself',
+      '赠送用户不存在'                         => 'The gift user does not exist',
+      '赠送用户不能是自己'                     => 'The user who sends the gift cannot be yourself',
       '暂无物流信息'                           => 'No logistics information',
       '库存不足'                               => 'Insufficient inventory',
 

+ 1 - 1
application/api/lang/zh-cn.php

@@ -118,7 +118,7 @@ return [
     '当前订单转让金额为'                                                           => '当前订单转让金额为',
     '已购买'                                                                      => '已购买',
     '转让中'                                                                      => '寄售中',
-    '已转账'                                                                      => '已转账',
+    '已赠送'                                                                      => '已赠送',
     '已转让'                                                                      => '已寄售',
     '已提货'                                                                      => '已提货',
     '已取消'                                                                      => '已取消',

+ 3 - 3
application/api/lang/zh-cn/order.php

@@ -12,10 +12,10 @@ return [
       '已转让'                => '已寄售',
       '提货'                  => '提货',
       '已取消'                => '已取消',
-      '转账'                  => '转账',
+      '赠送'                  => '赠送',
       '关闭'                  => '关闭',
-      '转账用户不存在'         => '转账用户不存在',
-      '转账用户不能是自己'     => '转账用户不能是自己',
+      '赠送用户不存在'         => '赠送用户不存在',
+      '赠送用户不能是自己'     => '赠送用户不能是自己',
       '暂无物流信息'           => '暂无物流信息',
       '库存不足'              => '库存不足',
       

+ 2 - 2
application/common/model/LedgerWalletModel.php

@@ -54,7 +54,7 @@ class LedgerWalletModel extends Model
         self::Withdraw          => '提现',
         self::Share             => '分享',
         self::Return            => '退回',
-        self::Giveaway          => '转账手续费',
+        self::Giveaway          => '赠送手续费',
         self::Direct            => '布道津贴', //直推
         self::System            => '系统调整',
         self::GiftPay           => '转账支出',
@@ -94,7 +94,7 @@ class LedgerWalletModel extends Model
     public static function getStatusList()
     {
         return [self::Popular => __('热销支付'), self::Payment  => __('转让支付'), self::Receive => __('转让收款'), self::Recharge => __('充值'), 
-        self::Withdraw  => __('提现'), self::Share => __('分享'), self::Return => __('退回'), self::Giveaway => __('转账'), self::Direct => __('布道津贴'),
+        self::Withdraw  => __('提现'), self::Share => __('分享'), self::Return => __('退回'), self::Giveaway => __('赠送'), self::Direct => __('布道津贴'),
         self::System => __('系统调整'),self::GiftPay => __('转账支出'),self::GiftReceipt => __('转账收款'), self::Community => __('社区津贴'), 
         self::Service => __('服务津贴'), self::Together => __('共创津贴'), self::Freight => __('物流运费')];
     }

+ 1 - 1
application/common/model/ProductOrder.php

@@ -131,7 +131,7 @@ class ProductOrder extends Model
         return [
             ['type_id'=>self::Popular,  'status'=> self::Paid,     'text' => __('已购买')],
             ['type_id'=>self::Transfer, 'status'=> self::Transferred,'text' => __('转让中')],
-            ['type_id'=>self::Giveaway, 'status'=> self::Closure, 'text' => __('已转账')],
+            ['type_id'=>self::Giveaway, 'status'=> self::Closure, 'text' => __('已赠送')],
             ['type_id'=>self::Transfer, 'status'=> self::Closure, 'text' => __('已转让')], 
             ['type_id'=>self::Popular, 'status' => self::Shipped, 'text' => __('已提货')],
             ['type_id'=>self::Transfer, 'status'=> self::Cancelled,'text' => __('已取消')]