Error code standardization

test-errcode
skiffer-git 2 years ago
parent 99de72d723
commit b041cb6cbf

@ -36,11 +36,11 @@ func (*Group) Delete(groupIDList []string) error {
func (tb *Group) Get(groupIDs []string) ([]*Group, error) {
var ms []*Group
return ms, utils.Wrap(tb.DB.Where("group_id in (?)", groupIDs).Find(&ms).Error, "")
return ms, utils.Wrap(db.DB.MysqlDB.DefaultGormDB().Where("group_id in (?)", groupIDs).Find(&ms).Error, "")
}
func (tb *Group) Update(groups []*Group) error {
return utils.Wrap(utils.Wrap(tb.DB.Updates(groups).Error, ""), "")
return utils.Wrap(utils.Wrap(db.DB.MysqlDB.DefaultGormDB().Updates(groups).Error, ""), "")
}
func (*Group) Find(groupIDList []string) ([]*Group, error) {

@ -1,32 +0,0 @@
package im_mysql_model
//func (tb *Group) Create(groups []*Group) error {
// return nil
//}
//func (tb *Group) Take(groupIDs []string) (*Group, error) {
// return nil, nil
//}
//func (tb *Group) Get(groupIDs []string) (*Group, error) {
// return nil, nil
//}
//func (tb *Group) Update(groups []*Group) error {
// return nil
//}
//func (tb *Group) GetByName(groupName string, pageNumber, showNumber int32) ([]GroupWithNum, int64, error) {
//
//}
//func (tb *Group) GetGroups(pageNumber, showNumber int) ([]GroupWithNum, error) {
//}
//func (tb *Group) OperateGroupStatus(groupId string, groupStatus int32) error {
//}
//
//func (tb *Group) GetCountsNum(groupIDs []string) ([]int32, error) {
//
//}
//
//func (tb *Group) UpdateDefaultZero(groupID string, args map[string]interface{}) error {
//}
//
//func (tb *Group) GetGroupIDsByGroupType(groupType int) ([]string, error) {
//
//}
Loading…
Cancel
Save