Operation.php 685 B

12345678910111213141516171819202122232425262728
  1. <?php
  2. namespace addons\qingdongams\controller;
  3. use addons\qingdongams\model\OperationLog;
  4. /**
  5. * 操作记录
  6. */
  7. class Operation extends StaffApi {
  8. protected $noNeedLogin = [];
  9. protected $noNeedRight = [];
  10. //
  11. public function getList() {
  12. $relation_type = input('relation_type', '');//1客户 2联系人 3合同
  13. $relation_id = input('relation_id', '');
  14. //操作记录
  15. $logs=OperationLog::where([
  16. 'relation_type' => $relation_type,
  17. 'relation_id' => $relation_id,
  18. 'operation_type' => 1
  19. ])->with(['staff'])->field('id,content,createtime,operation_id')->order('id desc')->select();
  20. $this->success('请求成功',$logs);
  21. }
  22. }