diff --git a/app/hdl/institutional_management/egg_energy/hdl_user_coin.go b/app/hdl/institutional_management/egg_energy/hdl_user_coin.go index 7ac87a3..e39365d 100644 --- a/app/hdl/institutional_management/egg_energy/hdl_user_coin.go +++ b/app/hdl/institutional_management/egg_energy/hdl_user_coin.go @@ -44,7 +44,8 @@ func GetActivePointsUserCoinList(c *gin.Context) { CoinID: 2, Name: "团队活跃账户币", } - kindList = append(kindList, kind1, kind2) + kindList[0] = kind1 + kindList[1] = kind2 // 默认查询第一种货币持有数量列表 if req.Kind == 0 { @@ -201,7 +202,8 @@ func GetGreenEnergyUserCoinList(c *gin.Context) { CoinID: 4, Name: "团队绿色能量币", } - kindList = append(kindList, kind1, kind2) + kindList[0] = kind1 + kindList[1] = kind2 // 默认查询第一种货币持有数量列表 if req.Kind == 0 { diff --git a/app/svc/public_platoon/svc_relation_ship_map.go b/app/svc/public_platoon/svc_relation_ship_map.go index 5e91be7..2842a18 100644 --- a/app/svc/public_platoon/svc_relation_ship_map.go +++ b/app/svc/public_platoon/svc_relation_ship_map.go @@ -114,11 +114,11 @@ func ExchangeUserPosition(engine *xorm.Engine, relation1, relation2 *model.Publi return zhios_order_relate_logx.Error(err) } - _, err = session.Where("id = ?", relation1.Id).Cols(forceColumns...).Update(session, &relation1) + _, err = session.ID(relation1.Id).Cols(forceColumns...).Update(relation1) if err != nil { return zhios_order_relate_logx.Error(err) } - _, err = session.Where("id = ?", relation2.Id).Cols(forceColumns...).Update(session, &relation2) + _, err = session.ID(relation2.Id).Cols(forceColumns...).Update(relation2) if err != nil { return zhios_order_relate_logx.Error(err) }