|
|
@@ -3,6 +3,8 @@ package implement |
|
|
|
import ( |
|
|
|
"code.fnuoos.com/go_rely_warehouse/zyos_model.git/src/dao" |
|
|
|
"code.fnuoos.com/go_rely_warehouse/zyos_model.git/src/models" |
|
|
|
db "code.fnuoos.com/go_rely_warehouse/zyos_model.git/src/models/official" |
|
|
|
"code.fnuoos.com/go_rely_warehouse/zyos_model.git/src/models/official/model" |
|
|
|
"code.fnuoos.com/go_rely_warehouse/zyos_model.git/super_cloud_issuance/enum" |
|
|
|
zhios_order_relate_logx "code.fnuoos.com/go_rely_warehouse/zyos_model.git/utils/logx" |
|
|
|
"strconv" |
|
|
@@ -24,17 +26,17 @@ type SuperCloudIssuanceUserRobotDb struct { |
|
|
|
MasterId string `json:"master_id"` |
|
|
|
} |
|
|
|
|
|
|
|
func (superCloudIssuanceUserRobotDb *SuperCloudIssuanceUserRobotDb) InsertCloudIssuanceUserRobot(m *models.SuperCloudIssuanceUserRobot) (id int, err error) { |
|
|
|
_, err = cloudIssuanceUserRobotDb.Db.InsertOne(m) |
|
|
|
func (superCloudIssuanceUserRobotDb *SuperCloudIssuanceUserRobotDb) InsertCloudIssuanceUserRobot(m *models.SuperCloudIssuanceUserRobot, officialDb *xorm.Engine) (id int, err error) { |
|
|
|
_, err = superCloudIssuanceUserRobotDb.Db.InsertOne(m) |
|
|
|
if err != nil { |
|
|
|
return 0, err |
|
|
|
} |
|
|
|
id = m.Id |
|
|
|
//顺便新增一份数据到总后台的 `cloud_issuance_robot_records` 表 |
|
|
|
db.CloudIssuanceRobotRecordsInsert(&model2.CloudIssuanceRobotRecords{ |
|
|
|
MasterId: cloudIssuanceUserRobotDb.MasterId, |
|
|
|
//顺便新增一份数据到总后台的 `super_cloud_issuance_robot_records` 表 |
|
|
|
db.CloudIssuanceRobotRecordsInsert(officialDb, &model.SuperCloudIssuanceRobotRecords{ |
|
|
|
MasterId: superCloudIssuanceUserRobotDb.MasterId, |
|
|
|
RobotId: strconv.Itoa(m.RobotId), |
|
|
|
Uid: cloudIssuanceUserRobotDb.Uid, |
|
|
|
Uid: superCloudIssuanceUserRobotDb.Uid, |
|
|
|
}) |
|
|
|
return id, nil |
|
|
|
} |
|
|
|