Merge pull request #180 from trheyi/main

[fix] table & form action bug
This commit is contained in:
Max 2022-09-30 12:15:24 +08:00 committed by GitHub
commit a4b6585c3f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 8 deletions

View file

@ -133,8 +133,8 @@ func processHandler(p *action.Process, process *gou.Process) (interface{}, error
switch p.Name {
case "yao.form.Save", "yao.form.Create":
switch args[0].(type) {
case map[string]interface{}:
data := args[0].(map[string]interface{})
case map[string]interface{}, maps.MapStr:
data := any.Of(args[0]).Map().MapStrAny
err := form.computeSave(process, data)
if err != nil {
log.Error("[form] %s %s -> %s %s", form.ID, p.Name, name, err.Error())
@ -145,8 +145,8 @@ func processHandler(p *action.Process, process *gou.Process) (interface{}, error
case "yao.form.Update":
switch args[1].(type) {
case map[string]interface{}:
data := args[1].(map[string]interface{})
case map[string]interface{}, maps.MapStr:
data := any.Of(args[1]).Map().MapStrAny
err := form.computeSave(process, data)
if err != nil {
log.Error("[form] %s %s -> %s %s", form.ID, p.Name, name, err.Error())

View file

@ -204,8 +204,8 @@ func processHandler(p *action.Process, process *gou.Process) (interface{}, error
switch p.Name {
case "yao.table.Save", "yao.table.Create":
switch args[0].(type) {
case map[string]interface{}:
data := args[0].(map[string]interface{})
case map[string]interface{}, maps.MapStr:
data := any.Of(args[0]).Map().MapStrAny
err := tab.computeSave(process, data)
if err != nil {
log.Error("[table] %s %s -> %s %s", tab.ID, p.Name, name, err.Error())
@ -216,8 +216,8 @@ func processHandler(p *action.Process, process *gou.Process) (interface{}, error
case "yao.table.Update", "yao.table.UpdateWhere", "yao.table.UpdateIn":
switch args[1].(type) {
case map[string]interface{}:
data := args[1].(map[string]interface{})
case map[string]interface{}, maps.MapStr:
data := any.Of(args[1]).Map().MapStrAny
err := tab.computeSave(process, data)
if err != nil {
log.Error("[table] %s %s -> %s %s", tab.ID, p.Name, name, err.Error())