✏️
This commit is contained in:
parent
01b72caf5e
commit
6496b24c14
@ -13,6 +13,7 @@ import (
|
|||||||
"strconv"
|
"strconv"
|
||||||
|
|
||||||
"github.com/gin-gonic/gin"
|
"github.com/gin-gonic/gin"
|
||||||
|
|
||||||
)
|
)
|
||||||
|
|
||||||
type Encounters struct {
|
type Encounters struct {
|
||||||
@ -43,9 +44,9 @@ func (e *Encounters) Create(context *gin.Context) {
|
|||||||
response.Fail(context, consts.ValidatorParamsCheckFailCode, consts.ValidatorParamsCheckFailMsg, "")
|
response.Fail(context, consts.ValidatorParamsCheckFailCode, consts.ValidatorParamsCheckFailMsg, "")
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
// Real Insert - 1: EA LINK
|
// Real Insert - 1: ENC
|
||||||
animals_id := data_transfer.GetFloat64Slice(context, "animals_id") // 由于是 Slice 就交给 EAlink 内部遍历时处理。
|
animals_id := data_transfer.GetFloat64Slice(context, "animals_id") // 由于是 Slice 就交给 EAlink 内部遍历时处理。
|
||||||
// Real Insert - 2: ENC
|
// Real Insert - 2: EA LINK
|
||||||
if encounter_id, ok := model.CreateEncounterFactory("").InsertDate(context); ok && encounter_id > 0 {
|
if encounter_id, ok := model.CreateEncounterFactory("").InsertDate(context); ok && encounter_id > 0 {
|
||||||
if !model.CreateEncounterAnimalLinkFactory("").Insert(int(encounter_id), animals_id) {
|
if !model.CreateEncounterAnimalLinkFactory("").Insert(int(encounter_id), animals_id) {
|
||||||
// TODO 异常处理。
|
// TODO 异常处理。
|
||||||
|
Loading…
x
Reference in New Issue
Block a user