3 Star 1 Fork 898

高煜涛/gin-vue-admin

forked from pixel/gin-vue-admin 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
efficacy.go 1.04 KB
一键复制 编辑 原始数据 按行查看 历史
package assess
import (
"gitee.com/g-qs/gin-vue-admin/server/global"
"gitee.com/g-qs/gin-vue-admin/server/model/assess"
)
type EfficacyService struct{}
// GetEfficacyList 获取功效列表
func (efficacyService *EfficacyService) GetEfficacyList() (efficacy []assess.Efficacy, err error) {
err = global.GVA_DB.Find(&efficacy).Error
return
}
// GetEfficacyTagByUid 获取用户功效标签
func (efficacyService *EfficacyService) GetEfficacyTagByUid(id uint) (uet assess.UserEfficacyTag, err error) {
err = global.GVA_DB.Where("id = ?", id).First(&uet).Error
return uet, err
}
// CreateUserEfficacyTag 创建用户功效标签
func (efficacyService *EfficacyService) CreateUserEfficacyTag(uet *assess.UserEfficacyTag) (err error) {
err = global.GVA_DB.Create(uet).Error
return err
}
// UpdateUserEfficacyTag 更新用户功效标签
func (efficacyService *EfficacyService) UpdateUserEfficacyTag(id uint, eids string) (err error) {
err = global.GVA_DB.Model(&assess.UserEfficacyTag{}).Where("id = ?", id).Update("e_ids", eids).Error
return err
}
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/g-qs/gin-vue-admin.git
git@gitee.com:g-qs/gin-vue-admin.git
g-qs
gin-vue-admin
gin-vue-admin
533102b8437a

搜索帮助