CommonConst.php 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. <?php
  2. /*
  3. * To change this license header, choose License Headers in Project Properties.
  4. * To change this template file, choose Tools | Templates
  5. * and open the template in the editor.
  6. */
  7. namespace app\common\state;
  8. /**
  9. * Description of CommonConst
  10. * 公共常量
  11. * @author sgq
  12. */
  13. class CommonConst {
  14. /**
  15. * 通过层次得到层次基础积分
  16. * @param type $level
  17. * @return int
  18. */
  19. public static function getLayerPointsByLayer($level) {
  20. $levelAndPoints = [
  21. 1 => 6000,
  22. 2 => 4000,
  23. 3 => 2000,
  24. 4 => 1000,
  25. 5 => 500,
  26. 6 => 200,
  27. 7 => 100,
  28. 8 => 0
  29. ];
  30. return $levelAndPoints[$level];
  31. }
  32. /**
  33. * 通过层次得到层次名
  34. * @param type $level
  35. * @return string
  36. */
  37. public static function getLayerNameByLayer($level) {
  38. $levelAndNames = [
  39. 1 => "第一层次",
  40. 2 => "第二层次",
  41. 3 => "第三层次",
  42. 4 => "第四层次",
  43. 5 => "第五层次",
  44. 6 => "第六层次",
  45. 7 => "第七层次",
  46. 8 => "非优秀人才"
  47. ];
  48. return $levelAndNames[$level];
  49. }
  50. }