TableDataLogic.php 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. <?php
  2. // +----------------------------------------------------------------------
  3. // | likeadmin快速开发前后端分离管理后台(PHP版)
  4. // +----------------------------------------------------------------------
  5. // | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
  6. // | 开源版本可自由商用,可去除界面版权logo
  7. // | gitee下载:https://gitee.com/likeshop_gitee/likeadmin
  8. // | github下载:https://github.com/likeshop-github/likeadmin
  9. // | 访问官网:https://www.likeadmin.cn
  10. // | likeadmin团队 版权所有 拥有最终解释权
  11. // +----------------------------------------------------------------------
  12. // | author: likeadminTeam
  13. // +----------------------------------------------------------------------
  14. namespace app\common\logic;
  15. use app\common\enum\PayEnum;
  16. use app\common\enum\RefundEnum;
  17. use app\common\model\equity\EquityConfig;
  18. use app\common\model\labels\Labels;
  19. use app\common\model\property\PropertyHead;
  20. use app\common\model\recharge\RechargeOrder;
  21. use app\common\model\refund\RefundLog;
  22. use app\common\model\refund\RefundRecord;
  23. use app\common\model\sale\Sale;
  24. use app\common\model\sale\SaleGroup;
  25. use app\common\service\pay\AliPayService;
  26. use app\common\service\pay\WeChatPayService;
  27. /**
  28. * 查询选项类数据
  29. * Class TableDataLogic
  30. * @package app\common\logic
  31. */
  32. class TableDataLogic extends BaseLogic
  33. {
  34. /**
  35. * @notes 商品标签列表
  36. */
  37. public static function labels()
  38. {
  39. return Labels::where('id','>',0)->where('label_type',1)->field('id,label_name as name,id as value,"data_table_labels" as type_value')->select()->toArray();
  40. }
  41. /**
  42. * @notes 销售列表
  43. */
  44. public static function sale()
  45. {
  46. return Sale::where('id','>',0)->field('id,sale_name as name,id as value,"data_table_sale" as type_value')->select()->toArray();
  47. }
  48. /**
  49. * @notes 销售组列表
  50. */
  51. public static function saleGroup()
  52. {
  53. return SaleGroup::where('id','>',0)->field('id,sale_name as name,id as value,"data_table_saleGroup" as type_value')->select()->toArray();
  54. }
  55. public static function propertyHead()
  56. {
  57. return PropertyHead::where('id','>',0)->field('id,village_name as name,id as value,"data_table_propertyHead" as type_value')->select()->toArray();
  58. }
  59. /**
  60. * @notes 工程师标签列表
  61. */
  62. public static function masterWorkerLabels()
  63. {
  64. return Labels::where('id','>',0)->where('label_type',2)->field('id,label_name as name,id as value,"data_table_masterWorkerLabels" as type_value')->select()->toArray();
  65. }
  66. /**
  67. * @notes 优惠券标签列表
  68. */
  69. public static function couponLabels()
  70. {
  71. return Labels::where('id','>',0)->where('label_type',3)->field('id,label_name as name,id as value,"data_table_couponLabels" as type_value')->select()->toArray();
  72. }
  73. /**
  74. * @notes 权益卡列表
  75. */
  76. public static function equityConfig()
  77. {
  78. return EquityConfig::where('id','>',0)->field('id,equity_name as name,id as value,"data_table_equityConfig" as type_value')->select()->toArray();
  79. }
  80. }