123456789101112131415161718192021222324252627282930313233343536 |
- <?php
- /**
- * Author: luzheng.liu
- * Time: 2020/12/5 19:52
- */
- namespace app\api\model;
- use app\common\until\Until;
- class PayModel extends BaseModel {
- protected $table = 'pay_config';
- public function getPayList() {
- $countModel = $this->alias('p')
- ->join('group g','g.id = p.group_id')
- ->join('group_role gr', 'gr.group_id = g.id');
- $selectModel = $this->alias('p')
- ->field('p.*,g.group_name')
- ->join('group g','g.id = p.group_id')
- ->join('group_role gr', 'gr.group_id = g.id')
- ->order(['p.id' => 'des ']);
- return $this->joinModelPageList($countModel, $selectModel);
- }
- public function getPayInfo() {
- $selectModel = $this->alias('p')
- ->field('p.*')
- // ->join('group g','g.id = p.group_id')
- ->where($this->getWhere())
- ->find();
- return Until::modelToArray($selectModel);
- }
- }
|