소스 검색

Merge remote-tracking branch 'origin/master'

# Conflicts:
#	consume/init.go
#	go.mod
master
huangjiajun 4 달 전
부모
커밋
5f951d121c
3개의 변경된 파일109개의 추가작업 그리고 3개의 파일을 삭제
  1. +1
    -1
      consume/init.go
  2. +2
    -2
      go.mod
  3. +106
    -0
      super_cloud_issuance/svc/svc_deal_call_back.go

+ 1
- 1
consume/init.go 파일 보기

@@ -61,7 +61,7 @@ func initConsumes() {
//jobs[consumeMd.ZhiosWithdrawReward] = ZhiosWithdrawReward
//jobs[consumeMd.ZhiosTaskTotal] = ZhiosTaskTotal
//jobs[consumeMd.ZhiosAutoUnFreeze] = ZhiosAutoUnFreeze
////jobs[consumeMd.ZhiosUserProfileInviteCode] = ZhiosUserProfileInviteCode
//jobs[consumeMd.ZhiosUserProfileInviteCode] = ZhiosUserProfileInviteCode

//



+ 2
- 2
go.mod 파일 보기

@@ -11,8 +11,8 @@ require (
code.fnuoos.com/go_rely_warehouse/zyos_go_mq.git v0.0.5
code.fnuoos.com/go_rely_warehouse/zyos_go_order_relate_rule.git v1.9.10-0.20240719082936-c249de79edce
code.fnuoos.com/go_rely_warehouse/zyos_go_pay.git v1.6.2-0.20231116085701-9ba6e19f877b
code.fnuoos.com/go_rely_warehouse/zyos_go_third_party_api.git v1.1.21-0.20240724061632-12e66d944062
code.fnuoos.com/go_rely_warehouse/zyos_model.git v0.0.4-0.20240723093418-66f0c713f459
code.fnuoos.com/go_rely_warehouse/zyos_go_third_party_api.git v1.1.21-0.20240611024753-7cd929a03014
code.fnuoos.com/go_rely_warehouse/zyos_model.git v0.0.4-0.20240724040702-a331e3a17921
github.com/afex/hystrix-go v0.0.0-20180502004556-fa1af6a1f4f5
github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751
github.com/boombuler/barcode v1.0.1


+ 106
- 0
super_cloud_issuance/svc/svc_deal_call_back.go 파일 보기

@@ -189,6 +189,7 @@ func (dealSuperCloudIssuanceCallBackService *DealSuperCloudIssuanceCallBackServi
return
}
if superCloudIssuanceUserRobotBindSource != nil {
//1、插入"源头群消息记录"
superCloudIssuanceUserRobotBindSourceMessageLog := models.SuperCloudIssuanceUserRobotBindSourceMessageLog{
ActivateGroupId: superCloudIssuanceUserRobotBindSource.ActivateGroupId,
MessageType: req.MessageType,
@@ -204,6 +205,111 @@ func (dealSuperCloudIssuanceCallBackService *DealSuperCloudIssuanceCallBackServi
fmt.Println("DealSourceGroupMessage_Err:::::", err.Error())
return err
}

//初始化云发单类
cloudIssuanceService := CloudIssuanceService{}
//2、判断消息类型
var superCloudIssuanceUserRobotBindSourceFollowGroups []*models.SuperCloudIssuanceUserRobotBindSourceFollowGroup
switch req.MessageType {
case 9:
//群聊文本消息
//3、查询需转发的群
err = engine.Where("activate_group_id =?", superCloudIssuanceUserRobotBindSource.ActivateGroupId).Find(&superCloudIssuanceUserRobotBindSourceFollowGroups)
if err != nil {
fmt.Println("DealSourceGroupMessage_Err:::::", err.Error())
return err
}

cache.NewRedis(cfg.RedisAddr)
for _, superCloudIssuanceUserRobotBindSourceFollowGroup := range superCloudIssuanceUserRobotBindSourceFollowGroups {
//转链
if superCloudIssuanceUserRobotBindSourceFollowGroup.Uid > 0 {
args := map[string]string{
"uid": utils.IntToStr(superCloudIssuanceUserRobotBindSourceFollowGroup.Uid),
"platform": "",
"master_id": dealSuperCloudIssuanceCallBackService.Context.GetString("mid"),
"content": req.Data.Content,
}
utils.FilePutContents("cloud_source", utils.SerializeStr(args))
chain := chain_transfer.TurnChain(MasterDb(dealSuperCloudIssuanceCallBackService.Context), db.Db, db2.ZhimengDb, args)
utils.FilePutContents("cloud_source", utils.SerializeStr(chain))
if chain.Count != "" {
req.Data.Content = chain.Count
}
}
utils.FilePutContents("cloud", req.Data.Content)

superCloudIssuanceUserRobotDb := implement.NewSuperCloudIssuanceUserRobotDb(engine, superCloudIssuanceUserRobotBindSourceFollowGroup.Uid, dealSuperCloudIssuanceCallBackService.Context.GetString("mid"))
robot, _ := superCloudIssuanceUserRobotDb.GetSuperCloudIssuanceUserRobot()
if robot != nil {
cloudIssuanceService.Set(nil, enum.RobotMacSendTextMethodName, "127.0.0.1")
err = cloudIssuanceService.RobotMacSendText(md.RobotMacSendTextRequest{
RobotId: robot.RobotId,
WxId: superCloudIssuanceUserRobotBindSourceFollowGroup.FollowChatRoomId,
Content: req.Data.Content,
})
if err != nil {
fmt.Println("DealCallBack_err::::", err.Error())
return
}
}
}

break
case 10:
//群聊图片消息

//3、查询需转发的群
err = engine.Where("activate_group_id =?", superCloudIssuanceUserRobotBindSource.ActivateGroupId).Find(&superCloudIssuanceUserRobotBindSourceFollowGroups)
if err != nil {
fmt.Println("DealSourceGroupMessage_Err:::::", err.Error())
return err
}

for _, superCloudIssuanceUserRobotBindSourceFollowGroup := range superCloudIssuanceUserRobotBindSourceFollowGroups {
superCloudIssuanceUserRobotDb := implement.NewSuperCloudIssuanceUserRobotDb(engine, superCloudIssuanceUserRobotBindSourceFollowGroup.Uid, dealSuperCloudIssuanceCallBackService.Context.GetString("mid"))
robot, _ := superCloudIssuanceUserRobotDb.GetSuperCloudIssuanceUserRobot()
if robot != nil {
cloudIssuanceService.Set(nil, enum.RobotMacSendRecvImageMethodName, "127.0.0.1")
err = cloudIssuanceService.RobotMacSendRecvImage(md.RobotMacSendRecvImageRequest{
RobotId: robot.RobotId,
WxId: superCloudIssuanceUserRobotBindSourceFollowGroup.FollowChatRoomId,
Content: req.Data.Content,
})
if err != nil {
fmt.Println("DealCallBack_err::::", err.Error())
return
}
}
}
break
case 11:
//群聊视屏消息

//3、查询需转发的群
err = engine.Where("activate_group_id =?", superCloudIssuanceUserRobotBindSource.ActivateGroupId).Find(&superCloudIssuanceUserRobotBindSourceFollowGroups)
if err != nil {
fmt.Println("DealSourceGroupMessage_Err:::::", err.Error())
return err
}
for _, superCloudIssuanceUserRobotBindSourceFollowGroup := range superCloudIssuanceUserRobotBindSourceFollowGroups {
superCloudIssuanceUserRobotDb := implement.NewSuperCloudIssuanceUserRobotDb(engine, superCloudIssuanceUserRobotBindSourceFollowGroup.Uid, dealSuperCloudIssuanceCallBackService.Context.GetString("mid"))
robot, _ := superCloudIssuanceUserRobotDb.GetSuperCloudIssuanceUserRobot()
if robot != nil {
cloudIssuanceService.Set(nil, enum.RobotMacSendRecvViedoMethodName, "127.0.0.1")
err = cloudIssuanceService.RobotMacSendRecvVideo(md.RobotMacSendRecvVideoRequest{
RobotId: robot.RobotId,
WxId: superCloudIssuanceUserRobotBindSourceFollowGroup.FollowChatRoomId,
Content: req.Data.Content,
})
if err != nil {
fmt.Println("DealCallBack_err::::", err.Error())
return
}
}
}
break
}
}

return


불러오는 중...
취소
저장