go-wxhelper/service/robot/delete.go

17 lines
306 B
Go
Raw Permalink Normal View History

package robot
import (
"wechat-robot/internal/database"
"wechat-robot/model/entity"
)
// DeleteById
// @description: 删除机器人
// @param id
// @return err
func DeleteById(id string) (err error) {
// 删除数据
err = database.Client.Where("id = ?", id).Delete(&entity.Robot{}).Error
return
}