You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
19 lines
662 B
19 lines
662 B
package activity_service
|
|
|
|
import (
|
|
"github.com/ouxuanserver/osmanthuswine/src/core"
|
|
"hudongzhuanjia/models"
|
|
)
|
|
|
|
func GetModuleService(moduleName string, activityId int64) (*models.ActivityModuleService, bool, error) {
|
|
hids := make([]int64, 0)
|
|
err := core.GetXormAuto().Table(new(models.ModuleServiceHistory)).Select("id").
|
|
Where("is_delete=0 and name=?", moduleName).Find(&hids)
|
|
if err != nil {
|
|
return nil, false, err
|
|
}
|
|
moduleService := new(models.ActivityModuleService)
|
|
exist, err := core.GetXormAuto().Where("is_delete=0 and activity_id=?", activityId).
|
|
In("service_module_history_id", hids).Get(moduleService)
|
|
return moduleService, exist, err
|
|
}
|