Package com.foxinmy.weixin4j.mp.model
Class MenuMatchRule
- java.lang.Object
-
- com.foxinmy.weixin4j.mp.model.MenuMatchRule
-
- All Implemented Interfaces:
Serializable
public class MenuMatchRule extends Object implements Serializable
个性化菜单匹配规则- Since:
- JDK 1.6
- Author:
- jinyu(foxinmy@gmail.com)
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description MenuMatchRule()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description MenuMatchRulecity(String city)城市信息,是用户在微信中设置的地区MenuMatchRulecountry(String country)国家信息,是用户在微信中设置的地区MenuMatchRulegender(Gender gender)voidgender0(int sex)StringgetCity()StringgetCountry()GendergetGender()LanggetLanguage()ClientPlatformTypegetPlatformType()StringgetProvince()com.alibaba.fastjson.JSONObjectgetRule()IntegergetTagId()MenuMatchRulegroup(int tagId)booleanhasRule()MenuMatchRulelanguage(Lang language)voidlanguage0(int language)MenuMatchRuleplatform(ClientPlatformType platformType)voidplatform0(int platform)MenuMatchRuleprovince(String province)省份信息,是用户在微信中设置的地区StringtoString()
-
-
-
Method Detail
-
group
public MenuMatchRule group(int tagId)
-
gender0
public void gender0(int sex)
-
gender
public MenuMatchRule gender(Gender gender)
-
platform0
public void platform0(int platform)
- Parameters:
platform-
-
platform
public MenuMatchRule platform(ClientPlatformType platformType)
-
country
public MenuMatchRule country(String country)
国家信息,是用户在微信中设置的地区country、province、city组成地区信息,将按照country、province、city的顺序进行验证 ,要符合地区信息表的内容。地区信息从大到小验证,小的可以不填,即若填写了省份信息,则国家信息也必填并且匹配,城市信息可以不填。 例如 “中国 广东省 广州市”、“中国 广东省”都是合法的地域信息,而“中国 广州市”则不合法,因为填写了城市信息但没有填写省份信息
- Parameters:
country-- Returns:
-
province
public MenuMatchRule province(String province)
省份信息,是用户在微信中设置的地区country、province、city组成地区信息,将按照country、province、city的顺序进行验证,要符合地区信息表的内容。 地区信息从大到小验证,小的可以不填,即若填写了省份信息,则国家信息也必填并且匹配,城市信息可以不填。 例如 “中国 广东省 广州市”、“中国 广东省”都是合法的地域信息,而“中国 广州市”则不合法,因为填写了城市信息但没有填写省份信息
- Parameters:
country-- Returns:
-
city
public MenuMatchRule city(String city)
城市信息,是用户在微信中设置的地区country、province、city组成地区信息,将按照country、province、city的顺序进行验证,要符合地区信息表的内容。 地区信息从大到小验证,小的可以不填,即若填写了省份信息,则国家信息也必填并且匹配,城市信息可以不填。 例如 “中国 广东省 广州市”、“中国 广东省”都是合法的地域信息,而“中国 广州市”则不合法,因为填写了城市信息但没有填写省份信息
- Parameters:
city-- Returns:
-
language0
public void language0(int language)
- Parameters:
language-
-
language
public MenuMatchRule language(Lang language)
-
getPlatformType
public ClientPlatformType getPlatformType()
-
getTagId
public Integer getTagId()
-
getGender
public Gender getGender()
-
getCountry
public String getCountry()
-
getProvince
public String getProvince()
-
getCity
public String getCity()
-
getLanguage
public Lang getLanguage()
-
hasRule
public boolean hasRule()
-
getRule
public com.alibaba.fastjson.JSONObject getRule()
-
-