|
|
|
<?php
|
|
|
|
/**
|
|
|
|
* @remark :
|
|
|
|
* @name :ManageEntryPositionLogic.php
|
|
|
|
* @author :lyh
|
|
|
|
* @method :post
|
|
|
|
* @time :2025/11/3 17:14
|
|
|
|
*/
|
|
|
|
|
|
|
|
namespace App\Http\Logic\Aside\Manage;
|
|
|
|
|
|
|
|
use App\Http\Logic\Aside\BaseLogic;
|
|
|
|
use App\Models\Manage\EntryPosition;
|
|
|
|
|
|
|
|
class ManageEntryPositionLogic extends BaseLogic
|
|
|
|
{
|
|
|
|
public function __construct()
|
|
|
|
{
|
|
|
|
parent::__construct();
|
|
|
|
$this->param = $this->requestAll;
|
|
|
|
$this->model = new EntryPosition();
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @remark :列表数据
|
|
|
|
* @name :listEntryPosition
|
|
|
|
* @author :lyh
|
|
|
|
* @method :post
|
|
|
|
* @time :2025/11/3 17:27
|
|
|
|
*/
|
|
|
|
public function listEntryPosition($map = [],$page = 1, $row = 10,$order = 'id')
|
|
|
|
{
|
|
|
|
$data = $this->model->lists($map,$page,$row,$order);
|
|
|
|
return $this->success($data);
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @remark :保存数据
|
|
|
|
* @name :saveEntryPosition
|
|
|
|
* @author :lyh
|
|
|
|
* @method :post
|
|
|
|
* @time :2025/11/3 17:28
|
|
|
|
*/
|
|
|
|
public function saveEntryPosition()
|
|
|
|
{
|
|
|
|
try {
|
|
|
|
if(isset($this->param['id']) && !empty($this->param['id'])){
|
|
|
|
$id = $this->param['id'];
|
|
|
|
$this->model->edit($this->param,['id'=>$id]);
|
|
|
|
}else{
|
|
|
|
$id = $this->model->addReturnId($this->param);
|
|
|
|
}
|
|
|
|
}catch (\Exception $e){
|
|
|
|
$this->fail('保存失败,请联系管理员'.$e->getMessage());
|
|
|
|
}
|
|
|
|
return $this->success(['id'=>$id]);
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @remark :删除数据
|
|
|
|
* @name :delEntryPosition
|
|
|
|
* @author :lyh
|
|
|
|
* @method :post
|
|
|
|
* @time :2025/11/3 17:28
|
|
|
|
*/
|
|
|
|
public function delEntryPosition()
|
|
|
|
{
|
|
|
|
$this->model->del(['id'=>['in',$this->param['id']]]);
|
|
|
|
return $this->success();
|
|
|
|
}
|
|
|
|
} |
...
|
...
|
|