DengBiao пре 1 година
родитељ
комит
3239cafb45
1 измењених фајлова са 34 додато и 35 уклоњено
  1. +34
    -35
      consume/dou_shen_user_register_for_operation_center.go

+ 34
- 35
consume/dou_shen_user_register_for_operation_center.go Прегледај датотеку

@@ -6,7 +6,6 @@ import (
db2 "applet/app/db/gim"
"applet/app/db/gim/model"
model2 "applet/app/db/model"
"applet/app/svc"
utils2 "applet/app/utils"
"applet/app/utils/logx"
utils "applet/app/utils/rpc"
@@ -185,40 +184,40 @@ func handleDouShenUserRegisterConsumeForOperationCenter(msgData []byte) error {
})

//发送专属红包
gimSendSpeciallyRedPackageUser, err := db2.DbSysCfg.SysCfgGetOne("send_specially_red_package_user", msg.MasterId)
if err != nil {
return err
}
if gimSendSpeciallyRedPackageUser == nil {
return errors.New("暂未设置专属红包发送用户")
}
sendSpeciallyRedPackageUser, err := db.SysCfgGetOne(db.DBs[msg.MasterId], "send_specially_red_package_user")
if err != nil {
return err
}
amount, err := getSendAmount(msg.MasterId)
if err != nil {
return err
}
args := md.SendRedPackageReq{
UserId: gimSendSpeciallyRedPackageUser.Val,
DeviceId: "",
Token: "",
Amount: amount,
RedPacketType: 5,
RedPacketNums: 1,
RedPacketContent: "抖省赚钱,大吉大利",
RedPacketSmallContent: gimUser.Nickname + "的专属红包",
ReceiverType: 2,
ReceiverId: int64(OperationGroup.GroupId),
SendTime: utils2.UnixMilliTime(time.Now()),
ToUserIds: []int64{gimUser.Id},
RedPackageCover: "",
}
err, _ = svc.CurlSendRedPackage(args, msg.MasterId, sendSpeciallyRedPackageUser.Val)
if err != nil {
return err
}
//gimSendSpeciallyRedPackageUser, err := db2.DbSysCfg.SysCfgGetOne("send_specially_red_package_user", msg.MasterId)
//if err != nil {
// return err
//}
//if gimSendSpeciallyRedPackageUser == nil {
// return errors.New("暂未设置专属红包发送用户")
//}
//sendSpeciallyRedPackageUser, err := db.SysCfgGetOne(db.DBs[msg.MasterId], "send_specially_red_package_user")
//if err != nil {
// return err
//}
//amount, err := getSendAmount(msg.MasterId)
//if err != nil {
// return err
//}
//args := md.SendRedPackageReq{
// UserId: gimSendSpeciallyRedPackageUser.Val,
// DeviceId: "",
// Token: "",
// Amount: amount,
// RedPacketType: 5,
// RedPacketNums: 1,
// RedPacketContent: "抖省赚钱,大吉大利",
// RedPacketSmallContent: gimUser.Nickname + "的专属红包",
// ReceiverType: 2,
// ReceiverId: int64(OperationGroup.GroupId),
// SendTime: utils2.UnixMilliTime(time.Now()),
// ToUserIds: []int64{gimUser.Id},
// RedPackageCover: "",
//}
//err, _ = svc.CurlSendRedPackage(args, msg.MasterId, sendSpeciallyRedPackageUser.Val)
//if err != nil {
// return err
//}
return nil
}



Loading…
Откажи
Сачувај