|
|
@@ -3,6 +3,7 @@ package implement |
|
|
|
import ( |
|
|
|
"code.fnuoos.com/EggPlanet/egg_models.git/src/dao" |
|
|
|
"code.fnuoos.com/EggPlanet/egg_models.git/src/model" |
|
|
|
zhios_order_relate_utils "code.fnuoos.com/EggPlanet/egg_models.git/utils" |
|
|
|
zhios_order_relate_logx "code.fnuoos.com/EggPlanet/egg_models.git/utils/logx" |
|
|
|
"xorm.io/xorm" |
|
|
|
) |
|
|
@@ -22,3 +23,13 @@ func (a AdvertisingFunctionDb) AdvertisingFunctionAll() (*[]model.AdvertisingFun |
|
|
|
} |
|
|
|
return &m, nil |
|
|
|
} |
|
|
|
func (a AdvertisingFunctionDb) FindUserFeedbackFunctionAndTotal(page, limit string) (*[]model.AdvertisingFunction, int64, error) { |
|
|
|
var m []model.AdvertisingFunction |
|
|
|
sess := a.Db.Where("1=1") |
|
|
|
start := (zhios_order_relate_utils.StrToInt(page) - 1) * zhios_order_relate_utils.StrToInt(limit) |
|
|
|
count, err := sess.Limit(zhios_order_relate_utils.StrToInt(limit), start).OrderBy("id desc").FindAndCount(&m) |
|
|
|
if err != nil { |
|
|
|
return nil, count, zhios_order_relate_logx.Error(err) |
|
|
|
} |
|
|
|
return &m, count, nil |
|
|
|
} |