3 Star 1 Fork 898

高煜涛/gin-vue-admin

forked from pixel/gin-vue-admin 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
target_plan.go 995 Bytes
一键复制 编辑 原始数据 按行查看 历史
pixel 提交于 2024-02-07 20:52 . 增加邀请卡
package manager
import (
"gitee.com/g-qs/gin-vue-admin/server/global"
"gitee.com/g-qs/gin-vue-admin/server/model/manager"
"time"
)
type TargetPlanService struct {
}
// SaveTargetPlan 保存目标计划
// Author [g-qs](https://github.com/g-qs)
func (targetPlanService *TargetPlanService) SaveTargetPlan(targetPlan *manager.TargetPlan) (err error) {
targetPlan.UpdatedAt = time.Now()
err = global.GVA_DB.Where("hm_id = ?", targetPlan.HmId).Updates(&targetPlan).Error
return
}
// GetTargetPlan 获取目标计划
// Author [g-qs](https://github.com/g-qs)
func (targetPlanService *TargetPlanService) GetTargetPlan(HmId uint) (targetPlan manager.TargetPlan, err error) {
err = global.GVA_DB.Where("hm_id = ?", HmId).First(&targetPlan).Error
return
}
func (targetPlanService *TargetPlanService) ChangeTargetPlan(targetPlan *manager.TargetPlan) (err error) {
targetPlan.UpdatedAt = time.Now()
err = global.GVA_DB.Where("hm_id = ?", targetPlan.HmId).Updates(&targetPlan).Error
return
}
马建仓 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

搜索帮助