Commit a9dea079 authored by zhuwei's avatar zhuwei

新增罚款

parent c227c0c6
...@@ -25,6 +25,7 @@ class Amercement extends Basic ...@@ -25,6 +25,7 @@ class Amercement extends Basic
/** /**
* 新增罚款 * 新增罚款
* @return \think\Response * @return \think\Response
* http://showdoc.tonglianjituan.com/index.php?s=/1&page_id=918
*/ */
public function addAmercement(){ public function addAmercement(){
$params = $this->params; $params = $this->params;
......
<?php
/**
* Created by PhpStorm.
* User: zhuwei
* Date: 2019-09-02
* Time: 16:17:32
*/
namespace app\index\controller;
use app\index\extend\Basic;
use app\index\service\AmercementService;
class Amercement extends Basic
{
private $s_amercement;
public function __construct()
{
parent::__construct();
$this->s_amercement = new AmercementService();
}
/**
* 新增罚款
* @return \think\Response
* http://showdoc.tonglianjituan.com/index.php?s=/1&page_id=918
*/
public function addAmercement(){
$params = $this->params;
/* $params = array(
"type" => 1,
"money" => 200,
"agent_id" => 5776,
"remarks" => '罚你不需要理由',
"img" => '["20190902\\/20190902161242125.jpg","20190902\\/201909021612421258499.jpg"]',
);*/
$father_id = $this->s_amercement->addAmercement($params,$this->userId);//int(1)
if ($father_id) {
$this->s_amercement->addAmercementImg($params['img'],$father_id);
return $this->response("200", "成功");
} else {
return $this->response("101", "失败");
}
}
}
\ No newline at end of file
...@@ -1272,6 +1272,9 @@ Route::group('office_index', [ ...@@ -1272,6 +1272,9 @@ Route::group('office_index', [
'selectIndividualPerformance' => ['index/OfficePerformance/selectIndividualPerformance', ['method' => 'GET|POST']],//个人业绩排行 'selectIndividualPerformance' => ['index/OfficePerformance/selectIndividualPerformance', ['method' => 'GET|POST']],//个人业绩排行
'getEditLog' => ['index/OfficeRoom/getEditLog', ['method' => 'get']],//楼盘修改日志 'getEditLog' => ['index/OfficeRoom/getEditLog', ['method' => 'get']],//楼盘修改日志
'recoverCheckRefund' => ['index/OfficeRefund/recoverCheckRefund', ['method' => 'POST']], //已审核退款-转审核状态 'recoverCheckRefund' => ['index/OfficeRefund/recoverCheckRefund', ['method' => 'POST']], //已审核退款-转审核状态
'addAmercement' => ['index/Amercement/addAmercement', ['method' => 'GET|POST']],
]); ]);
Route::group('office_api', [ Route::group('office_api', [
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment