@@ -49,7 +49,6 @@ func (cloudIssuanceUserRobotBindFollowDb *CloudIssuanceUserRobotBindFollowDb) Ge | |||||
} | } | ||||
func (cloudIssuanceUserRobotBindFollowDb *CloudIssuanceUserRobotBindFollowDb) GetCloudIssuanceUserRobotBindFollowByChatRoomId(chatRoomId string, robotId int) (m *model.CloudIssuanceUserRobotBindFollow, err error) { | func (cloudIssuanceUserRobotBindFollowDb *CloudIssuanceUserRobotBindFollowDb) GetCloudIssuanceUserRobotBindFollowByChatRoomId(chatRoomId string, robotId int) (m *model.CloudIssuanceUserRobotBindFollow, err error) { | ||||
time.Sleep(time.Millisecond * 50) // 等待50毫秒 | |||||
m = new(model.CloudIssuanceUserRobotBindFollow) | m = new(model.CloudIssuanceUserRobotBindFollow) | ||||
has, err := cloudIssuanceUserRobotBindFollowDb.Db.Where("chat_room_id =? AND robot_id = ? AND state = 1", chatRoomId, robotId).Get(m) | has, err := cloudIssuanceUserRobotBindFollowDb.Db.Where("chat_room_id =? AND robot_id = ? AND state = 1", chatRoomId, robotId).Get(m) | ||||
if err != nil { | if err != nil { | ||||
@@ -61,7 +61,8 @@ func (dealCloudIssuanceCallBackService *DealCloudIssuanceCallBackService) DealCa | |||||
"content": req.Data.Content, | "content": req.Data.Content, | ||||
} | } | ||||
utils.FilePutContents("cloud", utils.SerializeStr(args)) | utils.FilePutContents("cloud", utils.SerializeStr(args)) | ||||
time.Sleep(time.Millisecond * 200) // 等待200毫秒 | |||||
randInt := utils.RandIntRand(10, 100) | |||||
time.Sleep(time.Millisecond * time.Duration(randInt)) // 等待10 ~ 100毫秒 | |||||
chain := chain_transfer.TurnChain(svc.MasterDb(c), db2.Db, args) | chain := chain_transfer.TurnChain(svc.MasterDb(c), db2.Db, args) | ||||
utils.FilePutContents("cloud_resp", utils.SerializeStr(chain)) | utils.FilePutContents("cloud_resp", utils.SerializeStr(chain)) | ||||
if chain.Count != "" { | if chain.Count != "" { | ||||
@@ -40,7 +40,8 @@ func CloudIssuanceMsgCallBackConsume(queue md.MqQueue) { | |||||
if err != nil { | if err != nil { | ||||
panic(err) | panic(err) | ||||
} | } | ||||
time.Sleep(time.Millisecond * 300) // 等待300毫秒 | |||||
randInt := utils.RandIntRand(100, 200) | |||||
time.Sleep(time.Millisecond * time.Duration(randInt)) // 等待100 ~ 200毫秒 | |||||
go func() { | go func() { | ||||
//设置masterId | //设置masterId | ||||
cloudIssuanceRobotRecords, err := db.CloudIssuanceRobotRecordsGetOneByParams(map[string]interface{}{ | cloudIssuanceRobotRecords, err := db.CloudIssuanceRobotRecordsGetOneByParams(map[string]interface{}{ | ||||