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