mirror of
https://gitee.com/binary/weixin-java-tools.git
synced 2026-02-17 13:49:26 +08:00
🐛 #1413 公众号模块优化行业设置接口枚举匹配代码,并增加单元测试
This commit is contained in:
@@ -28,7 +28,12 @@ public class WxMpIndustryGsonAdapter implements JsonSerializer<WxMpTemplateIndus
|
||||
}
|
||||
|
||||
private WxMpTemplateIndustryEnum convertFromJson(JsonObject json) {
|
||||
return WxMpTemplateIndustryEnum.findBySecondary(GsonHelper.getString(json, "second_class"));
|
||||
String secondClass = GsonHelper.getString(json, "second_class");
|
||||
if (secondClass.contains("|")) {
|
||||
secondClass = secondClass.split("\\|")[1];
|
||||
}
|
||||
|
||||
return WxMpTemplateIndustryEnum.findBySecondary(secondClass);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user