Browse Source

注销

master
huangjiajun 6 days ago
parent
commit
e0fb9c646c
2 changed files with 38 additions and 0 deletions
  1. +9
    -0
      src/dao/user_delete_info_dao.go
  2. +29
    -0
      src/implement/user_delete_info_implement.go

+ 9
- 0
src/dao/user_delete_info_dao.go View File

@@ -0,0 +1,9 @@
package dao

import (
"code.fnuoos.com/EggPlanet/egg_models.git/src/model"
)

type UserDeleteInfoDao interface {
UserFindAndCount(phone string, page, limit int) (*[]model.UserDeleteInfo, int64, error)
}

+ 29
- 0
src/implement/user_delete_info_implement.go View File

@@ -0,0 +1,29 @@
package implement

import (
"code.fnuoos.com/EggPlanet/egg_models.git/src/dao"
"code.fnuoos.com/EggPlanet/egg_models.git/src/model"
zhios_order_relate_logx "code.fnuoos.com/EggPlanet/egg_models.git/utils/logx"
"xorm.io/xorm"
)

func NewUserDeleteInfoDb(engine *xorm.Engine) dao.UserDeleteInfoDao {
return &UserDeleteInfoDb{Db: engine}
}

type UserDeleteInfoDb struct {
Db *xorm.Engine
}

func (u UserDeleteInfoDb) UserFindAndCount(phone string, page, limit int) (*[]model.UserDeleteInfo, int64, error) {
var m []model.UserDeleteInfo
session := u.Db.Where("")
if phone != "" {
session = session.Where("phone = ?", phone)
}
total, err := session.Limit(limit, (page-1)*limit).FindAndCount(&m)
if err != nil {
return nil, 0, zhios_order_relate_logx.Error(err)
}
return &m, total, nil
}

Loading…
Cancel
Save