Party.php 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. <?php
  2. namespace app\index\controller;
  3. use app\index\logic\companylogic;
  4. use app\index\logic\partylogic;
  5. use think\Controller;
  6. class Party extends Base
  7. {
  8. /**
  9. * 根据时间获取活动信息
  10. * 20220119
  11. * wj
  12. */
  13. public function getinfobytime()
  14. {
  15. $param = request()->param();
  16. $l_p = new partylogic();
  17. $result = $l_p->getlistbywhere($param);
  18. if (1 != $result['status']) {
  19. return backjson(0, $result['msg']);
  20. }
  21. return backjson(200, $result['data']);
  22. }
  23. /**
  24. * 企业报名
  25. * 20220119
  26. * wj
  27. */
  28. public function companysignup()
  29. {
  30. $param = request()->param();
  31. $l_p = new partylogic();
  32. $result = $l_p->companysingup($param);
  33. if (1 != $result['status']) {
  34. return backjson(0, $result['msg']);
  35. }
  36. return backjson(200, $result['data']);
  37. }
  38. /**
  39. * 获取报名的企业列表
  40. * 20220119
  41. * wj
  42. */
  43. public function getcompanylist()
  44. {
  45. $param = request()->param();
  46. $l_p = new partylogic();
  47. $result = $l_p->getlistcompanybypartyid($param);
  48. if (1 != $result['status']) {
  49. return backjson(0, $result['msg']);
  50. }
  51. $uselist = [];
  52. $list = $result['data'];
  53. $l_c = new companylogic();
  54. foreach ($list as $key => $value) {
  55. $where = ['id'=>$value['company_id'],'activestate'=>1];
  56. $result = $l_c->getinfowitchinventbyid($where);
  57. if(!$result['status']){
  58. return backjson(0, $result['msg']);
  59. }
  60. $uselist[] = $result['data'];
  61. }
  62. return backjson(200, $uselist);
  63. }
  64. }