mirror of
https://gitee.com/binary/weixin-java-tools.git
synced 2026-03-10 00:13:40 +08:00
🎨 #1233 公众号模板消息设置行业信息接口优化,增加枚举类 WxMpTemplateIndustryEnum 方便使用
This commit is contained in:
@@ -24,7 +24,9 @@ public interface WxMpTemplateMsgService {
|
||||
* 详情请见:http://mp.weixin.qq.com/wiki?t=resource/res_main&id=mp1433751277&token=&lang=zh_CN
|
||||
* </pre>
|
||||
*
|
||||
* @param wxMpIndustry 行业信息
|
||||
* @return 是否成功
|
||||
* @throws WxErrorException .
|
||||
*/
|
||||
boolean setIndustry(WxMpTemplateIndustry wxMpIndustry) throws WxErrorException;
|
||||
|
||||
@@ -35,6 +37,7 @@ public interface WxMpTemplateMsgService {
|
||||
* </pre>
|
||||
*
|
||||
* @return wxMpIndustry
|
||||
* @throws WxErrorException .
|
||||
*/
|
||||
WxMpTemplateIndustry getIndustry() throws WxErrorException;
|
||||
|
||||
@@ -44,7 +47,9 @@ public interface WxMpTemplateMsgService {
|
||||
* 详情请见: http://mp.weixin.qq.com/wiki?t=resource/res_main&id=mp1433751277&token=&lang=zh_CN
|
||||
* </pre>
|
||||
*
|
||||
* @param templateMessage 模板消息
|
||||
* @return 消息Id
|
||||
* @throws WxErrorException .
|
||||
*/
|
||||
String sendTemplateMsg(WxMpTemplateMessage templateMessage) throws WxErrorException;
|
||||
|
||||
@@ -58,6 +63,7 @@ public interface WxMpTemplateMsgService {
|
||||
*
|
||||
* @param shortTemplateId 模板库中模板的编号,有“TM**”和“OPENTMTM**”等形式
|
||||
* @return templateId 模板Id
|
||||
* @throws WxErrorException .
|
||||
*/
|
||||
String addTemplate(String shortTemplateId) throws WxErrorException;
|
||||
|
||||
@@ -70,6 +76,7 @@ public interface WxMpTemplateMsgService {
|
||||
* </pre>
|
||||
*
|
||||
* @return templateId 模板Id
|
||||
* @throws WxErrorException .
|
||||
*/
|
||||
List<WxMpTemplate> getAllPrivateTemplate() throws WxErrorException;
|
||||
|
||||
@@ -82,6 +89,8 @@ public interface WxMpTemplateMsgService {
|
||||
* </pre>
|
||||
*
|
||||
* @param templateId 模板Id
|
||||
* @return .
|
||||
* @throws WxErrorException .
|
||||
*/
|
||||
boolean delPrivateTemplate(String templateId) throws WxErrorException;
|
||||
}
|
||||
|
||||
@@ -42,8 +42,8 @@ public class WxMpTemplateMsgServiceImpl implements WxMpTemplateMsgService {
|
||||
|
||||
@Override
|
||||
public boolean setIndustry(WxMpTemplateIndustry wxMpIndustry) throws WxErrorException {
|
||||
if (null == wxMpIndustry.getPrimaryIndustry() || null == wxMpIndustry.getPrimaryIndustry().getId()
|
||||
|| null == wxMpIndustry.getSecondIndustry() || null == wxMpIndustry.getSecondIndustry().getId()) {
|
||||
if (null == wxMpIndustry.getPrimaryIndustry() || null == wxMpIndustry.getPrimaryIndustry().getCode()
|
||||
|| null == wxMpIndustry.getSecondIndustry() || null == wxMpIndustry.getSecondIndustry().getCode()) {
|
||||
throw new IllegalArgumentException("行业Id不能为空,请核实");
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user