refactor🎨: 岗位删除修改为data传值方式
This commit is contained in:
1 parent
37fe63126c
commit
636294b6f5
4 files changed
+13
-14
No files matched your search
@@ -55,12 +55,11 @@ func (e *SysPost) GetSysPost(d *dto.SysPostById, model *models.SysPost) error {
|
||||
}
|
||||
|
||||
// InsertSysPost 创建SysPost对象
|
||||
func (e *SysPost) InsertSysPost(model *dto.SysPostControl) error {
|
||||
func (e *SysPost) InsertSysPost(c *dto.SysPostControl) error {
|
||||
var err error
|
||||
var data models.SysPost
|
||||
|
||||
err = e.Orm.Model(&data).
|
||||
Create(model).Error
|
||||
c.Generate(&data)
|
||||
err = e.Orm.Create(&data).Error
|
||||
if err != nil {
|
||||
e.Log.Errorf("db error:%s", err)
|
||||
return err
|
||||
|
||||
Reference in new issue
Block a user