初次提交

This commit is contained in:
liuzhihang1
2024-06-26 20:45:23 +08:00
parent 4b388a5be1
commit 831ea9889f
57 changed files with 3945 additions and 0 deletions

33
dao/push.go Normal file
View File

@@ -0,0 +1,33 @@
package dao
import (
"msm/model"
)
type pushDao struct{}
var PushDao = new(pushDao)
func (p *pushDao) GetPushList() (result []model.Push) {
db.Find(&result)
return
}
func (p *pushDao) GetPushConfigById(id int) (result model.Push) {
db.Where("id = ?", id).First(&result)
return
}
func (p *pushDao) UpdatePushConfig(data model.Push) error {
return db.Save(&data).Error
}
func (p *pushDao) AddPushConfig(data model.Push) error {
return db.Create(&data).Error
}
func (p *pushDao) DeletePushConfig(id int) error {
return db.Delete(&model.Push{
Id: int64(id),
}).Error
}