代码生成

This commit is contained in:
PandaGoAdmin
2022-01-03 19:03:39 +08:00
parent 1a1f137725
commit b6a8fe5e1b
53 changed files with 2467 additions and 459 deletions

View File

@@ -33,7 +33,7 @@ func (m *sysPostModelImpl) Insert(data entity.SysPost) *entity.SysPost {
func (m *sysPostModelImpl) FindOne(postId int64) *entity.SysPost {
resData := new(entity.SysPost)
err := global.Db.Table(m.table).Where("`post_id` = ?", postId).First(resData).Error
err := global.Db.Table(m.table).Where("post_id = ?", postId).First(resData).Error
biz.ErrIsNil(err, "查询岗位失败")
return resData
}
@@ -90,5 +90,5 @@ func (m *sysPostModelImpl) Update(data entity.SysPost) *entity.SysPost {
}
func (m *sysPostModelImpl) Delete(postIds []int64) {
biz.ErrIsNil(global.Db.Table(m.table).Delete(&entity.SysPost{}, "`post_id` in (?)", postIds).Error, "删除岗位失败")
biz.ErrIsNil(global.Db.Table(m.table).Delete(&entity.SysPost{}, "post_id in (?)", postIds).Error, "删除岗位失败")
}