|
@@ -105,7 +105,8 @@ class Finance extends AuthController
|
|
|
return $this->success($services->getBrokerageList($where));
|
|
|
}
|
|
|
|
|
|
- public function setAwardIntegral(){
|
|
|
+ public function setAwardIntegral()
|
|
|
+ {
|
|
|
// return $this->success('ok');
|
|
|
$rate1 = sys_config('action_integral_rate', 3);
|
|
|
$rate2 = sys_config('static_integral_rate', 3);
|
|
@@ -125,4 +126,29 @@ class Finance extends AuthController
|
|
|
return $this->success('ok');
|
|
|
}
|
|
|
|
|
|
+
|
|
|
+ public function addLackEdit()
|
|
|
+ {
|
|
|
+ $service = app()->make(UserAwardIntegralServices::class);
|
|
|
+ return $this->success($service->editLack());
|
|
|
+ }
|
|
|
+
|
|
|
+ public function addLake()
|
|
|
+ {
|
|
|
+ $num = $this->request->post('num', 0);
|
|
|
+ $pm = $this->request->post('pm', 1);
|
|
|
+ $mark = $this->request->post('mark', '');
|
|
|
+ if ($num <= 0) $this->fail('请输入正确的数量');
|
|
|
+ if (!$pm == 0 && !$pm == 1) $this->fail('请选择操作类型');
|
|
|
+ if (!$mark) $this->fail('请输入操作原因');
|
|
|
+ $service = app()->make(UserAwardIntegralServices::class);
|
|
|
+ $res = $service->addLake(($pm ? $num : -$num), 0, $mark);
|
|
|
+ if ($res) {
|
|
|
+ app()->make(IntegralJob::class)->autoExtract($service->getPrice());
|
|
|
+ return $this->success('操作完成');
|
|
|
+ } else {
|
|
|
+ $this->fail('操作失败');
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
}
|