Browse Source

经纪人

linwu 1 year ago
parent
commit
95c66e2637

+ 7 - 0
app/common/model/Broker.php

@@ -37,6 +37,7 @@ class Broker extends Model
         'region'       => 'string',
         'latitude'     => 'float',
         'longitude'    => 'float',
+        'type'         => 'tinyint',
     ];
 
     // 设置字段自动转换类型
@@ -56,6 +57,12 @@ class Broker extends Model
         return $status[$data['powerreport']];
     }
 
+    public function getTypeTextAttr($value, $data)
+    {
+        $status = [1 => '经纪人', 2 => '红色合伙人'];
+        return $status[$data['type']];
+    }
+
 
     // 关联User
     public function muser()

+ 1 - 1
app/mainapp/controller/Resident.php

@@ -54,7 +54,7 @@ class Resident extends BaseController
         }
         if ($status == 3) {
             $incomeService = new IncomeService();
-            $incomeService->add($report['brokerid'], $report['comjobs']['retmoney'], '悬赏金', '悬赏招聘推荐入职成功后返佣金额');
+            $incomeService->add($report['brokerid'], $report['comjobs']['retmoney'], '悬赏招聘', '悬赏招聘推荐入职成功后奖励');
         }
 
         //更改状态

+ 1 - 1
app/mainapp/controller/Wcomjobs.php

@@ -78,7 +78,7 @@ class Wcomjobs extends BaseController
         //悬赏金
         if ($status == 3) {
             $incomeService = new IncomeService();
-            $incomeService->add($report['brokerid'], $report['comjobs']['retmoney'], '悬赏金', '悬赏招聘推荐入职成功后返佣金额');
+            $incomeService->add($report['brokerid'], $report['comjobs']['retmoney'], '悬赏招聘', '悬赏招聘推荐入职成功后奖励');
         }
 
         page_result(0, "", [

+ 1 - 1
app/worker/controller/Comjobsreport.php

@@ -376,7 +376,7 @@ class Comjobsreport extends BaseController
             //悬赏金
             if ($report['status'] != 3 && $data['status'] == 3) {
                 $incomeService = new IncomeService();
-                $incomeService->add($report['brokerid'], $report['comjobs']['retmoney'], '悬赏金', '悬赏招聘推荐入职成功后返佣金额');
+                $incomeService->add($report['brokerid'], $report['comjobs']['retmoney'], '悬赏招聘', '悬赏招聘推荐入职成功后奖励');
             }
             $report->save($data);
         }