|
@@ -1548,7 +1548,7 @@ public class MucChatActivity extends BaseActivity implements
|
|
|
* @param count 数量
|
|
|
* @param words 祝福语(或者口令)
|
|
|
*/
|
|
|
- public void sendRed(String type, String money, String count, String words, String payPassword,String assignUserId,String secret) {
|
|
|
+ public void sendRed(String type, String money, String count, String words, String payPassword,String assignUserId,String secret,String toUserName) {
|
|
|
/**
|
|
|
* 步骤
|
|
|
* 1.调发红包的接口,发送一个红包
|
|
@@ -1563,6 +1563,7 @@ public class MucChatActivity extends BaseActivity implements
|
|
|
if ("3".equals(type)){
|
|
|
params.put("secret", secret);
|
|
|
}
|
|
|
+
|
|
|
params.put("moneyStr", money);
|
|
|
params.put("count", count);
|
|
|
params.put("greetings", words);
|
|
@@ -1588,6 +1589,8 @@ public class MucChatActivity extends BaseActivity implements
|
|
|
message.setDoubleTimeSend(TimeUtils.sk_time_current_time_double());
|
|
|
message.setContent(redPacket.getGreetings()); // 祝福语
|
|
|
message.setObjectId(objectId); // 红包id
|
|
|
+ message.setAssignUserId(assignUserId);
|
|
|
+ message.setToUserName(toUserName);
|
|
|
message.setFilePath(redPacket.getType() + "");// 用FilePath来储存红包类型
|
|
|
// 群组发送普通红包
|
|
|
message.setFileSize(redPacket.getStatus()); // 用filesize来储存红包状态
|
|
@@ -1990,14 +1993,17 @@ public class MucChatActivity extends BaseActivity implements
|
|
|
case ChatActivity.REQUEST_CODE_SEND_RED:
|
|
|
if (data != null && data.getExtras() != null) {
|
|
|
Bundle bundle = data.getExtras();
|
|
|
- sendRed(bundle.getString("type")
|
|
|
- , bundle.getString("money")
|
|
|
- , bundle.getString("count")
|
|
|
- , bundle.getString("words")
|
|
|
- , bundle.getString("payPassword")
|
|
|
- , bundle.getString("assignUserId")
|
|
|
- , bundle.getString("secret")
|
|
|
- );
|
|
|
+
|
|
|
+ String money = bundle.getString("money"); // 金额
|
|
|
+ String receiverId = bundle.getString("receiver"); //指定人Id
|
|
|
+ // 口令或者祝福语
|
|
|
+ String words = bundle.getString("words");
|
|
|
+ String count = bundle.getString("count"); // 数量
|
|
|
+ String type = bundle.getString("type"); // 类型
|
|
|
+ String payPassword = bundle.getString("payPassword"); // 支付密码,
|
|
|
+ String toUserName = bundle.getString("toUserName");
|
|
|
+ sendRed(type, money, count, words, payPassword,receiverId,"",toUserName);
|
|
|
+
|
|
|
}
|
|
|
break;
|
|
|
default:
|