AccuntLogService.php 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. <?php
  2. // +----------------------------------------------------------------------
  3. // | LARAVEL8.0 框架 [ LARAVEL ][ RXThinkCMF ]
  4. // +----------------------------------------------------------------------
  5. // | 版权所有 2017~2021 LARAVEL研发中心
  6. // +----------------------------------------------------------------------
  7. // | 官方网站: http://www.laravel.cn
  8. // +----------------------------------------------------------------------
  9. // | Author: laravel开发员 <laravel.qq.com>
  10. // +----------------------------------------------------------------------
  11. namespace App\Services\Common;
  12. use App\Models\AcceptorModel;
  13. use App\Models\AccountLogModel;
  14. use App\Models\GoodsCategoryModel;
  15. use App\Models\GoodsModel;
  16. use App\Models\TradeModel;
  17. use App\Services\BaseService;
  18. use Illuminate\Support\Facades\DB;
  19. /**
  20. * 承兑商管理-服务类
  21. * @author laravel开发员
  22. * @since 2020/11/11
  23. * @package App\Services\Common
  24. */
  25. class AccuntLogService extends BaseService
  26. {
  27. /**
  28. * 构造函数
  29. * @author laravel开发员
  30. * @since 2020/11/11
  31. */
  32. public function __construct()
  33. {
  34. $this->model = new AccountLogModel();
  35. }
  36. /**
  37. * 获取列表
  38. * @param $params 参数
  39. * @param int $pageSize 分页大小:默认 15
  40. * @return array
  41. */
  42. public function getDataList($params, $pageSize = 10, $field=[])
  43. {
  44. $where = ['a.mark' => 1];
  45. $list = $this->model
  46. ->from('account_log as a')
  47. ->where($where)
  48. ->select($field? $field : ['a.*'])
  49. ->paginate($pageSize > 0 ? $pageSize : 9999999);
  50. $list = $list? $list->toArray() :[];
  51. if($list){
  52. // foreach($list['data'] as &$item){
  53. //// $item['create_time_text'] = $item['create_time']? datetime($item['create_time']):'';
  54. // }
  55. }
  56. return [
  57. 'pageSize'=> $pageSize,
  58. 'total'=>isset($list['total'])? $list['total'] : 0,
  59. 'list'=> isset($list['data'])? $list['data'] : []
  60. ];
  61. }
  62. /**
  63. * 添加会编辑会员
  64. * @return array
  65. * @since 2020/11/11
  66. * @author laravel开发员
  67. */
  68. public function edit()
  69. {
  70. // 请求参数
  71. $data = request()->all();
  72. return parent::edit($data); // TODO: Change the autogenerated stub
  73. }
  74. }