RenewLogic.php
1.4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
<?php
/**
* @remark :
* @name :RenewLogic.php
* @author :lyh
* @method :post
* @time :2023/8/11 17:29
*/
namespace App\Http\Logic\Aside\Project;
use App\Http\Logic\Aside\BaseLogic;
use App\Models\Project\Project;
use App\Models\Project\ProjectRenew;
class RenewLogic extends BaseLogic
{
public function __construct()
{
parent::__construct();
$this->param = $this->requestAll;
$this->model = new ProjectRenew();
}
/**
* @remark :续费单记录列表
* @name :renewLog
* @author :lyh
* @method :post
* @time :2023/8/11 17:30
*/
public function renewListsLog($map,$page,$row,$order,$field = ['*']){
$lists = $this->model->lists($map,$page,$row,$order,$field);
if(!empty($lists['list'])){
foreach ($lists['list'] as $k => $v){
$v['plan'] = Project::planMap()[$v['plan']];
$lists['list'][$k] = $v;
}
}
return $this->success($lists);
}
/**
* @remark :根据主键获取续费单详情
* @name :renewRead
* @author :lyh
* @method :post
* @time :2023/8/14 9:12
*/
public function renewRead(){
$info = $this->model->read(['id'=>$this->param['id']]);
if($info === false){
$this->fail('当前数据不存在或者被删除');
}
return $this->success($info);
}
}