|
|
@@ -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 |
|
|
|
} |
|
|
|
|
|
|
|