12345678910111213141516171819202122232425262728293031323334 |
- <?php
- namespace app\store\model\member;
- use app\common\model\member\MemberCardsAction as MemberCardsActionModel;
- /**
- * 会员卡行为操作模型
- * @package app\common\model
- */
- class MemberCardsAction extends MemberCardsActionModel
- {
- protected $append = [];
- /**
- * @param $id
- * @param int $target_type
- * @return \think\Paginator
- * @throws \think\db\exception\DataNotFoundException
- * @throws \think\db\exception\DbException
- * @throws \think\db\exception\ModelNotFoundException
- */
- public function getLists($id,$target_type=1,$type=1){
- $query = self::where(['target_id'=>$id,'target_type'=>$target_type])
- ->field('id,audit_status,audit_time,audit_reason,behavior,audit_user')
- ->order('id desc');
- if($type){
- return $query->paginate(15);
- }else{
- return $query->select();
- }
- }
- }
|