|
|
@@ -3,6 +3,7 @@ |
|
|
|
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" |
|
|
|
) |
|
|
|
|
|
|
@@ -31,3 +32,11 @@ func (e EggEnergyAssistanceDetailDb) AssistanceDetailExist(uid, assistedUid, sig |
|
|
|
} |
|
|
|
return exist, nil |
|
|
|
} |
|
|
|
|
|
|
|
func (e EggEnergyAssistanceDetailDb) AssistanceDetailDeleteByDateByPage(date string, limit int) (int64, error) { |
|
|
|
affected, err := e.Db.Where("created_at < ?", date).Limit(limit).Delete(&model.EggEnergyAssistanceDetail{}) |
|
|
|
if err != nil { |
|
|
|
return 0, zhios_order_relate_logx.Error(err.Error()) |
|
|
|
} |
|
|
|
return affected, nil |
|
|
|
} |