批量插入或更新标签.
(labels string)
| 55 | |
| 56 | //批量插入或更新标签. |
| 57 | func (m *Label) InsertOrUpdateMulti(labels string) { |
| 58 | if labels != "" { |
| 59 | labelArray := strings.Split(labels, ",") |
| 60 | for _, label := range labelArray { |
| 61 | if label != "" { |
| 62 | NewLabel().InsertOrUpdate(strings.TrimSpace(label)) |
| 63 | } |
| 64 | } |
| 65 | } |
| 66 | } |
| 67 | |
| 68 | //分页查找标签. |
| 69 | func (m *Label) FindToPager(pageIndex, pageSize int, word ...string) (labels []*Label, totalCount int, err error) { |
no test coverage detected