|
@@ -95,7 +95,7 @@ func UserSmallPublicPlatoonRelationFindByEmptyPosition(Db *xorm.Engine) (*model. |
|
|
func UserSmallPublicPlatoonRelationGetOneByPid(Db *xorm.Engine, recommendUid string, params map[string]interface{}) (*model.UserSmallPublicPlatoonRelation, error) { |
|
|
func UserSmallPublicPlatoonRelationGetOneByPid(Db *xorm.Engine, recommendUid string, params map[string]interface{}) (*model.UserSmallPublicPlatoonRelation, error) { |
|
|
var m model.UserSmallPublicPlatoonRelation |
|
|
var m model.UserSmallPublicPlatoonRelation |
|
|
var query = fmt.Sprintf("%s <=?", params["key"]) |
|
|
var query = fmt.Sprintf("%s <=?", params["key"]) |
|
|
if has, err := Db.Where("recommend_uid = ?", recommendUid).And(query, params["value"]).Get(&m); err != nil || has == false { |
|
|
|
|
|
|
|
|
if has, err := Db.Where("recommend_uid = ?", recommendUid).And(query, params["value"]).OrderBy("id ASC").Get(&m); err != nil || has == false { |
|
|
return nil, zhios_order_relate_logx.Error(err) |
|
|
return nil, zhios_order_relate_logx.Error(err) |
|
|
} |
|
|
} |
|
|
return &m, nil |
|
|
return &m, nil |
|
|