Operation.php 747 B

1234567891011121314151617181920212223242526272829
  1. <?php
  2. namespace addons\qingdong\controller;
  3. use addons\qingdong\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. if(empty($relation_type) || empty($relation_id)){
  15. $this->error('参数不能为空');
  16. }
  17. //操作记录
  18. $logs=OperationLog::where([
  19. 'relation_type' => $relation_type,
  20. 'relation_id' => $relation_id,
  21. 'operation_type' => 1
  22. ])->field('id,content,operation_id,createtime')->with(['staff'])->select();
  23. $this->success('请求成功',$logs);
  24. }
  25. }