com.foxinmy.weixin4j.mp.model
Class MenuMatchRule

java.lang.Object
  extended by 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
MenuMatchRule()
           
 
Method Summary
 MenuMatchRule city(String city)
          城市信息,是用户在微信中设置的地区
 MenuMatchRule country(String country)
          国家信息,是用户在微信中设置的地区
 MenuMatchRule gender(Gender gender)
           
 void gender0(int sex)
           
 String getCity()
           
 String getCountry()
           
 Gender getGender()
           
 Integer getGroupId()
           
 Lang getLanguage()
           
 ClientPlatformType getPlatformType()
           
 String getProvince()
           
 com.alibaba.fastjson.JSONObject getRule()
           
 MenuMatchRule group(int groupId)
           
 boolean hasRule()
           
 MenuMatchRule language(Lang language)
           
 void language0(int language)
          请使用 language(Lang language)
 MenuMatchRule platform(ClientPlatformType platformType)
           
 void platform0(int platform)
          请使用 platform(ClientPlatformType platformType)}
 MenuMatchRule province(String province)
          省份信息,是用户在微信中设置的地区
 String toString()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MenuMatchRule

public MenuMatchRule()
Method Detail

group

public MenuMatchRule group(int groupId)

gender0

public void gender0(int sex)

gender

public MenuMatchRule gender(Gender gender)

platform0

public void platform0(int platform)
请使用 platform(ClientPlatformType platformType)}

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)
请使用 language(Lang language)

Parameters:
language -

language

public MenuMatchRule language(Lang language)

getPlatformType

public ClientPlatformType getPlatformType()

getGroupId

public Integer getGroupId()

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()

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2014–2017. All rights reserved.