Party.php 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  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. $time =date('Y-m-d H:i:s');
  18. $param['time'] = $time;
  19. $result = $l_p->getinfobytime($param);
  20. if (1 != $result['status']) {
  21. return backjson(0, $result['msg']);
  22. }
  23. return backjson(200, $result['data']);
  24. }
  25. /**
  26. * 企业报名
  27. * 20220119
  28. * wj
  29. */
  30. public function companysignup()
  31. {
  32. $param = request()->param();
  33. $l_p = new partylogic();
  34. $result = $l_p->companysingup($param);
  35. if (1 != $result['status']) {
  36. return backjson(0, $result['msg']);
  37. }
  38. return backjson(200, $result['data']);
  39. }
  40. /**
  41. * 获取报名的企业列表
  42. * 20220119
  43. * wj
  44. */
  45. public function getcompanylist()
  46. {
  47. $param = request()->param();
  48. $l_p = new partylogic();
  49. $result = $l_p->getlistcompanybypartyid($param);
  50. if (1 != $result['status']) {
  51. return backjson(0, $result['msg']);
  52. }
  53. $uselist = [];
  54. $list = $result['data'];
  55. $l_c = new companylogic();
  56. foreach ($list as $key => $value) {
  57. $where = ['id'=>$value['company_id'],'activestate'=>1];
  58. $result = $l_c->getinfowitchinventbyid($where);
  59. if(1==$result['status']){
  60. $uselist[] = $result['data'];
  61. }
  62. }
  63. return backjson(200, $uselist);
  64. }
  65. }