Bläddra i källkod

注销

master
huangjiajun 1 vecka sedan
förälder
incheckning
e0fb9c646c
2 ändrade filer med 38 tillägg och 0 borttagningar
  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 Visa fil

@@ -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 Visa fil

@@ -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
}

Laddar…
Avbryt
Spara