Browse Source

用户钱包方法

lizhen_gitee 2 weeks ago
parent
commit
21c3727e82

+ 19 - 6
application/common/business/ShopWalletBusiness.php

@@ -14,12 +14,25 @@ class ShopWalletBusiness extends BusinessResult
 {
     // 日志变动类型
     const log_type = [
-        1  => '系统调节',//money + -
-        40 => '酒店预定',//money + -
-        50 => '餐厅预定',//money + -
-        60 => '老年大学活动报名',//money + -
-        70 => '线下消费',//money + -
-        80 => '旅游预定',//money + -
+        //balance 商家的经营成本
+        1  => '系统调节',//balance + -
+
+        31 => '商城订单支付', //balance +  //商城的不给维护
+        32 => '商城订单退款', //balance -  //商城的不给维护
+
+        40 => '酒店预定',//balance + -
+        50 => '餐厅预定',//balance + -
+        60 => '老年大学活动报名',//balance + -
+        70 => '线下消费',//balance + -            //线下的用不到,分账了
+        80 => '旅游预定',//balance + -
+
+        //money 40期的收益
+        400 => '40期', //money +
+
+
+        //让利积分
+        201 => '用户来消费', //points +
+        202 => '周期结束释放', //points -
     ];
 
     /**

+ 7 - 2
application/common/model/Wallet.php

@@ -27,6 +27,9 @@ class Wallet extends BaseModel
         50 => '餐厅预定',//money + -
         60 => '老年大学活动报名',//money + -
         70 => '线下消费',//money + -
+        80 => '旅游预定',//money + -
+
+        400 => '40期', //money +
 
         //善豆
         101 => '签到', //bean +
@@ -36,12 +39,13 @@ class Wallet extends BaseModel
 
         //让利积分
         201 => '用户消费', //points +
-        211 => '周期结束释放', //points -
+        202 => '周期结束释放', //points -
     ];
     // 操作钱包余额类型
     const money_type = [
         'money' => '余额',
         'bean' => '善豆',
+        'points' => '让利积分',
     ];
 
     // Bill订单所属日志 type id
@@ -50,6 +54,7 @@ class Wallet extends BaseModel
         'hotel_canteen_order'    => 50,
         'university_event_apply' => 60,
         'offline_shop_order'     => 70,
+        'travel_order'           => 80,
     ];
 
     protected $message = '';
@@ -127,7 +132,7 @@ class Wallet extends BaseModel
 
         //获取小数点
         $point = 0;
-        if(in_array($accountType,['money','bean'])){
+        if(in_array($accountType,['money','bean','points'])){
             $point = 2;
         }
         bcscale($point);