增加 血压血糖记录 饮食记录 运动打卡记录
This commit is contained in:
@@ -0,0 +1,60 @@
|
||||
<?php
|
||||
|
||||
namespace app\adminapi\controller\tcm;
|
||||
|
||||
use app\adminapi\controller\BaseAdminController;
|
||||
use app\adminapi\logic\tcm\ExerciseRecordLogic;
|
||||
|
||||
class ExerciseRecordController extends BaseAdminController
|
||||
{
|
||||
public function add()
|
||||
{
|
||||
$params = $this->request->post();
|
||||
$result = ExerciseRecordLogic::add($params);
|
||||
if ($result) {
|
||||
return $this->success('添加成功', [], 1, 1);
|
||||
}
|
||||
return $this->fail(ExerciseRecordLogic::getError());
|
||||
}
|
||||
|
||||
public function edit()
|
||||
{
|
||||
$params = $this->request->post();
|
||||
$result = ExerciseRecordLogic::edit($params);
|
||||
if ($result) {
|
||||
return $this->success('编辑成功', [], 1, 1);
|
||||
}
|
||||
return $this->fail(ExerciseRecordLogic::getError());
|
||||
}
|
||||
|
||||
public function delete()
|
||||
{
|
||||
$params = $this->request->post();
|
||||
$result = ExerciseRecordLogic::delete($params);
|
||||
if ($result) {
|
||||
return $this->success('删除成功', [], 1, 1);
|
||||
}
|
||||
return $this->fail(ExerciseRecordLogic::getError());
|
||||
}
|
||||
|
||||
public function detail()
|
||||
{
|
||||
$params = $this->request->get();
|
||||
$result = ExerciseRecordLogic::detail($params);
|
||||
return $this->data($result);
|
||||
}
|
||||
|
||||
public function getRecordsByPatient()
|
||||
{
|
||||
$params = $this->request->get();
|
||||
$result = ExerciseRecordLogic::getRecordsByPatient($params);
|
||||
return $this->data($result);
|
||||
}
|
||||
|
||||
public function getExerciseTrend()
|
||||
{
|
||||
$params = $this->request->get();
|
||||
$result = ExerciseRecordLogic::getExerciseTrend($params);
|
||||
return $this->data($result);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user