(strategy_id, action_type int)
| 107 | } |
| 108 | |
| 109 | func (this *db) GetActions(strategy_id, action_type int) []*types.Action { |
| 110 | actions := []*types.Action{} |
| 111 | if err := this.Select(&actions, "SELECT * FROM `action` WHERE `strategy_id` = ? AND `type` = ?", strategy_id, action_type); err != nil { |
| 112 | lg.Error(err.Error()) |
| 113 | return nil |
| 114 | } |
| 115 | return actions |
| 116 | } |
| 117 | |
| 118 | func (this *db) GetAllActions(strategy_id int) []*types.Action { |
| 119 | actions := []*types.Action{} |