|
|
@@ -4,6 +4,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" |
|
|
|
"fmt" |
|
|
|
"xorm.io/xorm" |
|
|
|
) |
|
|
|
|
|
|
@@ -59,3 +60,12 @@ func (p PlatformRevenueDataDb) PlatformRevenueDataUpdateBySession(session *xorm. |
|
|
|
|
|
|
|
return affected, nil |
|
|
|
} |
|
|
|
|
|
|
|
func (p PlatformRevenueDataDb) PlatformRevenueDataGetOneByParams(params map[string]interface{}) (*model.PlatformRevenueData, error) { |
|
|
|
var m model.PlatformRevenueData |
|
|
|
var query = fmt.Sprintf("%s =?", params["key"]) |
|
|
|
if has, err := p.Db.Where(query, params["value"]).Get(&m); err != nil || has == false { |
|
|
|
return nil, zhios_order_relate_logx.Error(err) |
|
|
|
} |
|
|
|
return &m, nil |
|
|
|
} |