Class Redpacket
- java.lang.Object
-
- com.foxinmy.weixin4j.http.weixin.XmlResult
-
- com.foxinmy.weixin4j.pay.payment.mch.MerchantResult
-
- com.foxinmy.weixin4j.pay.payment.mch.Redpacket
-
- All Implemented Interfaces:
Serializable
public class Redpacket extends MerchantResult
红包- Since:
- JDK 1.6
- Author:
- jinyu(foxinmy@gmail.com)
- See Also:
- 普通红包, 裂变红包, Serialized Form
-
-
Method Summary
-
Methods inherited from class com.foxinmy.weixin4j.pay.payment.mch.MerchantResult
getAppId, getDeviceInfo, getFormatRecall, getMchId, getNonceStr, getRecall, getSign, getSignType, getSubAppId, getSubMchId, setAppId, setDeviceInfo, setMchId, setNonceStr, setRecall, setSign, setSignType, setSubAppId, setSubMchId
-
Methods inherited from class com.foxinmy.weixin4j.http.weixin.XmlResult
getErrCode, getErrCodeDes, getResultCode, getReturnCode, getReturnMsg, setErrCode, setErrCodeDes, setResultCode, setReturnCode, setReturnMsg
-
-
-
-
Constructor Detail
-
Redpacket
protected Redpacket()
-
Redpacket
public Redpacket(String outTradeNo, String openId, String sendName, double totalAmount, int totalNum, String wishing, String clientIp, String actName, String remark)
红包- Parameters:
outTradeNo
- 商户侧一天内不可重复的订单号 接口根据商户订单号支持重入 如出现超时可再调用 必填openId
- 接受收红包的用户的openid 必填sendName
- 红包发送者名称 必填totalAmount
- 付款金额 单位为元,自动格式化为分 必填totalNum
- 红包发放总人数 大于1视为裂变红包 必填wishing
- 红包祝福语 必填clientIp
- Ip地址 必填actName
- 活动名称 必填remark
- 备注 必填
-
-
Method Detail
-
copy
public Redpacket copy(String outTradeNo, String openId)
批量发送时可能需要- Parameters:
outTradeNo
- 订单号openId
- 用户ID- Returns:
- 红包实体
-
getOutTradeNo
public String getOutTradeNo()
-
setOutTradeNo
public void setOutTradeNo(String outTradeNo)
-
getOpenId
public String getOpenId()
-
setOpenId
public void setOpenId(String openId)
-
getSendName
public String getSendName()
-
setSendName
public void setSendName(String sendName)
-
getTotalAmount
public int getTotalAmount()
-
setTotalAmount
public void setTotalAmount(int totalAmount)
-
getFormatTotalAmount
public double getFormatTotalAmount()
调用接口获取单位为分,get方法转换为元方便使用- Returns:
- 元单位
-
getTotalNum
public int getTotalNum()
-
setTotalNum
public void setTotalNum(int totalNum)
-
getWishing
public String getWishing()
-
setWishing
public void setWishing(String wishing)
-
getAmtType
public String getAmtType()
-
setAmtType
public void setAmtType(String amtType)
-
getClientIp
public String getClientIp()
-
setClientIp
public void setClientIp(String clientIp)
-
getActName
public String getActName()
-
setActName
public void setActName(String actName)
-
getRemark
public String getRemark()
-
setRemark
public void setRemark(String remark)
-
getMsgAppId
public String getMsgAppId()
-
setMsgAppId
public void setMsgAppId(String msgAppId)
-
getConsumeMchId
public String getConsumeMchId()
-
setConsumeMchId
public void setConsumeMchId(String consumeMchId)
-
getSceneType
public RedpacketSceneType getSceneType()
-
setSceneType
public void setSceneType(RedpacketSceneType sceneType)
-
getRisk
public String getRisk()
-
setRisk
public void setRisk(String risk)
-
setRisk
public void setRisk(RedpacketRisk risk)
-
toString
public String toString()
- Overrides:
toString
in classMerchantResult
-
-