package service import ( "crazy-fox-backend-api/model" "github.com/pkg/errors" ) const discountIconSkin = "discount_icon" // GetOtherConf 获取折扣图标资源 func (This *activityService) GetOtherConf() (model.ActOtherConf, error) { var iconRes model.ActDiscountIconRes iconRes.ResList = Config.GetSkinOptions(discountIconSkin) res, err := Config.GetBasicConf(model.ItemTitle{Item: "Game", Title: "discountIconTheme"}) if err != nil { return model.ActOtherConf{}, errors.WithStack(err) } iconRes.Res = res return model.ActOtherConf{IconResConf: iconRes}, nil } func (This *activityService) UpdateIconRes(req model.ReqDiscountIcon) error { if err := Config.UpdateBasicConf(model.TBasicConfig{ ItemTitle: model.ItemTitle{Item: "Game", Title: "discountIconTheme"}, Content: req.Res, Memo: "活动礼包折扣图标主题", }); err != nil { return errors.WithStack(err) } return nil }