Daily.php 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. <?php
  2. namespace app\api\controller\v1;
  3. use app\api\controller\Base;
  4. use app\hander\HelpHander;
  5. use think\App;
  6. use think\Db;
  7. use think\exception\Handle;
  8. class Daily extends Base
  9. {
  10. public function __construct(App $app = null) {
  11. parent::__construct($app);
  12. $this->model = new \app\common\model\Daily();
  13. }
  14. public function sweepCode(){
  15. $code=input('code');
  16. $taskId = input('taskId/d',0);
  17. $dailyId = input('dailyId/d',0);
  18. $ret=$this->model->sweepCode($this->orgId,$code,$this->userId,$taskId,$dailyId);
  19. if($ret){
  20. HelpHander::success($ret);
  21. }else{
  22. HelpHander::error($this->model->getError());
  23. }
  24. }
  25. public function dailyInfo(){
  26. $id=input('dailyId');
  27. $ret=$this->model->dailyInfo($id,$this->orgId);
  28. if($ret){
  29. HelpHander::success($ret);
  30. }else{
  31. HelpHander::error($this->model->getError());
  32. }
  33. }
  34. //任务列表下所有地点
  35. public function taskAddrAll(){
  36. $taskId = input('taskId/d',0);
  37. $ret = $this->model->taskAddrAll($taskId);
  38. HelpHander::success($ret);
  39. }
  40. //我的历史记录
  41. public function myTaskRecord(){
  42. $page = input('page/d',1);
  43. $size = input('size/d',10);
  44. $ret = $this->model->myTaskRecord($page,$size,$this->userId,$this->orgId);
  45. HelpHander::success($ret);
  46. }
  47. }